From 16a6c25b16958343c4e4928d7d22934071688930 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 6 Jul 2023 13:31:48 +0000 Subject: [PATCH] CodeGen from PR 24673 in Azure/azure-rest-api-specs Merge 5af6d6d919406159b774f56340ccf2ec61bbb8bc into d71132a3e8bf8ad22ab77991805e033ed1b66dff --- .../CHANGELOG.md | 4 +- .../README.md | 4 +- .../SAMPLE.md | 5115 ++++++++++++----- .../pom.xml | 2 +- .../ManagedNetworkFabricManager.java | 98 +- .../fluent/AccessControlListsClient.java | 350 +- ...zureNetworkFabricManagementServiceApi.java | 43 +- .../fluent/ExternalNetworksClient.java | 473 +- .../fluent/InternalNetworksClient.java | 503 +- .../fluent/InternetGatewayRulesClient.java | 306 + .../fluent/InternetGatewaysClient.java | 304 + .../fluent/IpCommunitiesClient.java | 44 +- .../fluent/IpExtendedCommunitiesClient.java | 28 +- .../fluent/IpPrefixesClient.java | 28 +- .../fluent/L2IsolationDomainsClient.java | 236 +- .../fluent/L3IsolationDomainsClient.java | 225 +- .../fluent/NeighborGroupsClient.java | 303 + .../fluent/NetworkDeviceSkusClient.java | 20 +- .../fluent/NetworkDevicesClient.java | 445 +- .../NetworkFabricControllersClient.java | 153 +- .../fluent/NetworkFabricSkusClient.java | 24 +- .../fluent/NetworkFabricsClient.java | 591 +- .../fluent/NetworkInterfacesClient.java | 186 +- .../fluent/NetworkPacketBrokersClient.java | 306 + .../fluent/NetworkRackSkusClient.java | 70 - .../fluent/NetworkRacksClient.java | 42 +- .../fluent/NetworkTapRulesClient.java | 509 ++ .../fluent/NetworkTapsClient.java | 440 ++ .../NetworkToNetworkInterconnectsClient.java | 336 +- .../fluent/RoutePoliciesClient.java | 198 + .../fluent/models/AccessControlListInner.java | 125 +- .../AccessControlListPatchProperties.java | 79 +- .../models/AccessControlListProperties.java | 182 +- .../fluent/models/ArpPropertiesInner.java | 178 - ...ostActionResponseForDeviceUpdateInner.java | 94 + ...PostActionResponseForStateUpdateInner.java | 41 + .../fluent/models/ExternalNetworkInner.java | 127 +- .../ExternalNetworkPatchProperties.java | 93 +- .../models/ExternalNetworkProperties.java | 177 +- .../GetDeviceStatusPropertiesInner.java | 125 - ...namicInterfaceMapsPropertiesItemInner.java | 80 - ...taticInterfaceMapsPropertiesItemInner.java | 232 - .../fluent/models/InterfaceStatusInner.java | 144 - .../fluent/models/InternalNetworkInner.java | 279 +- .../InternalNetworkPatchProperties.java | 253 +- .../models/InternalNetworkProperties.java | 359 +- .../fluent/models/InternetGatewayInner.java | 203 + .../InternetGatewayPatchableProperties.java | 50 + .../models/InternetGatewayProperties.java | 173 + .../models/InternetGatewayRuleInner.java | 149 + .../models/InternetGatewayRuleProperties.java | 104 + .../fluent/models/IpCommunityInner.java | 89 +- .../IpCommunityPatchableProperties.java | 55 + .../fluent/models/IpCommunityProperties.java | 108 +- .../models/IpExtendedCommunityInner.java | 80 +- .../IpExtendedCommunityPatchProperties.java | 63 + .../models/IpExtendedCommunityProperties.java | 95 +- .../fluent/models/IpPrefixInner.java | 50 +- .../models/IpPrefixPatchProperties.java | 65 + .../fluent/models/IpPrefixProperties.java | 80 +- .../fluent/models/L2IsolationDomainInner.java | 65 +- .../L2IsolationDomainPatchProperties.java | 8 +- .../models/L2IsolationDomainProperties.java | 71 +- .../fluent/models/L3IsolationDomainInner.java | 92 +- .../L3IsolationDomainPatchProperties.java | 54 +- .../models/L3IsolationDomainProperties.java | 111 +- .../fluent/models/NeighborGroupInner.java | 158 + .../models/NeighborGroupPatchProperties.java | 64 + .../models/NeighborGroupProperties.java | 111 + .../fluent/models/NetworkDeviceInner.java | 86 +- ...etworkDevicePatchParametersProperties.java | 17 +- .../models/NetworkDeviceProperties.java | 131 +- .../fluent/models/NetworkDeviceSkuInner.java | 30 +- .../models/NetworkDeviceSkuProperties.java | 42 +- .../models/NetworkFabricControllerInner.java | 88 +- .../NetworkFabricControllerProperties.java | 94 +- .../fluent/models/NetworkFabricInner.java | 169 +- ...etworkFabricPatchParametersProperties.java | 115 - .../models/NetworkFabricPatchProperties.java | 228 + .../models/NetworkFabricProperties.java | 230 +- .../fluent/models/NetworkFabricSkuInner.java | 54 +- .../models/NetworkFabricSkuProperties.java | 78 +- .../fluent/models/NetworkInterfaceInner.java | 46 +- .../models/NetworkInterfaceProperties.java | 80 +- .../models/NetworkPacketBrokerInner.java | 153 + .../models/NetworkPacketBrokerProperties.java | 137 + .../fluent/models/NetworkRackInner.java | 27 +- .../fluent/models/NetworkRackProperties.java | 43 +- .../fluent/models/NetworkRackSkuInner.java | 195 - .../models/NetworkRackSkuProperties.java | 185 - .../fluent/models/NetworkTapInner.java | 217 + .../models/NetworkTapPatchableParameters.java | 93 + .../fluent/models/NetworkTapProperties.java | 198 + .../fluent/models/NetworkTapRuleInner.java | 275 + .../models/NetworkTapRulePatchProperties.java | 150 + .../models/NetworkTapRuleProperties.java | 256 + .../NetworkToNetworkInterconnectInner.java | 199 +- ...etworkInterconnectPatchableProperties.java | 231 + ...etworkToNetworkInterconnectProperties.java | 251 +- .../fluent/models/RoutePolicyInner.java | 87 +- .../RoutePolicyPatchableProperties.java | 55 + .../fluent/models/RoutePolicyProperties.java | 122 +- .../models/SupportPackagePropertiesInner.java | 59 - .../ValidateConfigurationResponseInner.java | 67 + .../implementation/AccessControlListImpl.java | 131 +- .../AccessControlListsClientImpl.java | 1495 ++++- .../AccessControlListsImpl.java | 84 +- ...workFabricManagementServiceApiBuilder.java | 4 +- ...NetworkFabricManagementServiceApiImpl.java | 94 +- ...PostActionResponseForDeviceUpdateImpl.java | 54 + ...PostActionResponseForStateUpdateImpl.java} | 19 +- .../implementation/ExternalNetworkImpl.java | 135 +- .../ExternalNetworksClientImpl.java | 1737 ++---- .../implementation/ExternalNetworksImpl.java | 132 +- .../GetDeviceStatusPropertiesImpl.java | 43 - ...ynamicInterfaceMapsPropertiesItemImpl.java | 54 - ...StaticInterfaceMapsPropertiesItemImpl.java | 61 - .../implementation/InterfaceStatusImpl.java | 50 - .../implementation/InternalNetworkImpl.java | 234 +- .../InternalNetworksClientImpl.java | 1826 ++---- .../implementation/InternalNetworksImpl.java | 163 +- .../implementation/InternetGatewayImpl.java | 236 + .../InternetGatewayRuleImpl.java | 216 + .../InternetGatewayRulesClientImpl.java | 1657 ++++++ .../InternetGatewayRulesImpl.java | 184 + .../InternetGatewaysClientImpl.java | 1638 ++++++ .../implementation/InternetGatewaysImpl.java | 179 + .../IpCommunitiesClientImpl.java | 138 +- .../implementation/IpCommunityImpl.java | 51 +- .../IpExtendedCommunitiesClientImpl.java | 92 +- .../IpExtendedCommunityImpl.java | 54 +- .../implementation/IpPrefixImpl.java | 48 +- .../implementation/IpPrefixesClientImpl.java | 84 +- .../implementation/L2IsolationDomainImpl.java | 85 +- .../L2IsolationDomainsClientImpl.java | 873 +-- .../L2IsolationDomainsImpl.java | 103 +- .../implementation/L3IsolationDomainImpl.java | 111 +- .../L3IsolationDomainsClientImpl.java | 863 +-- .../L3IsolationDomainsImpl.java | 83 +- .../implementation/NeighborGroupImpl.java | 234 + .../NeighborGroupsClientImpl.java | 1629 ++++++ .../implementation/NeighborGroupsImpl.java | 174 + .../implementation/NetworkDeviceImpl.java | 109 +- .../implementation/NetworkDeviceSkuImpl.java | 5 - .../NetworkDeviceSkusClientImpl.java | 58 +- .../NetworkDevicesClientImpl.java | 1875 ++---- .../implementation/NetworkDevicesImpl.java | 156 +- .../NetworkFabricControllerImpl.java | 62 +- .../NetworkFabricControllersClientImpl.java | 647 +-- .../NetworkFabricControllersImpl.java | 18 - .../implementation/NetworkFabricImpl.java | 242 +- .../implementation/NetworkFabricSkuImpl.java | 22 +- .../NetworkFabricSkusClientImpl.java | 70 +- .../NetworkFabricsClientImpl.java | 2475 +++++++- .../implementation/NetworkFabricsImpl.java | 208 +- .../implementation/NetworkInterfaceImpl.java | 37 +- .../NetworkInterfacesClientImpl.java | 647 +-- .../implementation/NetworkInterfacesImpl.java | 63 +- .../NetworkPacketBrokerImpl.java | 233 + .../NetworkPacketBrokersClientImpl.java | 1659 ++++++ .../NetworkPacketBrokersImpl.java | 184 + .../implementation/NetworkRackImpl.java | 24 +- .../implementation/NetworkRackSkuImpl.java | 80 - .../NetworkRackSkusClientImpl.java | 456 -- .../implementation/NetworkRackSkusImpl.java | 70 - .../NetworkRacksClientImpl.java | 126 +- .../implementation/NetworkTapImpl.java | 280 + .../implementation/NetworkTapRuleImpl.java | 330 ++ .../NetworkTapRulesClientImpl.java | 2532 ++++++++ .../implementation/NetworkTapRulesImpl.java | 243 + .../implementation/NetworkTapsClientImpl.java | 2223 +++++++ .../implementation/NetworkTapsImpl.java | 218 + .../NetworkToNetworkInterconnectImpl.java | 216 +- ...tworkToNetworkInterconnectsClientImpl.java | 1587 ++++- .../NetworkToNetworkInterconnectsImpl.java | 82 +- .../RoutePoliciesClientImpl.java | 882 ++- .../implementation/RoutePoliciesImpl.java | 72 + .../implementation/RoutePolicyImpl.java | 77 +- ...=> ValidateConfigurationResponseImpl.java} | 35 +- .../models/AccessControlList.java | 255 +- .../models/AccessControlListAction.java | 76 + .../AccessControlListConditionProperties.java | 250 - .../AccessControlListMatchCondition.java | 207 + .../AccessControlListMatchConfiguration.java | 162 + .../models/AccessControlListPatch.java | 117 +- .../AccessControlListPatchableProperties.java | 137 + .../AccessControlListPortCondition.java | 81 + .../models/AccessControlLists.java | 120 +- .../models/AccessControlListsListResult.java | 8 +- .../models/AclActionType.java | 50 + .../managednetworkfabric/models/Action.java | 47 + .../models/ActionIpCommunityProperties.java | 12 +- .../ActionIpExtendedCommunityProperties.java | 12 +- .../models/AddressFamily.java | 47 - .../models/AddressFamilyType.java | 47 + .../models/AdministrativeState.java | 16 +- .../models/AggregateRoute.java | 18 +- .../models/AggregateRouteConfiguration.java | 8 +- .../models/ArpProperties.java | 52 - .../models/BfdAdministrativeState.java | 53 + .../models/BfdConfiguration.java | 50 +- .../models/BgpConfiguration.java | 32 +- .../CommonDynamicMatchConfiguration.java | 112 + .../models/CommonMatchConditions.java | 109 + ...mmonPostActionResponseForDeviceUpdate.java | 40 + ...ommonPostActionResponseForStateUpdate.java | 25 + .../models/Condition.java | 3 + .../models/ConditionActionType.java | 47 - .../models/ConfigurationState.java | 71 + .../models/ConfigurationType.java | 47 + .../models/ConnectedSubnet.java | 16 +- .../models/ConnectedSubnetRoutePolicy.java | 81 + ...eServices.java => ControllerServices.java} | 16 +- .../models/DestinationProperties.java | 159 + .../models/DestinationType.java | 47 + .../models/DeviceAdministrativeState.java | 53 + .../models/DeviceLimits.java | 182 - .../models/EnableDisableState.java | 47 + .../models/EnabledDisabledState.java | 47 - .../models/Encapsulation.java | 47 + .../models/EncapsulationType.java | 47 + .../models/ExportRoutePolicy.java | 76 + .../models/ExportRoutePolicyInformation.java | 76 + .../models/Extension.java | 47 + .../models/ExtensionEnumProperty.java | 50 + .../models/ExternalNetwork.java | 230 +- .../models/ExternalNetworkPatch.java | 67 +- ...tworkPatchPropertiesOptionAProperties.java | 228 + .../ExternalNetworkPatchableProperties.java | 126 +- ...nalNetworkPropertiesOptionAProperties.java | 175 +- .../models/ExternalNetworks.java | 193 +- .../models/ExternalNetworksList.java | 8 +- .../models/FabricBfdConfiguration.java | 54 - .../models/FabricSkuType.java | 47 + .../models/GatewayType.java | 47 + .../models/GetDeviceStatusProperties.java | 39 - ...GetDynamicInterfaceMapsPropertiesItem.java | 60 - .../GetStaticInterfaceMapsPropertiesItem.java | 74 - .../models/ImportRoutePolicy.java | 76 + .../models/ImportRoutePolicyInformation.java | 76 + .../models/InterfaceStatus.java | 52 - .../models/InternalNetwork.java | 442 +- .../models/InternalNetworkPatch.java | 191 +- .../InternalNetworkPatchableProperties.java | 193 +- ...rnalNetworkPropertiesBgpConfiguration.java | 99 + ...orkPropertiesStaticRouteConfiguration.java | 74 + .../models/InternalNetworks.java | 195 +- .../models/InternalNetworksList.java | 8 +- .../models/InternetGateway.java | 311 + .../models/InternetGatewayPatch.java | 76 + .../models/InternetGatewayRule.java | 257 + .../models/InternetGatewayRulePatch.java | 33 + .../models/InternetGatewayRules.java | 180 + .../InternetGatewayRulesListResult.java | 81 + .../models/InternetGateways.java | 180 + .../models/InternetGatewaysListResult.java | 81 + .../models/IpAddressType.java | 47 + .../models/IpCommunities.java | 32 +- .../models/IpCommunitiesListResult.java | 8 +- .../models/IpCommunity.java | 72 +- .../IpCommunityAddOperationProperties.java | 6 +- .../IpCommunityDeleteOperationProperties.java | 6 +- .../models/IpCommunityPatch.java | 54 +- .../models/IpCommunityRule.java | 149 + .../IpCommunitySetOperationProperties.java | 6 +- .../models/IpExtendedCommunities.java | 16 +- .../models/IpExtendedCommunity.java | 95 +- ...tendedCommunityAddOperationProperties.java | 6 +- ...dedCommunityDeleteOperationProperties.java | 6 +- .../models/IpExtendedCommunityListResult.java | 8 +- .../models/IpExtendedCommunityPatch.java | 78 +- ...pExtendedCommunityPatchableProperties.java | 64 + .../models/IpExtendedCommunityRule.java | 129 + ...tendedCommunitySetOperationProperties.java | 6 +- .../models/IpGroupProperties.java | 103 + .../models/IpMatchCondition.java | 129 + .../managednetworkfabric/models/IpPrefix.java | 70 +- .../models/IpPrefixPatch.java | 77 +- .../models/IpPrefixPatchableProperties.java | 54 + ...PrefixRulesItem.java => IpPrefixRule.java} | 50 +- .../models/IpPrefixes.java | 16 +- .../models/IpPrefixesListResult.java | 8 +- .../models/IsCurrentVersion.java | 47 - .../models/IsManagementType.java | 47 + .../models/IsMonitoringEnabled.java | 47 + .../models/IsTestVersion.java | 47 - .../IsWorkloadManagementNetworkEnabled.java | 50 + .../models/IsolationDomainProperties.java | 77 + .../models/L2IsolationDomain.java | 150 +- .../models/L2IsolationDomainPatch.java | 37 +- .../models/L2IsolationDomains.java | 108 +- .../models/L2IsolationDomainsListResult.java | 8 +- .../models/L3ExportRoutePolicy.java | 76 + .../models/L3IsolationDomain.java | 177 +- .../models/L3IsolationDomainPatch.java | 71 +- ...hPropertiesConnectedSubnetRoutePolicy.java | 66 - .../L3IsolationDomainPatchableProperties.java | 138 + .../models/L3IsolationDomains.java | 101 +- .../models/L3IsolationDomainsListResult.java | 8 +- ...operties.java => L3OptionAProperties.java} | 92 +- .../models/L3OptionBProperties.java | 106 + .../models/Layer2Configuration.java | 49 +- .../models/Layer3IpPrefixProperties.java | 62 +- .../models/Layer4Protocol.java | 47 + ...tworkConfigurationPatchableProperties.java | 84 + ...gementNetworkConfigurationProperties.java} | 33 +- .../models/NeighborAddress.java | 14 +- .../models/NeighborGroup.java | 284 + .../models/NeighborGroupDestination.java | 77 + .../models/NeighborGroupPatch.java | 99 + .../NeighborGroupPatchableProperties.java | 53 + .../models/NeighborGroups.java | 180 + .../models/NeighborGroupsListResult.java | 81 + .../models/NetworkDevice.java | 226 +- .../models/NetworkDevicePatchParameters.java | 45 +- .../NetworkDevicePatchableProperties.java | 17 +- .../models/NetworkDeviceRackRoleType.java | 56 - .../models/NetworkDeviceRole.java | 56 + .../models/NetworkDeviceRoleProperties.java | 102 - .../models/NetworkDeviceRoleTypes.java | 56 - .../models/NetworkDeviceSku.java | 11 +- .../models/NetworkDeviceSkus.java | 20 +- .../models/NetworkDeviceSkusListResult.java | 8 +- .../models/NetworkDevices.java | 193 +- .../models/NetworkFabric.java | 515 +- .../models/NetworkFabricController.java | 106 +- ...tworkFabricControllerOperationalState.java | 51 - .../models/NetworkFabricControllerPatch.java | 33 +- .../models/NetworkFabricControllers.java | 71 +- .../NetworkFabricControllersListResult.java | 8 +- .../models/NetworkFabricOperationalState.java | 62 - .../models/NetworkFabricPatch.java | 241 + .../models/NetworkFabricPatchParameters.java | 150 - .../NetworkFabricPatchableProperties.java | 196 +- ...PropertiesTerminalServerConfiguration.java | 154 + .../models/NetworkFabricSku.java | 28 +- .../models/NetworkFabricSkus.java | 24 +- .../models/NetworkFabricSkusListResult.java | 8 +- .../models/NetworkFabrics.java | 263 +- .../models/NetworkFabricsListResult.java | 8 +- .../models/NetworkInterface.java | 68 +- .../models/NetworkInterfaces.java | 71 +- .../models/NetworkPacketBroker.java | 262 + .../models/NetworkPacketBrokerPatch.java | 33 + .../models/NetworkPacketBrokers.java | 180 + .../NetworkPacketBrokersListResult.java | 81 + .../models/NetworkRack.java | 54 +- .../models/NetworkRackRoleName.java | 47 - .../models/NetworkRackSku.java | 89 - .../models/NetworkRackSkus.java | 63 - .../models/NetworkRackType.java | 50 + .../models/NetworkRacks.java | 16 +- .../models/NetworkRacksListResult.java | 8 +- .../models/NetworkTap.java | 394 ++ .../models/NetworkTapPatch.java | 123 + ...apPatchableParametersDestinationsItem.java | 61 + .../NetworkTapPropertiesDestinationsItem.java | 61 + .../models/NetworkTapRule.java | 484 ++ .../models/NetworkTapRuleAction.java | 159 + .../models/NetworkTapRuleMatchCondition.java | 103 + .../NetworkTapRuleMatchConfiguration.java | 161 + .../models/NetworkTapRulePatch.java | 170 + .../NetworkTapRulePatchableProperties.java | 137 + .../models/NetworkTapRules.java | 272 + ...lt.java => NetworkTapRulesListResult.java} | 28 +- .../models/NetworkTaps.java | 242 + .../models/NetworkTapsListResult.java | 81 + .../models/NetworkToNetworkInterconnect.java | 333 +- .../NetworkToNetworkInterconnectPatch.java | 223 + ...tPropertiesOptionBLayer3Configuration.java | 71 + .../models/NetworkToNetworkInterconnects.java | 120 +- .../NetworkToNetworkInterconnectsList.java | 2 +- .../managednetworkfabric/models/NfcSku.java | 50 + .../models/NpbStaticRouteConfiguration.java | 112 + .../models/OperationalStatus.java | 50 - .../models/OptionAProperties.java | 50 +- ...n.java => OptionBLayer3Configuration.java} | 84 +- .../models/OptionBProperties.java | 47 +- .../OptionBPropertiesAutoGenerated.java | 92 - .../models/PollingIntervalInSeconds.java | 53 + .../models/PollingType.java | 47 + .../models/PortCondition.java | 137 + .../models/PortGroupProperties.java | 77 + .../managednetworkfabric/models/PortType.java | 47 + .../models/PowerCycleState.java | 47 - .../managednetworkfabric/models/PowerEnd.java | 47 - .../models/PrefixType.java | 47 + .../models/ProvisioningState.java | 9 +- .../models/RebootProperties.java | 50 + .../models/RebootType.java | 53 + .../models/RoutePolicies.java | 89 + .../models/RoutePolicy.java | 162 +- .../models/RoutePolicyActionType.java | 50 + .../models/RoutePolicyConditionType.java | 47 + .../models/RoutePolicyPatch.java | 54 +- .../RoutePolicyStatementProperties.java | 2 +- .../models/RouteTargetInformation.java | 129 + .../models/RuleProperties.java | 90 + .../models/SourceDestinationType.java | 47 + .../managednetworkfabric/models/State.java | 47 - .../models/StatementActionProperties.java | 18 +- .../models/StatementConditionProperties.java | 26 + .../models/StaticRouteConfiguration.java | 16 +- .../models/StaticRouteProperties.java | 14 +- .../models/SupportPackageProperties.java | 24 - .../models/SupportedConnectorProperties.java | 6 +- .../models/SupportedVersionProperties.java | 53 +- ...{NetworkRackPatch.java => TagsUpdate.java} | 38 +- .../models/TapRuleActionType.java | 62 + .../models/TerminalServerConfiguration.java | 107 +- .../models/TerminalServerPatchParameters.java | 56 - .../models/UpdateAdministrativeState.java | 6 +- .../UpdateDeviceAdministrativeState.java | 60 + .../models/UpdatePowerCycleProperties.java | 91 - .../models/UpdateVersion.java | 50 + .../models/UpdateVersionProperties.java | 59 - .../models/ValidateAction.java | 50 + .../ValidateConfigurationProperties.java | 50 + .../models/ValidateConfigurationResponse.java | 32 + .../models/VlanGroupProperties.java | 77 + .../models/VlanMatchCondition.java | 103 + .../VpnConfigurationPatchableProperties.java | 136 + ...nPatchablePropertiesOptionAProperties.java | 159 + .../models/VpnConfigurationProperties.java | 54 +- ...figurationPropertiesOptionAProperties.java | 158 + .../models/WorkloadServices.java | 80 - .../AccessControlListsCreateSamples.java | 121 +- .../AccessControlListsDeleteSamples.java | 10 +- ...ControlListsGetByResourceGroupSamples.java | 8 +- ...ontrolListsListByResourceGroupSamples.java | 8 +- .../AccessControlListsListSamples.java | 6 +- .../AccessControlListsResyncSamples.java | 21 + ...ListsUpdateAdministrativeStateSamples.java | 31 + .../AccessControlListsUpdateSamples.java | 117 +- ...trolListsValidateConfigurationSamples.java | 23 + ...xternalNetworksClearArpEntriesSamples.java | 35 - ...rnalNetworksClearIpv6NeighborsSamples.java | 35 - .../ExternalNetworksCreateSamples.java | 44 +- .../ExternalNetworksDeleteSamples.java | 5 +- .../generated/ExternalNetworksGetSamples.java | 5 +- ...etworksListByL3IsolationDomainSamples.java | 23 + ...worksUpdateAdministrativeStateSamples.java | 15 +- ...teBfdForBgpAdministrativeStateSamples.java | 37 - ...ksUpdateBgpAdministrativeStateSamples.java | 37 - .../ExternalNetworksUpdateSamples.java | 52 +- ...ticRouteBfdAdministrativeStateSamples.java | 32 + ...nternalNetworksClearArpEntriesSamples.java | 35 - ...rnalNetworksClearIpv6NeighborsSamples.java | 35 - .../InternalNetworksCreateSamples.java | 77 +- .../InternalNetworksDeleteSamples.java | 5 +- .../generated/InternalNetworksGetSamples.java | 4 +- ...etworksListByL3IsolationDomainSamples.java | 23 + ...worksUpdateAdministrativeStateSamples.java | 15 +- ...teBfdForBgpAdministrativeStateSamples.java | 37 - ...StaticRouteAdministrativeStateSamples.java | 37 - ...ksUpdateBgpAdministrativeStateSamples.java | 17 +- .../InternalNetworksUpdateSamples.java | 69 +- ...ticRouteBfdAdministrativeStateSamples.java | 32 + .../InternetGatewayRulesCreateSamples.java | 47 + ...=> InternetGatewayRulesDeleteSamples.java} | 14 +- ...GatewayRulesGetByResourceGroupSamples.java | 24 + ...atewayRulesListByResourceGroupSamples.java | 23 + .../InternetGatewayRulesListSamples.java | 21 + .../InternetGatewayRulesUpdateSamples.java | 42 + .../InternetGatewaysCreateSamples.java | 48 + .../InternetGatewaysDeleteSamples.java | 21 + ...rnetGatewaysGetByResourceGroupSamples.java | 23 + ...netGatewaysListByResourceGroupSamples.java | 21 + ....java => InternetGatewaysListSamples.java} | 12 +- .../InternetGatewaysUpdateSamples.java | 47 + .../generated/IpCommunitiesCreateSamples.java | 26 +- .../generated/IpCommunitiesDeleteSamples.java | 4 +- ...pCommunitiesGetByResourceGroupSamples.java | 5 +- ...CommunitiesListByResourceGroupSamples.java | 4 +- .../generated/IpCommunitiesListSamples.java | 2 +- .../generated/IpCommunitiesUpdateSamples.java | 34 +- .../IpExtendedCommunitiesCreateSamples.java | 22 +- .../IpExtendedCommunitiesDeleteSamples.java | 4 +- ...dCommunitiesGetByResourceGroupSamples.java | 4 +- ...CommunitiesListByResourceGroupSamples.java | 6 +- .../IpExtendedCommunitiesListSamples.java | 2 +- .../IpExtendedCommunitiesUpdateSamples.java | 19 +- .../generated/IpPrefixesCreateSamples.java | 22 +- .../generated/IpPrefixesDeleteSamples.java | 4 +- .../IpPrefixesGetByResourceGroupSamples.java | 4 +- .../IpPrefixesListByResourceGroupSamples.java | 4 +- .../generated/IpPrefixesListSamples.java | 2 +- .../generated/IpPrefixesUpdateSamples.java | 24 +- ...2IsolationDomainsClearArpTableSamples.java | 34 - ...ationDomainsClearNeighborTableSamples.java | 34 - ...ionDomainsCommitConfigurationSamples.java} | 12 +- .../L2IsolationDomainsCreateSamples.java | 22 +- .../L2IsolationDomainsDeleteSamples.java | 4 +- ...ationDomainsGetByResourceGroupSamples.java | 5 +- ...tionDomainsListByResourceGroupSamples.java | 4 +- .../L2IsolationDomainsListSamples.java | 2 +- ...mainsUpdateAdministrativeStateSamples.java | 15 +- .../L2IsolationDomainsUpdateSamples.java | 20 +- ...onDomainsValidateConfigurationSamples.java | 23 + ...3IsolationDomainsClearArpTableSamples.java | 34 - ...ationDomainsClearNeighborTableSamples.java | 30 - ...tionDomainsCommitConfigurationSamples.java | 23 + .../L3IsolationDomainsCreateSamples.java | 37 +- .../L3IsolationDomainsDeleteSamples.java | 4 +- ...ationDomainsGetByResourceGroupSamples.java | 4 +- ...tionDomainsListByResourceGroupSamples.java | 4 +- .../L3IsolationDomainsListSamples.java | 2 +- ...mainsUpdateAdministrativeStateSamples.java | 13 +- ...dateOptionBAdministrativeStateSamples.java | 36 - .../L3IsolationDomainsUpdateSamples.java | 34 +- ...onDomainsValidateConfigurationSamples.java | 23 + .../NeighborGroupsCreateSamples.java | 59 + ....java => NeighborGroupsDeleteSamples.java} | 12 +- ...ighborGroupsGetByResourceGroupSamples.java | 23 + ...ghborGroupsListByResourceGroupSamples.java | 21 + ...es.java => NeighborGroupsListSamples.java} | 12 +- .../NeighborGroupsUpdateSamples.java | 62 + .../NetworkDeviceSkusGetSamples.java | 4 +- .../NetworkDeviceSkusListSamples.java | 2 +- .../NetworkDevicesCreateSamples.java | 20 +- .../NetworkDevicesDeleteSamples.java | 4 +- ...kDevicesGenerateSupportPackageSamples.java | 23 - ...tworkDevicesGetByResourceGroupSamples.java | 4 +- ...DevicesGetDynamicInterfaceMapsSamples.java | 23 - ...kDevicesGetStaticInterfaceMapsSamples.java | 23 - ...workDevicesListByResourceGroupSamples.java | 4 +- .../generated/NetworkDevicesListSamples.java | 2 +- .../NetworkDevicesRebootSamples.java | 15 +- ...orkDevicesRefreshConfigurationSamples.java | 21 + ...vicesUpdateAdministrativeStateSamples.java | 33 + ...NetworkDevicesUpdatePowerCycleSamples.java | 31 - .../NetworkDevicesUpdateSamples.java | 13 +- ...java => NetworkDevicesUpgradeSamples.java} | 20 +- ...NetworkFabricControllersCreateSamples.java | 17 +- ...NetworkFabricControllersDeleteSamples.java | 4 +- ...sableWorkloadManagementNetworkSamples.java | 24 - ...nableWorkloadManagementNetworkSamples.java | 24 - ...cControllersGetByResourceGroupSamples.java | 4 +- ...ControllersListByResourceGroupSamples.java | 4 +- .../NetworkFabricControllersListSamples.java | 2 +- ...NetworkFabricControllersUpdateSamples.java | 13 +- .../NetworkFabricSkusGetSamples.java | 4 +- .../NetworkFabricSkusListSamples.java | 2 +- ...workFabricsCommitConfigurationSamples.java | 21 + .../NetworkFabricsCreateSamples.java | 94 +- .../NetworkFabricsDeleteSamples.java | 6 +- .../NetworkFabricsDeprovisionSamples.java | 4 +- ...tworkFabricsGetByResourceGroupSamples.java | 4 +- ... => NetworkFabricsGetTopologySamples.java} | 12 +- ...workFabricsListByResourceGroupSamples.java | 4 +- .../generated/NetworkFabricsListSamples.java | 2 +- .../NetworkFabricsProvisionSamples.java | 4 +- ...orkFabricsRefreshConfigurationSamples.java | 21 + ...nfraManagementBfdConfigurationSamples.java | 31 + .../NetworkFabricsUpdateSamples.java | 87 +- ...loadManagementBfdConfigurationSamples.java | 31 + .../NetworkFabricsUpgradeSamples.java | 29 + ...rkFabricsValidateConfigurationSamples.java | 30 + .../NetworkInterfacesCreateSamples.java | 8 +- .../NetworkInterfacesDeleteSamples.java | 6 +- .../NetworkInterfacesGetSamples.java | 5 +- ...InterfacesListByNetworkDeviceSamples.java} | 13 +- ...facesUpdateAdministrativeStateSamples.java | 15 +- .../NetworkInterfacesUpdateSamples.java | 7 +- .../NetworkPacketBrokersCreateSamples.java | 43 + .../NetworkPacketBrokersDeleteSamples.java | 23 + ...acketBrokersGetByResourceGroupSamples.java | 24 + ...cketBrokersListByResourceGroupSamples.java | 21 + .../NetworkPacketBrokersListSamples.java | 21 + .../NetworkPacketBrokersUpdateSamples.java | 42 + .../generated/NetworkRacksCreateSamples.java | 15 +- .../generated/NetworkRacksDeleteSamples.java | 4 +- ...NetworkRacksGetByResourceGroupSamples.java | 4 +- ...etworkRacksListByResourceGroupSamples.java | 4 +- .../generated/NetworkRacksListSamples.java | 2 +- .../generated/NetworkRacksUpdateSamples.java | 19 +- .../NetworkTapRulesCreateSamples.java | 132 + .../NetworkTapRulesDeleteSamples.java | 21 + ...workTapRulesGetByResourceGroupSamples.java | 23 + ...orkTapRulesListByResourceGroupSamples.java | 21 + ...s.java => NetworkTapRulesListSamples.java} | 12 +- .../NetworkTapRulesResyncSamples.java | 21 + ...RulesUpdateAdministrativeStateSamples.java | 31 + .../NetworkTapRulesUpdateSamples.java | 130 + ...kTapRulesValidateConfigurationSamples.java | 23 + .../generated/NetworkTapsCreateSamples.java | 68 + .../generated/NetworkTapsDeleteSamples.java | 21 + .../NetworkTapsGetByResourceGroupSamples.java | 23 + ...etworkTapsListByResourceGroupSamples.java} | 12 +- .../generated/NetworkTapsListSamples.java | 21 + .../generated/NetworkTapsResyncSamples.java | 21 + ...kTapsUpdateAdministrativeStateSamples.java | 31 + .../generated/NetworkTapsUpdateSamples.java | 69 + ...rkToNetworkInterconnectsCreateSamples.java | 78 +- ...rkToNetworkInterconnectsDeleteSamples.java | 4 +- ...tworkToNetworkInterconnectsGetSamples.java | 4 +- ...terconnectsListByNetworkFabricSamples.java | 23 + ...workToNetworkInterconnectsListSamples.java | 23 - ...nectsUpdateAdministrativeStateSamples.java | 32 + ...eNpbStaticRouteBfdAdministrativeState.java | 32 + ...rkToNetworkInterconnectsUpdateSamples.java | 84 + .../generated/OperationsListSamples.java | 2 +- ...utePoliciesCommitConfigurationSamples.java | 23 + .../generated/RoutePoliciesCreateSamples.java | 42 +- .../generated/RoutePoliciesDeleteSamples.java | 4 +- ...outePoliciesGetByResourceGroupSamples.java | 4 +- ...utePoliciesListByResourceGroupSamples.java | 4 +- .../generated/RoutePoliciesListSamples.java | 2 +- ...iciesUpdateAdministrativeStateSamples.java | 31 + .../generated/RoutePoliciesUpdateSamples.java | 83 +- ...ePoliciesValidateConfigurationSamples.java | 23 + ...ssControlListConditionPropertiesTests.java | 52 - .../AccessControlListInnerTests.java | 102 - ...AccessControlListPatchPropertiesTests.java | 74 - .../AccessControlListPatchTests.java | 90 - .../AccessControlListPropertiesTests.java | 65 - ...ntrolListsCreateWithResponseMockTests.java | 103 - ...eByResourceGroupWithResponseMockTests.java | 63 - ...tByResourceGroupWithResponseMockTests.java | 74 - ...trolListsListByResourceGroupMockTests.java | 72 - .../AccessControlListsListMockTests.java | 71 - .../AccessControlListsListResultTests.java | 95 - .../ActionIpCommunityPropertiesTests.java | 41 - ...ionIpExtendedCommunityPropertiesTests.java | 44 - .../AggregateRouteConfigurationTests.java | 40 - .../generated/AggregateRouteTests.java | 25 - .../generated/AnnotationResourceTests.java | 25 - .../generated/ArpPropertiesInnerTests.java | 42 - .../generated/BfdConfigurationTests.java | 24 - .../generated/BgpConfigurationTests.java | 72 - .../generated/ConnectedSubnetTests.java | 29 - .../DeviceInterfacePropertiesTests.java | 50 - .../generated/DeviceLimitsTests.java | 45 - .../EnableDisableOnResourcesTests.java | 29 - .../generated/ExternalNetworkInnerTests.java | 74 - .../ExternalNetworkPatchPropertiesTests.java | 76 - .../generated/ExternalNetworkPatchTests.java | 74 - ...ternalNetworkPatchablePropertiesTests.java | 73 - ...tworkPropertiesOptionAPropertiesTests.java | 50 - .../ExternalNetworkPropertiesTests.java | 76 - .../ExternalNetworksCreateMockTests.java | 102 - .../ExternalNetworksDeleteMockTests.java | 63 - ...ernalNetworksGetWithResponseMockTests.java | 81 - .../ExternalNetworksListMockTests.java | 79 - .../generated/ExternalNetworksListTests.java | 54 - .../FabricBfdConfigurationTests.java | 24 - .../GetDeviceStatusPropertiesInnerTests.java | 37 - ...InterfaceMapsPropertiesItemInnerTests.java | 42 - ...InterfaceMapsPropertiesItemInnerTests.java | 51 - .../InfrastructureServicesTests.java | 34 - .../generated/InterfaceStatusInnerTests.java | 39 - .../generated/InternalNetworkInnerTests.java | 91 - .../InternalNetworkPatchPropertiesTests.java | 128 - .../generated/InternalNetworkPatchTests.java | 92 - ...ternalNetworkPatchablePropertiesTests.java | 125 - .../InternalNetworkPropertiesTests.java | 132 - .../InternalNetworksCreateMockTests.java | 105 - .../InternalNetworksDeleteMockTests.java | 61 - ...ernalNetworksGetWithResponseMockTests.java | 81 - .../InternalNetworksListMockTests.java | 82 - .../generated/InternalNetworksListTests.java | 77 - .../IpCommunitiesCreateMockTests.java | 103 - .../IpCommunitiesDeleteMockTests.java | 61 - ...tByResourceGroupWithResponseMockTests.java | 77 - ...mmunitiesListByResourceGroupMockTests.java | 75 - .../generated/IpCommunitiesListMockTests.java | 75 - .../IpCommunitiesListResultTests.java | 95 - ...pCommunityAddOperationPropertiesTests.java | 31 - ...mmunityDeleteOperationPropertiesTests.java | 33 - .../generated/IpCommunityIdListTests.java | 26 - .../generated/IpCommunityInnerTests.java | 61 - .../generated/IpCommunityPatchTests.java | 41 - .../generated/IpCommunityPropertiesTests.java | 42 - ...pCommunitySetOperationPropertiesTests.java | 31 - .../IpExtendedCommunitiesCreateMockTests.java | 95 - .../IpExtendedCommunitiesDeleteMockTests.java | 61 - ...tByResourceGroupWithResponseMockTests.java | 75 - ...mmunitiesListByResourceGroupMockTests.java | 73 - .../IpExtendedCommunitiesListMockTests.java | 73 - ...dCommunityAddOperationPropertiesTests.java | 33 - ...mmunityDeleteOperationPropertiesTests.java | 33 - .../IpExtendedCommunityIdListTests.java | 30 - .../IpExtendedCommunityInnerTests.java | 57 - .../IpExtendedCommunityListResultTests.java | 78 - .../IpExtendedCommunityPatchTests.java | 41 - .../IpExtendedCommunityPropertiesTests.java | 38 - ...dCommunitySetOperationPropertiesTests.java | 31 - .../generated/IpPrefixInnerTests.java | 78 - .../generated/IpPrefixPatchTests.java | 38 - ...refixPropertiesIpPrefixRulesItemTests.java | 44 - .../generated/IpPrefixPropertiesTests.java | 59 - .../generated/IpPrefixesCreateMockTests.java | 100 - .../generated/IpPrefixesDeleteMockTests.java | 61 - ...tByResourceGroupWithResponseMockTests.java | 72 - ...pPrefixesListByResourceGroupMockTests.java | 70 - .../generated/IpPrefixesListMockTests.java | 69 - .../generated/IpPrefixesListResultTests.java | 66 - .../L2IsolationDomainInnerTests.java | 67 - ...L2IsolationDomainPatchPropertiesTests.java | 30 - .../L2IsolationDomainPatchTests.java | 49 - .../L2IsolationDomainPropertiesTests.java | 39 - .../L2IsolationDomainsCreateMockTests.java | 95 - .../L2IsolationDomainsDeleteMockTests.java | 61 - ...tByResourceGroupWithResponseMockTests.java | 75 - ...onDomainsListByResourceGroupMockTests.java | 73 - .../L2IsolationDomainsListMockTests.java | 72 - .../L2IsolationDomainsListResultTests.java | 76 - .../L3IsolationDomainInnerTests.java | 73 - ...ertiesConnectedSubnetRoutePolicyTests.java | 28 - ...L3IsolationDomainPatchPropertiesTests.java | 64 - .../L3IsolationDomainPatchTests.java | 63 - .../L3IsolationDomainPropertiesTests.java | 71 - .../L3IsolationDomainsCreateMockTests.java | 117 - .../L3IsolationDomainsDeleteMockTests.java | 61 - ...tByResourceGroupWithResponseMockTests.java | 79 - ...onDomainsListByResourceGroupMockTests.java | 78 - .../L3IsolationDomainsListMockTests.java | 78 - .../L3IsolationDomainsListResultTests.java | 88 - .../generated/Layer2ConfigurationTests.java | 29 - .../generated/Layer3ConfigurationTests.java | 51 - .../Layer3IpPrefixPropertiesTests.java | 39 - .../Layer3OptionAPropertiesTests.java | 50 - ...anagedResourceGroupConfigurationTests.java | 30 - .../ManagementNetworkConfigurationTests.java | 131 - .../generated/NeighborAddressTests.java | 27 - .../generated/NetworkDeviceInnerTests.java | 62 - ...kDevicePatchParametersPropertiesTests.java | 36 - .../NetworkDevicePatchParametersTests.java | 52 - ...NetworkDevicePatchablePropertiesTests.java | 30 - .../NetworkDevicePropertiesTests.java | 43 - .../NetworkDeviceRolePropertiesTests.java | 36 - .../generated/NetworkDeviceSkuInnerTests.java | 111 - .../NetworkDeviceSkuPropertiesTests.java | 111 - ...orkDeviceSkusGetWithResponseMockTests.java | 76 - .../NetworkDeviceSkusListMockTests.java | 77 - .../NetworkDeviceSkusListResultTests.java | 45 - .../NetworkDevicesCreateMockTests.java | 98 - .../NetworkDevicesDeleteMockTests.java | 61 - ...tByResourceGroupWithResponseMockTests.java | 77 - ...rkDevicesListByResourceGroupMockTests.java | 75 - .../NetworkDevicesListMockTests.java | 74 - .../NetworkDevicesListResultTests.java | 88 - ...tworkFabricControllersCreateMockTests.java | 101 - ...tworkFabricControllersDeleteMockTests.java | 61 - ...tByResourceGroupWithResponseMockTests.java | 76 - ...ntrollersListByResourceGroupMockTests.java | 74 - ...NetworkFabricControllersListMockTests.java | 74 - ...tworkFabricControllersListResultTests.java | 66 - ...NetworkFabricPatchablePropertiesTests.java | 25 - .../generated/NetworkFabricSkuInnerTests.java | 28 - .../NetworkFabricSkuPropertiesTests.java | 28 - ...orkFabricSkusGetWithResponseMockTests.java | 67 - .../NetworkFabricSkusListMockTests.java | 67 - .../NetworkFabricSkusListResultTests.java | 39 - .../NetworkFabricsDeleteMockTests.java | 61 - .../NetworkFabricsListResultTests.java | 90 - .../generated/NetworkInterfaceInnerTests.java | 28 - .../NetworkInterfacePatchPropertiesTests.java | 27 - .../generated/NetworkInterfacePatchTests.java | 25 - .../NetworkInterfacePropertiesTests.java | 28 - .../NetworkInterfacesCreateMockTests.java | 72 - .../NetworkInterfacesDeleteMockTests.java | 61 - ...orkInterfacesGetWithResponseMockTests.java | 70 - .../NetworkInterfacesListMockTests.java | 68 - .../generated/NetworkInterfacesListTests.java | 40 - .../generated/NetworkRackInnerTests.java | 55 - .../generated/NetworkRackPatchTests.java | 44 - .../generated/NetworkRackPropertiesTests.java | 36 - .../generated/NetworkRackSkuInnerTests.java | 60 - .../NetworkRackSkuPropertiesTests.java | 68 - ...tworkRackSkusGetWithResponseMockTests.java | 71 - .../NetworkRackSkusListMockTests.java | 71 - .../NetworkRackSkusListResultTests.java | 50 - .../NetworkRacksCreateMockTests.java | 94 - ...tByResourceGroupWithResponseMockTests.java | 74 - ...workRacksListByResourceGroupMockTests.java | 72 - .../generated/NetworkRacksListMockTests.java | 71 - .../NetworkRacksListResultTests.java | 85 - ...etworkToNetworkInterconnectInnerTests.java | 71 - ...kToNetworkInterconnectPropertiesTests.java | 71 - ...ToNetworkInterconnectsCreateMockTests.java | 101 - ...ToNetworkInterconnectsDeleteMockTests.java | 63 - ...InterconnectsGetWithResponseMockTests.java | 84 - ...rkToNetworkInterconnectsListMockTests.java | 84 - ...etworkToNetworkInterconnectsListTests.java | 51 - .../generated/OperationDisplayTests.java | 25 - .../generated/OperationInnerTests.java | 26 - .../generated/OperationListResultTests.java | 25 - .../generated/OperationsListMockTests.java | 64 - .../generated/OptionAPropertiesTests.java | 50 - .../OptionBPropertiesAutoGeneratedTests.java | 34 - .../generated/OptionBPropertiesTests.java | 34 - .../RoutePoliciesCreateMockTests.java | 100 - .../RoutePoliciesDeleteMockTests.java | 61 - ...tByResourceGroupWithResponseMockTests.java | 72 - ...ePoliciesListByResourceGroupMockTests.java | 70 - .../generated/RoutePoliciesListMockTests.java | 69 - .../RoutePoliciesListResultTests.java | 83 - .../generated/RoutePolicyInnerTests.java | 73 - .../generated/RoutePolicyPatchTests.java | 43 - .../generated/RoutePolicyPropertiesTests.java | 60 - .../RoutePolicyStatementPropertiesTests.java | 60 - .../StatementActionPropertiesTests.java | 79 - .../StatementConditionPropertiesTests.java | 37 - .../StaticRouteConfigurationTests.java | 60 - .../generated/StaticRoutePropertiesTests.java | 31 - .../SupportPackagePropertiesInnerTests.java | 25 - .../SupportedConnectorPropertiesTests.java | 30 - .../SupportedVersionPropertiesTests.java | 44 - .../UpdateAdministrativeStateTests.java | 34 - .../UpdatePowerCyclePropertiesTests.java | 32 - .../UpdateVersionPropertiesTests.java | 25 - .../VpnConfigurationPropertiesTests.java | 67 - .../generated/WorkloadServicesTests.java | 34 - 814 files changed, 57591 insertions(+), 34591 deletions(-) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewayRulesClient.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewaysClient.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NeighborGroupsClient.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkPacketBrokersClient.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkRackSkusClient.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapRulesClient.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapsClient.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ArpPropertiesInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceUpdateInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForStateUpdateInner.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/GetDeviceStatusPropertiesInner.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/GetDynamicInterfaceMapsPropertiesItemInner.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/GetStaticInterfaceMapsPropertiesItemInner.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InterfaceStatusInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayPatchableProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityPatchableProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricPatchParametersProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricPatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackSkuInner.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackSkuProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapPatchableParameters.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRulePatchProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectPatchableProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyPatchableProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/SupportPackagePropertiesInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ValidateConfigurationResponseInner.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceUpdateImpl.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/{SupportPackagePropertiesImpl.java => CommonPostActionResponseForStateUpdateImpl.java} (52%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/GetDeviceStatusPropertiesImpl.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/GetDynamicInterfaceMapsPropertiesItemImpl.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/GetStaticInterfaceMapsPropertiesItemImpl.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InterfaceStatusImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRuleImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesClientImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysClientImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsClientImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokerImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersClientImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersImpl.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackSkuImpl.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackSkusClientImpl.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackSkusImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRuleImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesClientImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsClientImpl.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsImpl.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/{ArpPropertiesImpl.java => ValidateConfigurationResponseImpl.java} (52%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListAction.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListConditionProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchCondition.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfiguration.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatchableProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortCondition.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclActionType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Action.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AddressFamily.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AddressFamilyType.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArpProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdAdministrativeState.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfiguration.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonMatchConditions.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceUpdate.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForStateUpdate.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConditionActionType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationState.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetRoutePolicy.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/{InfrastructureServices.java => ControllerServices.java} (82%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceAdministrativeState.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceLimits.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableState.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnabledDisabledState.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Encapsulation.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EncapsulationType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicy.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformation.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Extension.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtensionEnumProperty.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchPropertiesOptionAProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricBfdConfiguration.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricSkuType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GatewayType.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetDeviceStatusProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetDynamicInterfaceMapsPropertiesItem.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetStaticInterfaceMapsPropertiesItem.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicy.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformation.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InterfaceStatus.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesBgpConfiguration.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesStaticRouteConfiguration.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateway.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRule.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulePatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRules.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulesListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateways.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewaysListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpAddressType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityRule.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatchableProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityRule.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchCondition.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatchableProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/{IpPrefixPropertiesIpPrefixRulesItem.java => IpPrefixRule.java} (72%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsCurrentVersion.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsManagementType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsMonitoringEnabled.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsTestVersion.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsWorkloadManagementNetworkEnabled.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicy.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatchableProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/{Layer3OptionAProperties.java => L3OptionAProperties.java} (58%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer4Protocol.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationPatchableProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/{ManagementNetworkConfiguration.java => ManagementNetworkConfigurationProperties.java} (69%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroup.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestination.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatchableProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroups.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupsListResult.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRackRoleType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRole.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleTypes.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerOperationalState.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricOperationalState.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatch.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchParameters.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchablePropertiesTerminalServerConfiguration.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBroker.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokerPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokers.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokersListResult.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackRoleName.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackSku.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackSkus.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTap.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatchableParametersDestinationsItem.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPropertiesDestinationsItem.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRule.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleAction.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchCondition.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfiguration.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatchableProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRules.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/{NetworkRackSkusListResult.java => NetworkTapRulesListResult.java} (67%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTaps.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapsListResult.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPatch.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NfcSku.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfiguration.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationalStatus.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/{Layer3Configuration.java => OptionBLayer3Configuration.java} (50%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBPropertiesAutoGenerated.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingIntervalInSeconds.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortCondition.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortType.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PowerCycleState.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PowerEnd.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyActionType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyConditionType.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetInformation.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SourceDestinationType.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/State.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportPackageProperties.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/{NetworkRackPatch.java => TagsUpdate.java} (54%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TapRuleActionType.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchParameters.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateDeviceAdministrativeState.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdatePowerCycleProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateVersion.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateVersionProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateAction.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationResponse.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchCondition.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchableProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchablePropertiesOptionAProperties.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPropertiesOptionAProperties.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/WorkloadServices.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsResyncSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsUpdateAdministrativeStateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsValidateConfigurationSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksClearArpEntriesSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksClearIpv6NeighborsSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListByL3IsolationDomainSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateBfdForBgpAdministrativeStateSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateBgpAdministrativeStateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksClearArpEntriesSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksClearIpv6NeighborsSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListByL3IsolationDomainSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBfdForBgpAdministrativeStateSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBfdForStaticRouteAdministrativeStateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesCreateSamples.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/{NetworkDevicesRestoreConfigSamples.java => InternetGatewayRulesDeleteSamples.java} (50%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesGetByResourceGroupSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListByResourceGroupSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesUpdateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysCreateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysDeleteSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysGetByResourceGroupSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListByResourceGroupSamples.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/{InternalNetworksListSamples.java => InternetGatewaysListSamples.java} (52%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysUpdateSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsClearArpTableSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsClearNeighborTableSamples.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/{L2IsolationDomainsGetArpEntriesSamples.java => L2IsolationDomainsCommitConfigurationSamples.java} (51%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsValidateConfigurationSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsClearArpTableSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsClearNeighborTableSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCommitConfigurationSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateOptionBAdministrativeStateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsValidateConfigurationSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsCreateSamples.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/{ExternalNetworksListSamples.java => NeighborGroupsDeleteSamples.java} (52%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsGetByResourceGroupSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListByResourceGroupSamples.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/{NetworkRackSkusGetSamples.java => NeighborGroupsListSamples.java} (53%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsUpdateSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGenerateSupportPackageSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetDynamicInterfaceMapsSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetStaticInterfaceMapsSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRefreshConfigurationSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateAdministrativeStateSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdatePowerCycleSamples.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/{NetworkDevicesUpdateVersionSamples.java => NetworkDevicesUpgradeSamples.java} (53%) delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDisableWorkloadManagementNetworkSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersEnableWorkloadManagementNetworkSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCommitConfigurationSamples.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/{NetworkInterfacesListSamples.java => NetworkFabricsGetTopologySamples.java} (51%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsRefreshConfigurationSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateInfraManagementBfdConfigurationSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateWorkloadManagementBfdConfigurationSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpgradeSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsValidateConfigurationSamples.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/{NetworkInterfacesGetStatusSamples.java => NetworkInterfacesListByNetworkDeviceSamples.java} (51%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersDeleteSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersGetByResourceGroupSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListByResourceGroupSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersUpdateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesCreateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesDeleteSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesGetByResourceGroupSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListByResourceGroupSamples.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/{NetworkRackSkusListSamples.java => NetworkTapRulesListSamples.java} (55%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesResyncSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesUpdateAdministrativeStateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesUpdateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesValidateConfigurationSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsCreateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsDeleteSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsGetByResourceGroupSamples.java rename sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/{NetworkDevicesGetStatusSamples.java => NetworkTapsListByResourceGroupSamples.java} (51%) create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsResyncSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsUpdateAdministrativeStateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsUpdateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListByNetworkFabricSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateAdministrativeStateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeState.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCommitConfigurationSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesUpdateAdministrativeStateSamples.java create mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesValidateConfigurationSamples.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListConditionPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsDeleteByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListByResourceGroupMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpCommunityPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpExtendedCommunityPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRouteConfigurationTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRouteTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AnnotationResourceTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ArpPropertiesInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BfdConfigurationTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BgpConfigurationTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceInterfacePropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceLimitsTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/EnableDisableOnResourcesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchablePropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPropertiesOptionAPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksDeleteMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksGetWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FabricBfdConfigurationTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GetDeviceStatusPropertiesInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GetDynamicInterfaceMapsPropertiesItemInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GetStaticInterfaceMapsPropertiesItemInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InfrastructureServicesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InterfaceStatusInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchablePropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksDeleteMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksGetWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesDeleteMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListByResourceGroupMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityAddOperationPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityDeleteOperationPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityIdListTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitySetOperationPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesDeleteMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListByResourceGroupMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityAddOperationPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityDeleteOperationPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityIdListTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitySetOperationPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPropertiesIpPrefixRulesItemTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesCreateMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesDeleteMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListByResourceGroupMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPatchPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCreateMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsDeleteMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListByResourceGroupMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicyTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCreateMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsDeleteMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListByResourceGroupMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer2ConfigurationTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3ConfigurationTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3IpPrefixPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3OptionAPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedResourceGroupConfigurationTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchParametersPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchParametersTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchablePropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceRolePropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusGetWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesCreateMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesDeleteMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListByResourceGroupMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersCreateMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDeleteMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListByResourceGroupMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricPatchablePropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeleteMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfaceInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePatchPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesDeleteMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkuInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkuPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusGetWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksCreateMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListByResourceGroupMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsCreateMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsDeleteMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsGetWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationDisplayTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationsListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionAPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBPropertiesAutoGeneratedTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCreateMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesDeleteMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListByResourceGroupMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListMockTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListResultTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPatchTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyStatementPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementActionPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementConditionPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteConfigurationTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportPackagePropertiesInnerTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportedConnectorPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportedVersionPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateAdministrativeStateTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdatePowerCyclePropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateVersionPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPropertiesTests.java delete mode 100644 sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/WorkloadServicesTests.java diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/CHANGELOG.md b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/CHANGELOG.md index f69aeff04567a..eaf950b7fd833 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/CHANGELOG.md +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2023-07-06) + +- Azure Resource Manager Managed Network Fabric client library for Java. This package contains Microsoft Azure SDK for Managed Network Fabric Management SDK. Self service experience for Azure Network Fabric API. Package tag package-2023-06-15. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/README.md b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/README.md index ed47b5c3f01ff..b42b727c41c74 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/README.md +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Managed Network Fabric client library for Java. -This package contains Microsoft Azure SDK for Managed Network Fabric Management SDK. Self service experience for Azure Network Fabric API. Package tag package-2023-02-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Managed Network Fabric Management SDK. Self service experience for Azure Network Fabric API. Package tag package-2023-06-15. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-managednetworkfabric - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/SAMPLE.md b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/SAMPLE.md index 1aedf68c91c69..4ec5c98ca716a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/SAMPLE.md +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/SAMPLE.md @@ -8,34 +8,49 @@ - [GetByResourceGroup](#accesscontrollists_getbyresourcegroup) - [List](#accesscontrollists_list) - [ListByResourceGroup](#accesscontrollists_listbyresourcegroup) +- [Resync](#accesscontrollists_resync) - [Update](#accesscontrollists_update) +- [UpdateAdministrativeState](#accesscontrollists_updateadministrativestate) +- [ValidateConfiguration](#accesscontrollists_validateconfiguration) ## ExternalNetworks -- [ClearArpEntries](#externalnetworks_cleararpentries) -- [ClearIpv6Neighbors](#externalnetworks_clearipv6neighbors) - [Create](#externalnetworks_create) - [Delete](#externalnetworks_delete) - [Get](#externalnetworks_get) -- [List](#externalnetworks_list) +- [ListByL3IsolationDomain](#externalnetworks_listbyl3isolationdomain) - [Update](#externalnetworks_update) - [UpdateAdministrativeState](#externalnetworks_updateadministrativestate) -- [UpdateBfdForBgpAdministrativeState](#externalnetworks_updatebfdforbgpadministrativestate) -- [UpdateBgpAdministrativeState](#externalnetworks_updatebgpadministrativestate) +- [UpdateStaticRouteBfdAdministrativeState](#externalnetworks_updatestaticroutebfdadministrativestate) ## InternalNetworks -- [ClearArpEntries](#internalnetworks_cleararpentries) -- [ClearIpv6Neighbors](#internalnetworks_clearipv6neighbors) - [Create](#internalnetworks_create) - [Delete](#internalnetworks_delete) - [Get](#internalnetworks_get) -- [List](#internalnetworks_list) +- [ListByL3IsolationDomain](#internalnetworks_listbyl3isolationdomain) - [Update](#internalnetworks_update) - [UpdateAdministrativeState](#internalnetworks_updateadministrativestate) -- [UpdateBfdForBgpAdministrativeState](#internalnetworks_updatebfdforbgpadministrativestate) -- [UpdateBfdForStaticRouteAdministrativeState](#internalnetworks_updatebfdforstaticrouteadministrativestate) - [UpdateBgpAdministrativeState](#internalnetworks_updatebgpadministrativestate) +- [UpdateStaticRouteBfdAdministrativeState](#internalnetworks_updatestaticroutebfdadministrativestate) + +## InternetGatewayRules + +- [Create](#internetgatewayrules_create) +- [Delete](#internetgatewayrules_delete) +- [GetByResourceGroup](#internetgatewayrules_getbyresourcegroup) +- [List](#internetgatewayrules_list) +- [ListByResourceGroup](#internetgatewayrules_listbyresourcegroup) +- [Update](#internetgatewayrules_update) + +## InternetGateways + +- [Create](#internetgateways_create) +- [Delete](#internetgateways_delete) +- [GetByResourceGroup](#internetgateways_getbyresourcegroup) +- [List](#internetgateways_list) +- [ListByResourceGroup](#internetgateways_listbyresourcegroup) +- [Update](#internetgateways_update) ## IpCommunities @@ -66,21 +81,19 @@ ## L2IsolationDomains -- [ClearArpTable](#l2isolationdomains_cleararptable) -- [ClearNeighborTable](#l2isolationdomains_clearneighbortable) +- [CommitConfiguration](#l2isolationdomains_commitconfiguration) - [Create](#l2isolationdomains_create) - [Delete](#l2isolationdomains_delete) -- [GetArpEntries](#l2isolationdomains_getarpentries) - [GetByResourceGroup](#l2isolationdomains_getbyresourcegroup) - [List](#l2isolationdomains_list) - [ListByResourceGroup](#l2isolationdomains_listbyresourcegroup) - [Update](#l2isolationdomains_update) - [UpdateAdministrativeState](#l2isolationdomains_updateadministrativestate) +- [ValidateConfiguration](#l2isolationdomains_validateconfiguration) ## L3IsolationDomains -- [ClearArpTable](#l3isolationdomains_cleararptable) -- [ClearNeighborTable](#l3isolationdomains_clearneighbortable) +- [CommitConfiguration](#l3isolationdomains_commitconfiguration) - [Create](#l3isolationdomains_create) - [Delete](#l3isolationdomains_delete) - [GetByResourceGroup](#l3isolationdomains_getbyresourcegroup) @@ -88,7 +101,16 @@ - [ListByResourceGroup](#l3isolationdomains_listbyresourcegroup) - [Update](#l3isolationdomains_update) - [UpdateAdministrativeState](#l3isolationdomains_updateadministrativestate) -- [UpdateOptionBAdministrativeState](#l3isolationdomains_updateoptionbadministrativestate) +- [ValidateConfiguration](#l3isolationdomains_validateconfiguration) + +## NeighborGroups + +- [Create](#neighborgroups_create) +- [Delete](#neighborgroups_delete) +- [GetByResourceGroup](#neighborgroups_getbyresourcegroup) +- [List](#neighborgroups_list) +- [ListByResourceGroup](#neighborgroups_listbyresourcegroup) +- [Update](#neighborgroups_update) ## NetworkDeviceSkus @@ -99,25 +121,19 @@ - [Create](#networkdevices_create) - [Delete](#networkdevices_delete) -- [GenerateSupportPackage](#networkdevices_generatesupportpackage) - [GetByResourceGroup](#networkdevices_getbyresourcegroup) -- [GetDynamicInterfaceMaps](#networkdevices_getdynamicinterfacemaps) -- [GetStaticInterfaceMaps](#networkdevices_getstaticinterfacemaps) -- [GetStatus](#networkdevices_getstatus) - [List](#networkdevices_list) - [ListByResourceGroup](#networkdevices_listbyresourcegroup) - [Reboot](#networkdevices_reboot) -- [RestoreConfig](#networkdevices_restoreconfig) +- [RefreshConfiguration](#networkdevices_refreshconfiguration) - [Update](#networkdevices_update) -- [UpdatePowerCycle](#networkdevices_updatepowercycle) -- [UpdateVersion](#networkdevices_updateversion) +- [UpdateAdministrativeState](#networkdevices_updateadministrativestate) +- [Upgrade](#networkdevices_upgrade) ## NetworkFabricControllers - [Create](#networkfabriccontrollers_create) - [Delete](#networkfabriccontrollers_delete) -- [DisableWorkloadManagementNetwork](#networkfabriccontrollers_disableworkloadmanagementnetwork) -- [EnableWorkloadManagementNetwork](#networkfabriccontrollers_enableworkloadmanagementnetwork) - [GetByResourceGroup](#networkfabriccontrollers_getbyresourcegroup) - [List](#networkfabriccontrollers_list) - [ListByResourceGroup](#networkfabriccontrollers_listbyresourcegroup) @@ -130,29 +146,39 @@ ## NetworkFabrics +- [CommitConfiguration](#networkfabrics_commitconfiguration) - [Create](#networkfabrics_create) - [Delete](#networkfabrics_delete) - [Deprovision](#networkfabrics_deprovision) - [GetByResourceGroup](#networkfabrics_getbyresourcegroup) +- [GetTopology](#networkfabrics_gettopology) - [List](#networkfabrics_list) - [ListByResourceGroup](#networkfabrics_listbyresourcegroup) - [Provision](#networkfabrics_provision) +- [RefreshConfiguration](#networkfabrics_refreshconfiguration) - [Update](#networkfabrics_update) +- [UpdateInfraManagementBfdConfiguration](#networkfabrics_updateinframanagementbfdconfiguration) +- [UpdateWorkloadManagementBfdConfiguration](#networkfabrics_updateworkloadmanagementbfdconfiguration) +- [Upgrade](#networkfabrics_upgrade) +- [ValidateConfiguration](#networkfabrics_validateconfiguration) ## NetworkInterfaces - [Create](#networkinterfaces_create) - [Delete](#networkinterfaces_delete) - [Get](#networkinterfaces_get) -- [GetStatus](#networkinterfaces_getstatus) -- [List](#networkinterfaces_list) +- [ListByNetworkDevice](#networkinterfaces_listbynetworkdevice) - [Update](#networkinterfaces_update) - [UpdateAdministrativeState](#networkinterfaces_updateadministrativestate) -## NetworkRackSkus +## NetworkPacketBrokers -- [Get](#networkrackskus_get) -- [List](#networkrackskus_list) +- [Create](#networkpacketbrokers_create) +- [Delete](#networkpacketbrokers_delete) +- [GetByResourceGroup](#networkpacketbrokers_getbyresourcegroup) +- [List](#networkpacketbrokers_list) +- [ListByResourceGroup](#networkpacketbrokers_listbyresourcegroup) +- [Update](#networkpacketbrokers_update) ## NetworkRacks @@ -163,12 +189,38 @@ - [ListByResourceGroup](#networkracks_listbyresourcegroup) - [Update](#networkracks_update) +## NetworkTapRules + +- [Create](#networktaprules_create) +- [Delete](#networktaprules_delete) +- [GetByResourceGroup](#networktaprules_getbyresourcegroup) +- [List](#networktaprules_list) +- [ListByResourceGroup](#networktaprules_listbyresourcegroup) +- [Resync](#networktaprules_resync) +- [Update](#networktaprules_update) +- [UpdateAdministrativeState](#networktaprules_updateadministrativestate) +- [ValidateConfiguration](#networktaprules_validateconfiguration) + +## NetworkTaps + +- [Create](#networktaps_create) +- [Delete](#networktaps_delete) +- [GetByResourceGroup](#networktaps_getbyresourcegroup) +- [List](#networktaps_list) +- [ListByResourceGroup](#networktaps_listbyresourcegroup) +- [Resync](#networktaps_resync) +- [Update](#networktaps_update) +- [UpdateAdministrativeState](#networktaps_updateadministrativestate) + ## NetworkToNetworkInterconnects - [Create](#networktonetworkinterconnects_create) - [Delete](#networktonetworkinterconnects_delete) - [Get](#networktonetworkinterconnects_get) -- [List](#networktonetworkinterconnects_list) +- [ListByNetworkFabric](#networktonetworkinterconnects_listbynetworkfabric) +- [Update](#networktonetworkinterconnects_update) +- [UpdateAdministrativeState](#networktonetworkinterconnects_updateadministrativestate) +- [UpdateNpbStaticRouteBfdAdministrativeState](#networktonetworkinterconnects_updatenpbstaticroutebfdadministrativestate) ## Operations @@ -176,51 +228,137 @@ ## RoutePolicies +- [CommitConfiguration](#routepolicies_commitconfiguration) - [Create](#routepolicies_create) - [Delete](#routepolicies_delete) - [GetByResourceGroup](#routepolicies_getbyresourcegroup) - [List](#routepolicies_list) - [ListByResourceGroup](#routepolicies_listbyresourcegroup) - [Update](#routepolicies_update) +- [UpdateAdministrativeState](#routepolicies_updateadministrativestate) +- [ValidateConfiguration](#routepolicies_validateconfiguration) ### AccessControlLists_Create ```java -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListConditionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; -import com.azure.resourcemanager.managednetworkfabric.models.ConditionActionType; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAction; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortType; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; +import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** Samples for AccessControlLists Create. */ public final class AccessControlListsCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Create_MinimumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Create_MaximumSet_Gen.json */ /** - * Sample code: AccessControlLists_Create_MinimumSet_Gen. + * Sample code: AccessControlLists_Create_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void accessControlListsCreateMinimumSetGen( + public static void accessControlListsCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .accessControlLists() - .define("aclOne") - .withRegion("EastUs") - .withExistingResourceGroup("resourceGroupName") - .withAddressFamily(AddressFamily.IPV4) - .withConditions( + .define("example-acl") + .withRegion("eastUs") + .withExistingResourceGroup("example-rg") + .withTags(mapOf("keyID", "KeyValue")) + .withConfigurationType(ConfigurationType.FILE) + .withAclsUrl("https://ACL-Storage-URL") + .withMatchConfigurations( + Arrays + .asList( + new AccessControlListMatchConfiguration() + .withMatchConfigurationName("example-match") + .withSequenceNumber(123L) + .withIpAddressType(IpAddressType.IPV4) + .withMatchConditions( + Arrays + .asList( + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("TCP")) + .withVlanMatchCondition( + new VlanMatchCondition() + .withVlans(Arrays.asList("20-30")) + .withInnerVlans(Arrays.asList("30")) + .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) + .withIpCondition( + new IpMatchCondition() + .withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) + .withIpGroupNames(Arrays.asList("example-ipGroup"))) + .withEtherTypes(Arrays.asList("0x1")) + .withFragments(Arrays.asList("0xff00-0xffff")) + .withIpLengths(Arrays.asList("4094-9214")) + .withTtlValues(Arrays.asList("23")) + .withDscpMarkings(Arrays.asList("32")) + .withPortCondition( + new AccessControlListPortCondition() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("1-20")) + .withPortGroupNames(Arrays.asList("example-portGroup")) + .withFlags(Arrays.asList("established"))))) + .withActions( + Arrays + .asList( + new AccessControlListAction() + .withType(AclActionType.COUNT) + .withCounterName("example-counter"))))) + .withDynamicMatchConfigurations( Arrays .asList( - new AccessControlListConditionProperties() - .withSequenceNumber(3) - .withAction(ConditionActionType.ALLOW) - .withDestinationAddress("1.1.1.1") - .withDestinationPort("21") - .withSourceAddress("2.2.2.2") - .withSourcePort("65000") - .withProtocol(6))) + new CommonDynamicMatchConfiguration() + .withIpGroups( + Arrays + .asList( + new IpGroupProperties() + .withName("example-ipGroup") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("10.20.3.1/20")))) + .withVlanGroups( + Arrays + .asList( + new VlanGroupProperties() + .withName("example-vlanGroup") + .withVlans(Arrays.asList("20-30")))) + .withPortGroups( + Arrays + .asList( + new PortGroupProperties() + .withName("example-portGroup") + .withPorts(Arrays.asList("100-200")))))) + .withAnnotation("annotation") .create(); } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } ``` @@ -230,18 +368,16 @@ public final class AccessControlListsCreateSamples { /** Samples for AccessControlLists Delete. */ public final class AccessControlListsDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Delete_MaximumSet_Gen.json */ /** - * Sample code: AccessControlLists_Delete_MinimumSet_Gen. + * Sample code: AccessControlLists_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void accessControlListsDeleteMinimumSetGen( + public static void accessControlListsDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .accessControlLists() - .deleteByResourceGroupWithResponse("subscriptionId", "aclOne", com.azure.core.util.Context.NONE); + manager.accessControlLists().delete("example-rg", "example-acl", com.azure.core.util.Context.NONE); } } ``` @@ -252,18 +388,18 @@ public final class AccessControlListsDeleteSamples { /** Samples for AccessControlLists GetByResourceGroup. */ public final class AccessControlListsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Get_MaximumSet_Gen.json */ /** - * Sample code: AccessControlLists_Get_MinimumSet_Gen. + * Sample code: AccessControlLists_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void accessControlListsGetMinimumSetGen( + public static void accessControlListsGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .accessControlLists() - .getByResourceGroupWithResponse("resourceGroupName", "aclOne", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("example-rg", "example-acl", com.azure.core.util.Context.NONE); } } ``` @@ -274,14 +410,14 @@ public final class AccessControlListsGetByResourceGroupSamples { /** Samples for AccessControlLists List. */ public final class AccessControlListsListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_ListBySubscription_MinimumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: AccessControlLists_ListBySubscription_MinimumSet_Gen. + * Sample code: AccessControlLists_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void accessControlListsListBySubscriptionMinimumSetGen( + public static void accessControlListsListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.accessControlLists().list(com.azure.core.util.Context.NONE); } @@ -294,16 +430,36 @@ public final class AccessControlListsListSamples { /** Samples for AccessControlLists ListByResourceGroup. */ public final class AccessControlListsListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: AccessControlLists_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void accessControlListsListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.accessControlLists().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### AccessControlLists_Resync + +```java +/** Samples for AccessControlLists Resync. */ +public final class AccessControlListsResyncSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Resync_MaximumSet_Gen.json */ /** - * Sample code: AccessControlLists_ListByResourceGroup_MinimumSet_Gen. + * Sample code: AccessControlLists_Resync_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void accessControlListsListByResourceGroupMinimumSetGen( + public static void accessControlListsResyncMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.accessControlLists().listByResourceGroup("resourceGroupName", com.azure.core.util.Context.NONE); + manager.accessControlLists().resync("example-rg", "example-acl", com.azure.core.util.Context.NONE); } } ``` @@ -312,111 +468,178 @@ public final class AccessControlListsListByResourceGroupSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListConditionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; -import com.azure.resourcemanager.managednetworkfabric.models.ConditionActionType; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAction; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortType; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; +import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** Samples for AccessControlLists Update. */ public final class AccessControlListsUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Update_MaximumSet_Gen.json */ /** - * Sample code: AccessControlLists_Update_MinimumSet_Gen. + * Sample code: AccessControlLists_Update_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void accessControlListsUpdateMinimumSetGen( + public static void accessControlListsUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { AccessControlList resource = manager .accessControlLists() - .getByResourceGroupWithResponse("resourceGroupName", "aclOne", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("example-rg", "example-acl", com.azure.core.util.Context.NONE) .getValue(); resource .update() - .withAddressFamily(AddressFamily.IPV4) - .withConditions( + .withTags(mapOf("keyID", "KeyValue")) + .withAnnotation("annotation") + .withConfigurationType(ConfigurationType.FILE) + .withAclsUrl("https://microsoft.com/a") + .withMatchConfigurations( + Arrays + .asList( + new AccessControlListMatchConfiguration() + .withMatchConfigurationName("example-match") + .withSequenceNumber(123L) + .withIpAddressType(IpAddressType.IPV4) + .withMatchConditions( + Arrays + .asList( + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("TCP")) + .withVlanMatchCondition( + new VlanMatchCondition() + .withVlans(Arrays.asList("20-30")) + .withInnerVlans(Arrays.asList("30")) + .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) + .withIpCondition( + new IpMatchCondition() + .withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) + .withIpGroupNames(Arrays.asList("example-ipGroup"))) + .withEtherTypes(Arrays.asList("0x1")) + .withFragments(Arrays.asList("0xff00-0xffff")) + .withIpLengths(Arrays.asList("4094-9214")) + .withTtlValues(Arrays.asList("23")) + .withDscpMarkings(Arrays.asList("32")) + .withPortCondition( + new AccessControlListPortCondition() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("1-20")) + .withPortGroupNames(Arrays.asList("example-portGroup")) + .withFlags(Arrays.asList("established"))))) + .withActions( + Arrays + .asList( + new AccessControlListAction() + .withType(AclActionType.COUNT) + .withCounterName("example-counter"))))) + .withDynamicMatchConfigurations( Arrays .asList( - new AccessControlListConditionProperties() - .withSequenceNumber(4) - .withAction(ConditionActionType.ALLOW) - .withDestinationAddress("1.1.1.2") - .withDestinationPort("21") - .withSourceAddress("2.2.2.3") - .withSourcePort("65000") - .withProtocol(6))) + new CommonDynamicMatchConfiguration() + .withIpGroups( + Arrays + .asList( + new IpGroupProperties() + .withName("example-ipGroup") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("10.20.3.1/20")))) + .withVlanGroups( + Arrays + .asList( + new VlanGroupProperties() + .withName("example-vlanGroup") + .withVlans(Arrays.asList("20-30")))) + .withPortGroups( + Arrays + .asList( + new PortGroupProperties() + .withName("example-portGroup") + .withPorts(Arrays.asList("100-200")))))) .apply(); } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } ``` -### ExternalNetworks_ClearArpEntries +### AccessControlLists_UpdateAdministrativeState ```java -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.util.Arrays; -/** Samples for ExternalNetworks ClearArpEntries. */ -public final class ExternalNetworksClearArpEntriesSamples { +/** Samples for AccessControlLists UpdateAdministrativeState. */ +public final class AccessControlListsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_clearArpEntries_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_UpdateAdministrativeState_MaximumSet_Gen.json */ /** - * Sample code: ExternalNetworks_clearArpEntries_MaximumSet_Gen. + * Sample code: AccessControlLists_UpdateAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void externalNetworksClearArpEntriesMaximumSetGen( + public static void accessControlListsUpdateAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .externalNetworks() - .clearArpEntries( - "resourceGroupName", - "example-l3domain", - "example-externalnetwork", - new EnableDisableOnResources() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")), + .accessControlLists() + .updateAdministrativeState( + "example-rg", + "example-acl", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } ``` -### ExternalNetworks_ClearIpv6Neighbors +### AccessControlLists_ValidateConfiguration ```java -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import java.util.Arrays; - -/** Samples for ExternalNetworks ClearIpv6Neighbors. */ -public final class ExternalNetworksClearIpv6NeighborsSamples { +/** Samples for AccessControlLists ValidateConfiguration. */ +public final class AccessControlListsValidateConfigurationSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_clearIpv6Neighbors_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_ValidateConfiguration_MaximumSet_Gen.json */ /** - * Sample code: ExternalNetworks_clearIpv6Neighbors_MaximumSet_Gen. + * Sample code: AccessControlLists_ValidateConfiguration_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void externalNetworksClearIpv6NeighborsMaximumSetGen( + public static void accessControlListsValidateConfigurationMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .externalNetworks() - .clearIpv6Neighbors( - "resourceGroupName", - "example-l3domain", - "example-externalnetwork", - new EnableDisableOnResources() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")), - com.azure.core.util.Context.NONE); + .accessControlLists() + .validateConfiguration("example-rg", "example-acl", com.azure.core.util.Context.NONE); } } ``` @@ -425,15 +648,18 @@ public final class ExternalNetworksClearIpv6NeighborsSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; import java.util.Arrays; /** Samples for ExternalNetworks Create. */ public final class ExternalNetworksCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Create_MaximumSet_Gen.json */ /** * Sample code: ExternalNetworks_Create_MaximumSet_Gen. @@ -445,12 +671,18 @@ public final class ExternalNetworksCreateSamples { manager .externalNetworks() .define("example-externalnetwork") - .withExistingL3IsolationDomain("resourceGroupName", "example-l3domain") + .withExistingL3IsolationDomain("example-rg", "example-l3domain") .withPeeringOption(PeeringOption.OPTIONA) .withOptionBProperties( - new OptionBProperties() + new L3OptionBProperties() .withImportRouteTargets(Arrays.asList("65046:10039")) - .withExportRouteTargets(Arrays.asList("65046:10039"))) + .withExportRouteTargets(Arrays.asList("65046:10039")) + .withRouteTargets( + new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10039")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10039")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10039")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10039")))) .withOptionAProperties( new ExternalNetworkPropertiesOptionAProperties() .withPrimaryIpv4Prefix("10.1.1.0/30") @@ -459,12 +691,29 @@ public final class ExternalNetworksCreateSamples { .withSecondaryIpv6Prefix("3FFE:FFFF:0:CD30::a4/126") .withMtu(1500) .withVlanId(1001) - .withPeerAsn(65047) - .withBfdConfiguration(new BfdConfiguration())) + .withPeerAsn(65047L) + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) + .withIngressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withEgressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl")) .withImportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") .withExportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportRoutePolicy( + new ImportRoutePolicy() + .withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withExportRoutePolicy( + new ExportRoutePolicy() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withAnnotation("annotation") .create(); } } @@ -476,7 +725,7 @@ public final class ExternalNetworksCreateSamples { /** Samples for ExternalNetworks Delete. */ public final class ExternalNetworksDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Delete_MaximumSet_Gen.json */ /** * Sample code: ExternalNetworks_Delete_MaximumSet_Gen. @@ -487,8 +736,7 @@ public final class ExternalNetworksDeleteSamples { com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .externalNetworks() - .delete( - "resourceGroupName", "example-l3domain", "example-externalnetwork", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-l3domain", "example-externalnetwork", com.azure.core.util.Context.NONE); } } ``` @@ -499,7 +747,7 @@ public final class ExternalNetworksDeleteSamples { /** Samples for ExternalNetworks Get. */ public final class ExternalNetworksGetSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Get_MaximumSet_Gen.json */ /** * Sample code: ExternalNetworks_Get_MaximumSet_Gen. @@ -510,28 +758,29 @@ public final class ExternalNetworksGetSamples { com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .externalNetworks() - .getWithResponse( - "resourceGroupName", "example-l3domain", "example-externalnetwork", com.azure.core.util.Context.NONE); + .getWithResponse("rgL3IsolationDomains", "yhtr", "fltpszzikbalrzaqq", com.azure.core.util.Context.NONE); } } ``` -### ExternalNetworks_List +### ExternalNetworks_ListByL3IsolationDomain ```java -/** Samples for ExternalNetworks List. */ -public final class ExternalNetworksListSamples { +/** Samples for ExternalNetworks ListByL3IsolationDomain. */ +public final class ExternalNetworksListByL3IsolationDomainSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_List_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen.json */ /** - * Sample code: ExternalNetworks_List_MaximumSet_Gen. + * Sample code: ExternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void externalNetworksListMaximumSetGen( + public static void externalNetworksListByL3IsolationDomainMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.externalNetworks().list("resourceGroupName", "example-l3domain", com.azure.core.util.Context.NONE); + manager + .externalNetworks() + .listByL3IsolationDomain("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); } } ``` @@ -540,16 +789,19 @@ public final class ExternalNetworksListSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3OptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; import java.util.Arrays; /** Samples for ExternalNetworks Update. */ public final class ExternalNetworksUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Update_MaximumSet_Gen.json */ /** * Sample code: ExternalNetworks_Update_MaximumSet_Gen. @@ -562,33 +814,52 @@ public final class ExternalNetworksUpdateSamples { manager .externalNetworks() .getWithResponse( - "resourceGroupName", - "example-l3domain", - "example-externalnetwork", - com.azure.core.util.Context.NONE) + "example-rg", "example-l3domain", "example-externalnetwork", com.azure.core.util.Context.NONE) .getValue(); resource .update() .withPeeringOption(PeeringOption.OPTIONA) .withOptionBProperties( - new OptionBProperties() + new L3OptionBProperties() .withImportRouteTargets(Arrays.asList("65046:10039")) - .withExportRouteTargets(Arrays.asList("65046:10039"))) + .withExportRouteTargets(Arrays.asList("65046:10039")) + .withRouteTargets( + new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10039")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10039")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10039")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10039")))) .withOptionAProperties( - new Layer3OptionAProperties() + new ExternalNetworkPatchPropertiesOptionAProperties() .withPrimaryIpv4Prefix("10.1.1.0/30") .withPrimaryIpv6Prefix("3FFE:FFFF:0:CD30::a0/126") .withSecondaryIpv4Prefix("10.1.1.4/30") .withSecondaryIpv6Prefix("3FFE:FFFF:0:CD30::a4/126") .withMtu(1500) .withVlanId(1001) - .withPeerAsn(65047) - .withBfdConfiguration(new BfdConfiguration())) + .withPeerAsn(65047L) + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) + .withIngressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withEgressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl")) .withImportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") .withExportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withAnnotation("Lab 1") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportRoutePolicy( + new ImportRoutePolicy() + .withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withExportRoutePolicy( + new ExportRoutePolicy() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withAnnotation("annotation1") .apply(); } } @@ -597,17 +868,17 @@ public final class ExternalNetworksUpdateSamples { ### ExternalNetworks_UpdateAdministrativeState ```java -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.util.Arrays; /** Samples for ExternalNetworks UpdateAdministrativeState. */ public final class ExternalNetworksUpdateAdministrativeStateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_UpdateAdministrativeState_MaximumSet_Gen.json */ /** - * Sample code: ExternalNetworks_updateAdministrativeState_MaximumSet_Gen. + * Sample code: ExternalNetworks_UpdateAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ @@ -616,155 +887,41 @@ public final class ExternalNetworksUpdateAdministrativeStateSamples { manager .externalNetworks() .updateAdministrativeState( - "resourceGroupName", - "example-l3domain", - "example-externalnetwork", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) - .withState(AdministrativeState.ENABLE), - com.azure.core.util.Context.NONE); - } -} -``` - -### ExternalNetworks_UpdateBfdForBgpAdministrativeState - -```java -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Arrays; - -/** Samples for ExternalNetworks UpdateBfdForBgpAdministrativeState. */ -public final class ExternalNetworksUpdateBfdForBgpAdministrativeStateSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen.json - */ - /** - * Sample code: ExternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void externalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .externalNetworks() - .updateBfdForBgpAdministrativeState( - "resourceGroupName", + "example-rg", "example-l3domain", "example-externalnetwork", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) - .withState(AdministrativeState.ENABLE), + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } ``` -### ExternalNetworks_UpdateBgpAdministrativeState +### ExternalNetworks_UpdateStaticRouteBfdAdministrativeState ```java -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.util.Arrays; -/** Samples for ExternalNetworks UpdateBgpAdministrativeState. */ -public final class ExternalNetworksUpdateBgpAdministrativeStateSamples { +/** Samples for ExternalNetworks UpdateStaticRouteBfdAdministrativeState. */ +public final class ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen.json */ /** - * Sample code: ExternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen. + * Sample code: ExternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void externalNetworksUpdateBgpAdministrativeStateMaximumSetGen( + public static void externalNetworksUpdateStaticRouteBfdAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .externalNetworks() - .updateBgpAdministrativeState( - "resourceGroupName", + .updateStaticRouteBfdAdministrativeState( + "example-rg", "example-l3domain", "example-externalnetwork", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) - .withState(AdministrativeState.ENABLE), - com.azure.core.util.Context.NONE); - } -} -``` - -### InternalNetworks_ClearArpEntries - -```java -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import java.util.Arrays; - -/** Samples for InternalNetworks ClearArpEntries. */ -public final class InternalNetworksClearArpEntriesSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_clearArpEntries_MaximumSet_Gen.json - */ - /** - * Sample code: InternalNetworks_clearArpEntries_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void internalNetworksClearArpEntriesMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .internalNetworks() - .clearArpEntries( - "resourceGroupName", - "example-l3domain", - "example-internalnetwork", - new EnableDisableOnResources() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")), - com.azure.core.util.Context.NONE); - } -} -``` - -### InternalNetworks_ClearIpv6Neighbors - -```java -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import java.util.Arrays; - -/** Samples for InternalNetworks ClearIpv6Neighbors. */ -public final class InternalNetworksClearIpv6NeighborsSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_clearIpv6Neighbors_MaximumSet_Gen.json - */ - /** - * Sample code: InternalNetworks_clearIpv6Neighbors_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void internalNetworksClearIpv6NeighborsMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .internalNetworks() - .clearIpv6Neighbors( - "resourceGroupName", - "example-l3domain", - "example-internalnetwork", - new EnableDisableOnResources() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")), + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } @@ -775,18 +932,22 @@ public final class InternalNetworksClearIpv6NeighborsSamples { ```java import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.Extension; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; import java.util.Arrays; /** Samples for InternalNetworks Create. */ public final class InternalNetworksCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Create_MaximumSet_Gen.json */ /** * Sample code: InternalNetworks_Create_MaximumSet_Gen. @@ -798,41 +959,64 @@ public final class InternalNetworksCreateSamples { manager .internalNetworks() .define("example-internalnetwork") - .withExistingL3IsolationDomain("resourceGroupName", "example-l3domain") - .withVlanId(501) - .withMtu(1500) - .withConnectedIPv4Subnets(Arrays.asList(new ConnectedSubnet().withPrefix("10.0.0.0/24"))) - .withConnectedIPv6Subnets(Arrays.asList(new ConnectedSubnet().withPrefix("3FFE:FFFF:0:CD30::a0/29"))) + .withExistingL3IsolationDomain("example-rg", "example-l3domain") + .withVlanId(755) + .withBgpConfiguration( + new InternalNetworkPropertiesBgpConfiguration() + .withAnnotation("annotation") + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5)) + .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) + .withAllowAS(10) + .withAllowASOverride(AllowASOverride.ENABLE) + .withPeerAsn(61234L) + .withIpv4ListenRangePrefixes(Arrays.asList("10.1.0.0/25")) + .withIpv6ListenRangePrefixes(Arrays.asList("2fff::/66")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("10.1.0.0"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("2fff::")))) .withStaticRouteConfiguration( - new StaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration()) + new InternalNetworkPropertiesStaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) .withIpv4Routes( Arrays .asList( new StaticRouteProperties() - .withPrefix("10.1.0.0/24") + .withPrefix("jffgck") .withNextHop(Arrays.asList("10.0.0.1")))) .withIpv6Routes( Arrays .asList( new StaticRouteProperties() .withPrefix("2fff::/64") - .withNextHop(Arrays.asList("2ffe::1"))))) - .withBgpConfiguration( - new BgpConfiguration() - .withBfdConfiguration(new BfdConfiguration()) - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(1) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(6) - .withIpv4ListenRangePrefixes(Arrays.asList("10.1.0.0/25")) - .withIpv6ListenRangePrefixes(Arrays.asList("2fff::/66")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("10.1.0.0"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("2fff::")))) + .withNextHop(Arrays.asList("3ffe::1")))) + .withExtension(Extension.NO_EXTENSION)) + .withMtu(1500) + .withConnectedIPv4Subnets( + Arrays.asList(new ConnectedSubnet().withAnnotation("annotation").withPrefix("10.0.0.0/24"))) + .withConnectedIPv6Subnets( + Arrays.asList(new ConnectedSubnet().withAnnotation("annotation").withPrefix("3FFE:FFFF:0:CD30::a0/29"))) .withImportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") .withExportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportRoutePolicy( + new ImportRoutePolicy() + .withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withExportRoutePolicy( + new ExportRoutePolicy() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withIngressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withEgressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) + .withExtension(Extension.NO_EXTENSION) + .withAnnotation("annotation") .create(); } } @@ -844,7 +1028,7 @@ public final class InternalNetworksCreateSamples { /** Samples for InternalNetworks Delete. */ public final class InternalNetworksDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Delete_MaximumSet_Gen.json */ /** * Sample code: InternalNetworks_Delete_MaximumSet_Gen. @@ -855,8 +1039,7 @@ public final class InternalNetworksDeleteSamples { com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .internalNetworks() - .delete( - "resourceGroupName", "example-l3domain", "example-internalnetwork", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-l3domain", "example-internalnetwork", com.azure.core.util.Context.NONE); } } ``` @@ -867,7 +1050,7 @@ public final class InternalNetworksDeleteSamples { /** Samples for InternalNetworks Get. */ public final class InternalNetworksGetSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Get_MaximumSet_Gen.json */ /** * Sample code: InternalNetworks_Get_MaximumSet_Gen. @@ -879,27 +1062,29 @@ public final class InternalNetworksGetSamples { manager .internalNetworks() .getWithResponse( - "resourceGroupName", "example-l3domain", "example-internalnetwork", com.azure.core.util.Context.NONE); + "example-rg", "example-l3domain", "example-internalnetwork", com.azure.core.util.Context.NONE); } } ``` -### InternalNetworks_List +### InternalNetworks_ListByL3IsolationDomain ```java -/** Samples for InternalNetworks List. */ -public final class InternalNetworksListSamples { +/** Samples for InternalNetworks ListByL3IsolationDomain. */ +public final class InternalNetworksListByL3IsolationDomainSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_List_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen.json */ /** - * Sample code: InternalNetworks_List_MaximumSet_Gen. + * Sample code: InternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void internalNetworksListMaximumSetGen( + public static void internalNetworksListByL3IsolationDomainMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.internalNetworks().list("resourceGroupName", "example-l3domain", com.azure.core.util.Context.NONE); + manager + .internalNetworks() + .listByL3IsolationDomain("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); } } ``` @@ -912,7 +1097,10 @@ import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; +import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; @@ -921,7 +1109,7 @@ import java.util.Arrays; /** Samples for InternalNetworks Update. */ public final class InternalNetworksUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Update_MaximumSet_Gen.json */ /** * Sample code: InternalNetworks_Update_MaximumSet_Gen. @@ -934,46 +1122,64 @@ public final class InternalNetworksUpdateSamples { manager .internalNetworks() .getWithResponse( - "resourceGroupName", - "example-l3domain", - "example-internalnetwork", - com.azure.core.util.Context.NONE) + "example-rg", "example-l3domain", "example-internalnetwork", com.azure.core.util.Context.NONE) .getValue(); resource .update() - .withMtu(1500) - .withConnectedIPv4Subnets(Arrays.asList(new ConnectedSubnet().withPrefix("10.0.0.0/24"))) - .withConnectedIPv6Subnets(Arrays.asList(new ConnectedSubnet().withPrefix("3FFE:FFFF:0:CD30::a0/29"))) + .withBgpConfiguration( + new BgpConfiguration() + .withAnnotation("annotation") + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5)) + .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) + .withAllowAS(10) + .withAllowASOverride(AllowASOverride.ENABLE) + .withPeerAsn(61234L) + .withIpv4ListenRangePrefixes(Arrays.asList("10.1.0.0/25")) + .withIpv6ListenRangePrefixes(Arrays.asList("2fff::/66")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("10.1.0.0"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("2fff::")))) .withStaticRouteConfiguration( new StaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration()) + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) .withIpv4Routes( Arrays .asList( new StaticRouteProperties() - .withPrefix("10.1.0.0/24") + .withPrefix("20.20.20.20/25") .withNextHop(Arrays.asList("10.0.0.1")))) .withIpv6Routes( Arrays .asList( new StaticRouteProperties() .withPrefix("2fff::/64") - .withNextHop(Arrays.asList("2ffe::1"))))) - .withBgpConfiguration( - new BgpConfiguration() - .withBfdConfiguration(new BfdConfiguration()) - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(1) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(6) - .withIpv4ListenRangePrefixes(Arrays.asList("10.1.0.0/25")) - .withIpv6ListenRangePrefixes(Arrays.asList("2fff::/66")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("10.1.0.0"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("2fff::")))) + .withNextHop(Arrays.asList("3ffe::1"))))) + .withMtu(1500) + .withConnectedIPv4Subnets( + Arrays.asList(new ConnectedSubnet().withAnnotation("annotation").withPrefix("10.0.0.0/24"))) + .withConnectedIPv6Subnets( + Arrays.asList(new ConnectedSubnet().withAnnotation("annotation").withPrefix("3FFE:FFFF:0:CD30::a0/29"))) .withImportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") .withExportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportRoutePolicy( + new ImportRoutePolicy() + .withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withExportRoutePolicy( + new ExportRoutePolicy() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withIngressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withEgressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) + .withAnnotation("annotation") .apply(); } } @@ -982,17 +1188,17 @@ public final class InternalNetworksUpdateSamples { ### InternalNetworks_UpdateAdministrativeState ```java -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.util.Arrays; /** Samples for InternalNetworks UpdateAdministrativeState. */ public final class InternalNetworksUpdateAdministrativeStateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_UpdateAdministrativeState_MaximumSet_Gen.json */ /** - * Sample code: InternalNetworks_updateAdministrativeState_MaximumSet_Gen. + * Sample code: InternalNetworks_UpdateAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ @@ -1001,164 +1207,106 @@ public final class InternalNetworksUpdateAdministrativeStateSamples { manager .internalNetworks() .updateAdministrativeState( - "resourceGroupName", - "example-l3domain", - "example-internalnetwork", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork")) - .withState(AdministrativeState.ENABLE), - com.azure.core.util.Context.NONE); - } -} -``` - -### InternalNetworks_UpdateBfdForBgpAdministrativeState - -```java -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Arrays; - -/** Samples for InternalNetworks UpdateBfdForBgpAdministrativeState. */ -public final class InternalNetworksUpdateBfdForBgpAdministrativeStateSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen.json - */ - /** - * Sample code: InternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void internalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .internalNetworks() - .updateBfdForBgpAdministrativeState( - "resourceGroupName", + "example-rg", "example-l3domain", "example-internalnetwork", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork")) - .withState(AdministrativeState.ENABLE), + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } ``` -### InternalNetworks_UpdateBfdForStaticRouteAdministrativeState +### InternalNetworks_UpdateBgpAdministrativeState ```java -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.util.Arrays; -/** Samples for InternalNetworks UpdateBfdForStaticRouteAdministrativeState. */ -public final class InternalNetworksUpdateBfdForStaticRouteAdministrativeStateSamples { +/** Samples for InternalNetworks UpdateBgpAdministrativeState. */ +public final class InternalNetworksUpdateBgpAdministrativeStateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBfdForStaticRouteAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_UpdateBgpAdministrativeState_MaximumSet_Gen.json */ /** - * Sample code: InternalNetworks_updateBfdForStaticRouteAdministrativeState_MaximumSet_Gen. + * Sample code: InternalNetworks_UpdateBgpAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void internalNetworksUpdateBfdForStaticRouteAdministrativeStateMaximumSetGen( + public static void internalNetworksUpdateBgpAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .internalNetworks() - .updateBfdForStaticRouteAdministrativeState( - "resourceGroupName", + .updateBgpAdministrativeState( + "example-rg", "example-l3domain", - "example-internalnetwork", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork")) - .withState(AdministrativeState.ENABLE), + "example-internalNetwork", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } ``` -### InternalNetworks_UpdateBgpAdministrativeState +### InternalNetworks_UpdateStaticRouteBfdAdministrativeState ```java -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.util.Arrays; -/** Samples for InternalNetworks UpdateBgpAdministrativeState. */ -public final class InternalNetworksUpdateBgpAdministrativeStateSamples { +/** Samples for InternalNetworks UpdateStaticRouteBfdAdministrativeState. */ +public final class InternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen.json */ /** - * Sample code: InternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen. + * Sample code: InternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void internalNetworksUpdateBgpAdministrativeStateMaximumSetGen( + public static void internalNetworksUpdateStaticRouteBfdAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .internalNetworks() - .updateBgpAdministrativeState( - "resourceGroupName", + .updateStaticRouteBfdAdministrativeState( + "example-rg", "example-l3domain", - "example-internalnetwork", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork")) - .withState(AdministrativeState.ENABLE), + "example-internalNetwork", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } ``` -### IpCommunities_Create +### InternetGatewayRules_Create ```java -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; +import com.azure.resourcemanager.managednetworkfabric.models.Action; +import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for IpCommunities Create. */ -public final class IpCommunitiesCreateSamples { +/** Samples for InternetGatewayRules Create. */ +public final class InternetGatewayRulesCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Create_MaximumSet_Gen.json */ /** - * Sample code: IpCommunities_Create_MaximumSet_Gen. + * Sample code: InternetGatewayRules_Create_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipCommunitiesCreateMaximumSetGen( + public static void internetGatewayRulesCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .ipCommunities() - .define("example-ipCommunity") - .withRegion("EastUS") - .withExistingResourceGroup("rgIpCommunityLists") - .withTags(mapOf("key2814", "")) - .withAction(CommunityActionTypes.PERMIT) - .withWellKnownCommunities( - Arrays - .asList( - WellKnownCommunities.INTERNET, - WellKnownCommunities.LOCAL_AS, - WellKnownCommunities.NO_EXPORT, - WellKnownCommunities.GSHUT)) - .withCommunityMembers(Arrays.asList("1234:5678")) + .internetGatewayRules() + .define("example-internetGatewayRule") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withRuleProperties( + new RuleProperties().withAction(Action.ALLOW).withAddressList(Arrays.asList("10.10.10.10"))) + .withTags(mapOf("keyID", "keyValue")) .withAnnotation("annotationValue") .create(); } @@ -1176,115 +1324,119 @@ public final class IpCommunitiesCreateSamples { } ``` -### IpCommunities_Delete +### InternetGatewayRules_Delete ```java -/** Samples for IpCommunities Delete. */ -public final class IpCommunitiesDeleteSamples { +/** Samples for InternetGatewayRules Delete. */ +public final class InternetGatewayRulesDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Delete_MaximumSet_Gen.json */ /** - * Sample code: IpCommunities_Delete_MaximumSet_Gen. + * Sample code: InternetGatewayRules_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipCommunitiesDeleteMaximumSetGen( + public static void internetGatewayRulesDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.ipCommunities().delete("resourceGroupName", "IpCommunityList1", com.azure.core.util.Context.NONE); + manager + .internetGatewayRules() + .delete("example-rg", "example-internetGatewayRule", com.azure.core.util.Context.NONE); } } ``` -### IpCommunities_GetByResourceGroup +### InternetGatewayRules_GetByResourceGroup ```java -/** Samples for IpCommunities GetByResourceGroup. */ -public final class IpCommunitiesGetByResourceGroupSamples { +/** Samples for InternetGatewayRules GetByResourceGroup. */ +public final class InternetGatewayRulesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Get_MaximumSet_Gen.json */ /** - * Sample code: IpCommunities_Get_MaximumSet_Gen. + * Sample code: InternetGatewayRules_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipCommunitiesGetMaximumSetGen( + public static void internetGatewayRulesGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .ipCommunities() + .internetGatewayRules() .getByResourceGroupWithResponse( - "resourceGroupName", "example-ipCommunity", com.azure.core.util.Context.NONE); + "example-rg", "example-internetGatewayRule", com.azure.core.util.Context.NONE); } } ``` -### IpCommunities_List +### InternetGatewayRules_List ```java -/** Samples for IpCommunities List. */ -public final class IpCommunitiesListSamples { +/** Samples for InternetGatewayRules List. */ +public final class InternetGatewayRulesListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: IpCommunities_ListBySubscription_MaximumSet_Gen. + * Sample code: InternetGatewayRules_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipCommunitiesListBySubscriptionMaximumSetGen( + public static void internetGatewayRulesListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.ipCommunities().list(com.azure.core.util.Context.NONE); + manager.internetGatewayRules().list(com.azure.core.util.Context.NONE); } } ``` -### IpCommunities_ListByResourceGroup +### InternetGatewayRules_ListByResourceGroup ```java -/** Samples for IpCommunities ListByResourceGroup. */ -public final class IpCommunitiesListByResourceGroupSamples { +/** Samples for InternetGatewayRules ListByResourceGroup. */ +public final class InternetGatewayRulesListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: IpCommunities_ListByResourceGroup_MaximumSet_Gen. + * Sample code: InternetGatewayRules_ListByResourceGroup_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipCommunitiesListByResourceGroupMaximumSetGen( + public static void internetGatewayRulesListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.ipCommunities().listByResourceGroup("resourceGroupName", com.azure.core.util.Context.NONE); + manager + .internetGatewayRules() + .listByResourceGroup("example-internetGatewayRule", com.azure.core.util.Context.NONE); } } ``` -### IpCommunities_Update +### InternetGatewayRules_Update ```java -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunity; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRule; import java.util.HashMap; import java.util.Map; -/** Samples for IpCommunities Update. */ -public final class IpCommunitiesUpdateSamples { +/** Samples for InternetGatewayRules Update. */ +public final class InternetGatewayRulesUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Update_MaximumSet_Gen.json */ /** - * Sample code: IpCommunities_Update_MaximumSet_Gen. + * Sample code: InternetGatewayRules_Update_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipCommunitiesUpdateMaximumSetGen( + public static void internetGatewayRulesUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - IpCommunity resource = + InternetGatewayRule resource = manager - .ipCommunities() + .internetGatewayRules() .getByResourceGroupWithResponse( - "resourceGroupName", "example-ipCommunity", com.azure.core.util.Context.NONE) + "example-rg", "example-internetGatewayRule", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key2814", "")).apply(); + resource.update().withTags(mapOf("key3311", "1234")).apply(); } @SuppressWarnings("unchecked") @@ -1300,35 +1452,37 @@ public final class IpCommunitiesUpdateSamples { } ``` -### IpExtendedCommunities_Create +### InternetGateways_Create ```java -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import java.util.Arrays; +import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; import java.util.HashMap; import java.util.Map; -/** Samples for IpExtendedCommunities Create. */ -public final class IpExtendedCommunitiesCreateSamples { +/** Samples for InternetGateways Create. */ +public final class InternetGatewaysCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_Create_MaximumSet_Gen.json */ /** - * Sample code: IpExtendedCommunities_Create_MaximumSet_Gen. + * Sample code: InternetGateways_Create_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipExtendedCommunitiesCreateMaximumSetGen( + public static void internetGatewaysCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .ipExtendedCommunities() - .define("example_ipExtendedCommunity") - .withRegion("EastUs") - .withExistingResourceGroup("rgIpExtendedCommunityLists") - .withTags(mapOf("key5054", "key")) - .withAction(CommunityActionTypes.PERMIT) - .withRouteTargets(Arrays.asList("1234:5678")) - .withAnnotation("annotationValue") + .internetGateways() + .define("example-internetGateway") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withTypePropertiesType(GatewayType.INFRASTRUCTURE) + .withNetworkFabricControllerId( + "/subscriptions/xxxx-xxxx-xxxx-xxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-networkFabricController") + .withTags(mapOf("key3540", "1234")) + .withInternetGatewayRuleId( + "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule") + .withAnnotation("annotation") .create(); } @@ -1345,119 +1499,119 @@ public final class IpExtendedCommunitiesCreateSamples { } ``` -### IpExtendedCommunities_Delete +### InternetGateways_Delete ```java -/** Samples for IpExtendedCommunities Delete. */ -public final class IpExtendedCommunitiesDeleteSamples { +/** Samples for InternetGateways Delete. */ +public final class InternetGatewaysDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_Delete_MaximumSet_Gen.json */ /** - * Sample code: IpExtendedCommunities_Delete_MaximumSet_Gen. + * Sample code: InternetGateways_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipExtendedCommunitiesDeleteMaximumSetGen( + public static void internetGatewaysDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .ipExtendedCommunities() - .delete("rgIpExtendedCommunityLists", "example_ipExtendedCommunity", com.azure.core.util.Context.NONE); + manager.internetGateways().delete("example-rg", "example-internetGateway", com.azure.core.util.Context.NONE); } } ``` -### IpExtendedCommunities_GetByResourceGroup +### InternetGateways_GetByResourceGroup ```java -/** Samples for IpExtendedCommunities GetByResourceGroup. */ -public final class IpExtendedCommunitiesGetByResourceGroupSamples { +/** Samples for InternetGateways GetByResourceGroup. */ +public final class InternetGatewaysGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_Get_MaximumSet_Gen.json */ /** - * Sample code: IpExtendedCommunities_Get_MaximumSet_Gen. + * Sample code: InternetGateways_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipExtendedCommunitiesGetMaximumSetGen( + public static void internetGatewaysGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .ipExtendedCommunities() - .getByResourceGroupWithResponse( - "rgIpExtendedCommunityLists", "example_ipExtendedCommunity", com.azure.core.util.Context.NONE); + .internetGateways() + .getByResourceGroupWithResponse("example-rg", "example-internetGateway", com.azure.core.util.Context.NONE); } } ``` -### IpExtendedCommunities_List +### InternetGateways_List ```java -/** Samples for IpExtendedCommunities List. */ -public final class IpExtendedCommunitiesListSamples { +/** Samples for InternetGateways List. */ +public final class InternetGatewaysListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: IpExtendedCommunities_ListBySubscription_MaximumSet_Gen. + * Sample code: InternetGateways_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipExtendedCommunitiesListBySubscriptionMaximumSetGen( + public static void internetGatewaysListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.ipExtendedCommunities().list(com.azure.core.util.Context.NONE); + manager.internetGateways().list(com.azure.core.util.Context.NONE); } } ``` -### IpExtendedCommunities_ListByResourceGroup +### InternetGateways_ListByResourceGroup ```java -/** Samples for IpExtendedCommunities ListByResourceGroup. */ -public final class IpExtendedCommunitiesListByResourceGroupSamples { +/** Samples for InternetGateways ListByResourceGroup. */ +public final class InternetGatewaysListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen. + * Sample code: InternetGateways_ListByResourceGroup_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipExtendedCommunitiesListByResourceGroupMaximumSetGen( + public static void internetGatewaysListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .ipExtendedCommunities() - .listByResourceGroup("rgIpExtendedCommunityLists", com.azure.core.util.Context.NONE); + manager.internetGateways().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } ``` -### IpExtendedCommunities_Update +### InternetGateways_Update ```java -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunity; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGateway; import java.util.HashMap; import java.util.Map; -/** Samples for IpExtendedCommunities Update. */ -public final class IpExtendedCommunitiesUpdateSamples { +/** Samples for InternetGateways Update. */ +public final class InternetGatewaysUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_Update_MaximumSet_Gen.json */ /** - * Sample code: IpExtendedCommunities_Update_MaximumSet_Gen. + * Sample code: InternetGateways_Update_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipExtendedCommunitiesUpdateMaximumSetGen( + public static void internetGatewaysUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - IpExtendedCommunity resource = + InternetGateway resource = manager - .ipExtendedCommunities() + .internetGateways() .getByResourceGroupWithResponse( - "rgIpExtendedCommunityLists", "example_ipExtendedCommunity", com.azure.core.util.Context.NONE) + "example-rg", "example-internetGateway", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key5054", "key1")).apply(); + resource + .update() + .withTags(mapOf("key81", "2345")) + .withInternetGatewayRuleId( + "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule") + .apply(); } @SuppressWarnings("unchecked") @@ -1473,44 +1627,43 @@ public final class IpExtendedCommunitiesUpdateSamples { } ``` -### IpPrefixes_Create +### IpCommunities_Create ```java import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.Condition; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPropertiesIpPrefixRulesItem; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; +import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for IpPrefixes Create. */ -public final class IpPrefixesCreateSamples { +/** Samples for IpCommunities Create. */ +public final class IpCommunitiesCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Create_MaximumSet_Gen.json */ /** - * Sample code: IpPrefixes_Create_MaximumSet_Gen. + * Sample code: IpCommunities_Create_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipPrefixesCreateMaximumSetGen( + public static void ipCommunitiesCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .ipPrefixes() - .define("example-ipPrefix") - .withRegion("EastUS") - .withExistingResourceGroup("resourcegroupname") - .withIpPrefixRules( + .ipCommunities() + .define("example-ipcommunity") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withTags(mapOf("keyId", "KeyValue")) + .withIpCommunityRules( Arrays .asList( - new IpPrefixPropertiesIpPrefixRulesItem() + new IpCommunityRule() .withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(12L) - .withNetworkPrefix("1.1.1.0/24") - .withCondition(Condition.EQUAL_TO) - .withSubnetMaskLength(28))) - .withTags(mapOf("key6404", "")) - .withAnnotation("annotationValue") + .withSequenceNumber(4155123341L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) + .withCommunityMembers(Arrays.asList("1:1")))) + .withAnnotation("annotation") .create(); } @@ -1527,768 +1680,1912 @@ public final class IpPrefixesCreateSamples { } ``` -### IpPrefixes_Delete +### IpCommunities_Delete ```java -/** Samples for IpPrefixes Delete. */ -public final class IpPrefixesDeleteSamples { +/** Samples for IpCommunities Delete. */ +public final class IpCommunitiesDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Delete_MaximumSet_Gen.json */ /** - * Sample code: IpPrefixes_Delete_MaximumSet_Gen. + * Sample code: IpCommunities_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipPrefixesDeleteMaximumSetGen( + public static void ipCommunitiesDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.ipPrefixes().delete("rgIpPrefixLists", "example-ipPrefix", com.azure.core.util.Context.NONE); + manager.ipCommunities().delete("example-rg", "example-ipcommunity", com.azure.core.util.Context.NONE); } } ``` -### IpPrefixes_GetByResourceGroup +### IpCommunities_GetByResourceGroup ```java -/** Samples for IpPrefixes GetByResourceGroup. */ -public final class IpPrefixesGetByResourceGroupSamples { +/** Samples for IpCommunities GetByResourceGroup. */ +public final class IpCommunitiesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Get_MaximumSet_Gen.json */ /** - * Sample code: IpPrefixes_Get_MaximumSet_Gen. + * Sample code: IpCommunities_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipPrefixesGetMaximumSetGen( + public static void ipCommunitiesGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .ipPrefixes() - .getByResourceGroupWithResponse("resourcegroupname", "example-ipPrefix", com.azure.core.util.Context.NONE); + .ipCommunities() + .getByResourceGroupWithResponse("example-rg", "example-ipcommunity", com.azure.core.util.Context.NONE); } } ``` -### IpPrefixes_List +### IpCommunities_List ```java -/** Samples for IpPrefixes List. */ -public final class IpPrefixesListSamples { +/** Samples for IpCommunities List. */ +public final class IpCommunitiesListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: IpPrefixes_ListBySubscription_MaximumSet_Gen. + * Sample code: IpCommunities_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipPrefixesListBySubscriptionMaximumSetGen( + public static void ipCommunitiesListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.ipPrefixes().list(com.azure.core.util.Context.NONE); + manager.ipCommunities().list(com.azure.core.util.Context.NONE); } } ``` -### IpPrefixes_ListByResourceGroup +### IpCommunities_ListByResourceGroup ```java -/** Samples for IpPrefixes ListByResourceGroup. */ -public final class IpPrefixesListByResourceGroupSamples { +/** Samples for IpCommunities ListByResourceGroup. */ +public final class IpCommunitiesListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: IpPrefixes_ListByResourceGroup_MaximumSet_Gen. + * Sample code: IpCommunities_ListByResourceGroup_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipPrefixesListByResourceGroupMaximumSetGen( + public static void ipCommunitiesListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.ipPrefixes().listByResourceGroup("resourcegroupname", com.azure.core.util.Context.NONE); + manager.ipCommunities().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } ``` -### IpPrefixes_Update +### IpCommunities_Update ```java -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefix; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunity; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; +import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; +import java.util.Arrays; -/** Samples for IpPrefixes Update. */ -public final class IpPrefixesUpdateSamples { +/** Samples for IpCommunities Update. */ +public final class IpCommunitiesUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Update_MaximumSet_Gen.json */ /** - * Sample code: IpPrefixes_Update_MaximumSet_Gen. + * Sample code: IpCommunities_Update_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void ipPrefixesUpdateMaximumSetGen( + public static void ipCommunitiesUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - IpPrefix resource = + IpCommunity resource = manager - .ipPrefixes() - .getByResourceGroupWithResponse( - "resourcegroupname", "example-ipPrefix", com.azure.core.util.Context.NONE) + .ipCommunities() + .getByResourceGroupWithResponse("example-rg", "example-ipcommunity", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key3127", "key")).apply(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + resource + .update() + .withIpCommunityRules( + Arrays + .asList( + new IpCommunityRule() + .withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) + .withCommunityMembers(Arrays.asList("1:1")))) + .apply(); } } ``` -### L2IsolationDomains_ClearArpTable +### IpExtendedCommunities_Create ```java -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; +import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; -/** Samples for L2IsolationDomains ClearArpTable. */ -public final class L2IsolationDomainsClearArpTableSamples { +/** Samples for IpExtendedCommunities Create. */ +public final class IpExtendedCommunitiesCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_clearArpTable_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Create_MaximumSet_Gen.json */ /** - * Sample code: L2IsolationDomains_clearArpTable_MaximumSet_Gen. + * Sample code: IpExtendedCommunities_Create_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l2IsolationDomainsClearArpTableMaximumSetGen( + public static void ipExtendedCommunitiesCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .l2IsolationDomains() - .clearArpTable( - "resourceGroupName", - "example-l2domain", - new EnableDisableOnResources() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain")), - com.azure.core.util.Context.NONE); + .ipExtendedCommunities() + .define("example-ipExtendedCommunity") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withIpExtendedCommunityRules( + Arrays + .asList( + new IpExtendedCommunityRule() + .withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withRouteTargets(Arrays.asList("1234:2345")))) + .withTags(mapOf("keyID", "KeyValue")) + .withAnnotation("annotation") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### L2IsolationDomains_ClearNeighborTable +### IpExtendedCommunities_Delete ```java -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import java.util.Arrays; - -/** Samples for L2IsolationDomains ClearNeighborTable. */ -public final class L2IsolationDomainsClearNeighborTableSamples { +/** Samples for IpExtendedCommunities Delete. */ +public final class IpExtendedCommunitiesDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_clearNeighborTable_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Delete_MaximumSet_Gen.json */ /** - * Sample code: L2IsolationDomains_clearNeighborTable_MaximumSet_Gen. + * Sample code: IpExtendedCommunities_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l2IsolationDomainsClearNeighborTableMaximumSetGen( + public static void ipExtendedCommunitiesDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .l2IsolationDomains() - .clearNeighborTable( - "rgL2IsolationDomains", - "oz", - new EnableDisableOnResources() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain")), - com.azure.core.util.Context.NONE); + .ipExtendedCommunities() + .delete("example-rg", "example-ipExtendedCommunity", com.azure.core.util.Context.NONE); } } ``` -### L2IsolationDomains_Create +### IpExtendedCommunities_GetByResourceGroup ```java -/** Samples for L2IsolationDomains Create. */ -public final class L2IsolationDomainsCreateSamples { +/** Samples for IpExtendedCommunities GetByResourceGroup. */ +public final class IpExtendedCommunitiesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Get_MaximumSet_Gen.json */ /** - * Sample code: L2IsolationDomains_Create_MaximumSet_Gen. + * Sample code: IpExtendedCommunities_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l2IsolationDomainsCreateMaximumSetGen( + public static void ipExtendedCommunitiesGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .l2IsolationDomains() - .define("example-l2domain") - .withRegion("eastus") - .withExistingResourceGroup("resourceGroupName") - .withNetworkFabricId( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/networkFabrics/FabricName") - .withVlanId(501) - .withMtu(1500) - .create(); + .ipExtendedCommunities() + .getByResourceGroupWithResponse( + "example-rg", "example-ipExtendedCommunity", com.azure.core.util.Context.NONE); } } ``` -### L2IsolationDomains_Delete +### IpExtendedCommunities_List ```java -/** Samples for L2IsolationDomains Delete. */ -public final class L2IsolationDomainsDeleteSamples { +/** Samples for IpExtendedCommunities List. */ +public final class IpExtendedCommunitiesListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: L2IsolationDomains_Delete_MaximumSet_Gen. + * Sample code: IpExtendedCommunities_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l2IsolationDomainsDeleteMaximumSetGen( + public static void ipExtendedCommunitiesListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.l2IsolationDomains().delete("resourceGroupName", "example-l2domain", com.azure.core.util.Context.NONE); + manager.ipExtendedCommunities().list(com.azure.core.util.Context.NONE); } } ``` -### L2IsolationDomains_GetArpEntries +### IpExtendedCommunities_ListByResourceGroup ```java -/** Samples for L2IsolationDomains GetArpEntries. */ -public final class L2IsolationDomainsGetArpEntriesSamples { +/** Samples for IpExtendedCommunities ListByResourceGroup. */ +public final class IpExtendedCommunitiesListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_getArpEntries_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: L2IsolationDomains_getArpEntries_MaximumSet_Gen. + * Sample code: IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l2IsolationDomainsGetArpEntriesMaximumSetGen( + public static void ipExtendedCommunitiesListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .l2IsolationDomains() - .getArpEntries("resourceGroupName", "l2IsolationDomainName", com.azure.core.util.Context.NONE); + manager.ipExtendedCommunities().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } ``` -### L2IsolationDomains_GetByResourceGroup +### IpExtendedCommunities_Update ```java -/** Samples for L2IsolationDomains GetByResourceGroup. */ -public final class L2IsolationDomainsGetByResourceGroupSamples { +import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunity; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for IpExtendedCommunities Update. */ +public final class IpExtendedCommunitiesUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Update_MaximumSet_Gen.json + */ + /** + * Sample code: IpExtendedCommunities_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void ipExtendedCommunitiesUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + IpExtendedCommunity resource = + manager + .ipExtendedCommunities() + .getByResourceGroupWithResponse( + "example-rg", "example-ipExtendedCommunity", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("keyID", "KeyValue")) + .withIpExtendedCommunityRules( + Arrays + .asList( + new IpExtendedCommunityRule() + .withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withRouteTargets(Arrays.asList("1234:2345")))) + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### IpPrefixes_Create + +```java +import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.Condition; +import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for IpPrefixes Create. */ +public final class IpPrefixesCreateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Create_MaximumSet_Gen.json + */ + /** + * Sample code: IpPrefixes_Create_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void ipPrefixesCreateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .ipPrefixes() + .define("example-ipPrefix") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withTags(mapOf("keyID", "KeyValue")) + .withIpPrefixRules( + Arrays + .asList( + new IpPrefixRule() + .withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withNetworkPrefix("10.10.10.10/30") + .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) + .withSubnetMaskLength("10"))) + .withAnnotation("annotation") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### IpPrefixes_Delete + +```java +/** Samples for IpPrefixes Delete. */ +public final class IpPrefixesDeleteSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: IpPrefixes_Delete_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void ipPrefixesDeleteMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.ipPrefixes().delete("example-rg", "example-ipPrefix", com.azure.core.util.Context.NONE); + } +} +``` + +### IpPrefixes_GetByResourceGroup + +```java +/** Samples for IpPrefixes GetByResourceGroup. */ +public final class IpPrefixesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Get_MaximumSet_Gen.json + */ + /** + * Sample code: IpPrefixes_Get_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void ipPrefixesGetMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .ipPrefixes() + .getByResourceGroupWithResponse("example-rg", "example-ipPrefix", com.azure.core.util.Context.NONE); + } +} +``` + +### IpPrefixes_List + +```java +/** Samples for IpPrefixes List. */ +public final class IpPrefixesListSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: IpPrefixes_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void ipPrefixesListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.ipPrefixes().list(com.azure.core.util.Context.NONE); + } +} +``` + +### IpPrefixes_ListByResourceGroup + +```java +/** Samples for IpPrefixes ListByResourceGroup. */ +public final class IpPrefixesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: IpPrefixes_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void ipPrefixesListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.ipPrefixes().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### IpPrefixes_Update + +```java +import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.Condition; +import com.azure.resourcemanager.managednetworkfabric.models.IpPrefix; +import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for IpPrefixes Update. */ +public final class IpPrefixesUpdateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Update_MaximumSet_Gen.json + */ + /** + * Sample code: IpPrefixes_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void ipPrefixesUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + IpPrefix resource = + manager + .ipPrefixes() + .getByResourceGroupWithResponse("example-rg", "example-ipPrefix", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("keyID", "KeyValue")) + .withIpPrefixRules( + Arrays + .asList( + new IpPrefixRule() + .withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withNetworkPrefix("10.10.10.10/30") + .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) + .withSubnetMaskLength("10"))) + .withAnnotation("annotation") + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### L2IsolationDomains_CommitConfiguration + +```java +/** Samples for L2IsolationDomains CommitConfiguration. */ +public final class L2IsolationDomainsCommitConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_CommitConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: L2IsolationDomains_CommitConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l2IsolationDomainsCommitConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .l2IsolationDomains() + .commitConfiguration("example-rg", "example-l2domain", com.azure.core.util.Context.NONE); + } +} +``` + +### L2IsolationDomains_Create + +```java +import java.util.HashMap; +import java.util.Map; + +/** Samples for L2IsolationDomains Create. */ +public final class L2IsolationDomainsCreateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Create_MaximumSet_Gen.json + */ + /** + * Sample code: L2IsolationDomains_Create_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l2IsolationDomainsCreateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .l2IsolationDomains() + .define("example-l2domain") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withVlanId(501) + .withTags(mapOf("keyID", "keyValue")) + .withMtu(1500) + .withAnnotation("annotation") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### L2IsolationDomains_Delete + +```java +/** Samples for L2IsolationDomains Delete. */ +public final class L2IsolationDomainsDeleteSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: L2IsolationDomains_Delete_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l2IsolationDomainsDeleteMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.l2IsolationDomains().delete("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE); + } +} +``` + +### L2IsolationDomains_GetByResourceGroup + +```java +/** Samples for L2IsolationDomains GetByResourceGroup. */ +public final class L2IsolationDomainsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Get_MaximumSet_Gen.json */ /** * Sample code: L2IsolationDomains_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l2IsolationDomainsGetMaximumSetGen( + public static void l2IsolationDomainsGetMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .l2IsolationDomains() + .getByResourceGroupWithResponse("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE); + } +} +``` + +### L2IsolationDomains_List + +```java +/** Samples for L2IsolationDomains List. */ +public final class L2IsolationDomainsListSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: L2IsolationDomains_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l2IsolationDomainsListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.l2IsolationDomains().list(com.azure.core.util.Context.NONE); + } +} +``` + +### L2IsolationDomains_ListByResourceGroup + +```java +/** Samples for L2IsolationDomains ListByResourceGroup. */ +public final class L2IsolationDomainsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l2IsolationDomainsListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.l2IsolationDomains().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### L2IsolationDomains_Update + +```java +import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; +import java.util.HashMap; +import java.util.Map; + +/** Samples for L2IsolationDomains Update. */ +public final class L2IsolationDomainsUpdateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Update_MaximumSet_Gen.json + */ + /** + * Sample code: L2IsolationDomains_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l2IsolationDomainsUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + L2IsolationDomain resource = + manager + .l2IsolationDomains() + .getByResourceGroupWithResponse("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("keyID", "keyValue")).withMtu(6000).withAnnotation("annotation1").apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### L2IsolationDomains_UpdateAdministrativeState + +```java +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for L2IsolationDomains UpdateAdministrativeState. */ +public final class L2IsolationDomainsUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + */ + /** + * Sample code: L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l2IsolationDomainsUpdateAdministrativeStateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .l2IsolationDomains() + .updateAdministrativeState( + "example-rg", + "example-l2Domain", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} +``` + +### L2IsolationDomains_ValidateConfiguration + +```java +/** Samples for L2IsolationDomains ValidateConfiguration. */ +public final class L2IsolationDomainsValidateConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_ValidateConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: L2IsolationDomains_ValidateConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l2IsolationDomainsValidateConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .l2IsolationDomains() + .validateConfiguration("example-rg", "example-l2domain", com.azure.core.util.Context.NONE); + } +} +``` + +### L3IsolationDomains_CommitConfiguration + +```java +/** Samples for L3IsolationDomains CommitConfiguration. */ +public final class L3IsolationDomainsCommitConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_CommitConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: L3IsolationDomains_CommitConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l3IsolationDomainsCommitConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .l3IsolationDomains() + .commitConfiguration("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); + } +} +``` + +### L3IsolationDomains_Create + +```java +import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; +import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; +import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for L3IsolationDomains Create. */ +public final class L3IsolationDomainsCreateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Create_MaximumSet_Gen.json + */ + /** + * Sample code: L3IsolationDomains_Create_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l3IsolationDomainsCreateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .l3IsolationDomains() + .define("example-l3domain") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withTags(mapOf("keyID", "KeyValue")) + .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) + .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) + .withAggregateRouteConfiguration( + new AggregateRouteConfiguration() + .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("10.0.0.0/24"))) + .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("3FFE:FFFF:0:CD30::a0/29")))) + .withConnectedSubnetRoutePolicy( + new ConnectedSubnetRoutePolicy() + .withExportRoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withExportRoutePolicy( + new L3ExportRoutePolicy() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy"))) + .withAnnotation("annotation") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### L3IsolationDomains_Delete + +```java +/** Samples for L3IsolationDomains Delete. */ +public final class L3IsolationDomainsDeleteSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: L3IsolationDomains_Delete_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l3IsolationDomainsDeleteMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.l3IsolationDomains().delete("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); + } +} +``` + +### L3IsolationDomains_GetByResourceGroup + +```java +/** Samples for L3IsolationDomains GetByResourceGroup. */ +public final class L3IsolationDomainsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Get_MaximumSet_Gen.json + */ + /** + * Sample code: L3IsolationDomains_Get_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l3IsolationDomainsGetMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .l3IsolationDomains() + .getByResourceGroupWithResponse("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); + } +} +``` + +### L3IsolationDomains_List + +```java +/** Samples for L3IsolationDomains List. */ +public final class L3IsolationDomainsListSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: L3IsolationDomains_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l3IsolationDomainsListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.l3IsolationDomains().list(com.azure.core.util.Context.NONE); + } +} +``` + +### L3IsolationDomains_ListByResourceGroup + +```java +/** Samples for L3IsolationDomains ListByResourceGroup. */ +public final class L3IsolationDomainsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l3IsolationDomainsListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.l3IsolationDomains().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### L3IsolationDomains_Update + +```java +import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; +import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; +import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; +import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for L3IsolationDomains Update. */ +public final class L3IsolationDomainsUpdateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Update_MaximumSet_Gen.json + */ + /** + * Sample code: L3IsolationDomains_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l3IsolationDomainsUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + L3IsolationDomain resource = + manager + .l3IsolationDomains() + .getByResourceGroupWithResponse("example-rg", "example-l3domain", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key4953", "1234")) + .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) + .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) + .withAggregateRouteConfiguration( + new AggregateRouteConfiguration() + .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("10.0.0.0/24"))) + .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("3FFE:FFFF:0:CD30::a0/29")))) + .withConnectedSubnetRoutePolicy( + new ConnectedSubnetRoutePolicy() + .withExportRoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withExportRoutePolicy( + new L3ExportRoutePolicy() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1"))) + .withAnnotation("annotation1") + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### L3IsolationDomains_UpdateAdministrativeState + +```java +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for L3IsolationDomains UpdateAdministrativeState. */ +public final class L3IsolationDomainsUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + */ + /** + * Sample code: L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l3IsolationDomainsUpdateAdministrativeStateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .l3IsolationDomains() + .updateAdministrativeState( + "example-rg", + "example-l3domain", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} +``` + +### L3IsolationDomains_ValidateConfiguration + +```java +/** Samples for L3IsolationDomains ValidateConfiguration. */ +public final class L3IsolationDomainsValidateConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_ValidateConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: L3IsolationDomains_ValidateConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l3IsolationDomainsValidateConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .l3IsolationDomains() + .validateConfiguration("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); + } +} +``` + +### NeighborGroups_Create + +```java +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for NeighborGroups Create. */ +public final class NeighborGroupsCreateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Create_MaximumSet_Gen.json + */ + /** + * Sample code: NeighborGroups_Create_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void neighborGroupsCreateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .neighborGroups() + .define("example-neighborGroup") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withTags(mapOf("key8107", "1234")) + .withDestination( + new NeighborGroupDestination() + .withIpv4Addresses( + Arrays + .asList( + "10.10.10.10", + "20.10.10.10", + "30.10.10.10", + "40.10.10.10", + "50.10.10.10", + "60.10.10.10", + "70.10.10.10", + "80.10.10.10", + "90.10.10.10")) + .withIpv6Addresses(Arrays.asList("2F::/100"))) + .withAnnotation("annotation") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### NeighborGroups_Delete + +```java +/** Samples for NeighborGroups Delete. */ +public final class NeighborGroupsDeleteSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: NeighborGroups_Delete_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void neighborGroupsDeleteMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.neighborGroups().delete("example-rg", "example-neighborGroup", com.azure.core.util.Context.NONE); + } +} +``` + +### NeighborGroups_GetByResourceGroup + +```java +/** Samples for NeighborGroups GetByResourceGroup. */ +public final class NeighborGroupsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Get_MaximumSet_Gen.json + */ + /** + * Sample code: NeighborGroups_Get_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void neighborGroupsGetMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .neighborGroups() + .getByResourceGroupWithResponse("example-rg", "example-neighborGroup", com.azure.core.util.Context.NONE); + } +} +``` + +### NeighborGroups_List + +```java +/** Samples for NeighborGroups List. */ +public final class NeighborGroupsListSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: NeighborGroups_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void neighborGroupsListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.neighborGroups().list(com.azure.core.util.Context.NONE); + } +} +``` + +### NeighborGroups_ListByResourceGroup + +```java +/** Samples for NeighborGroups ListByResourceGroup. */ +public final class NeighborGroupsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: NeighborGroups_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void neighborGroupsListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.neighborGroups().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### NeighborGroups_Update + +```java +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for NeighborGroups Update. */ +public final class NeighborGroupsUpdateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Update_MaximumSet_Gen.json + */ + /** + * Sample code: NeighborGroups_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void neighborGroupsUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NeighborGroup resource = + manager + .neighborGroups() + .getByResourceGroupWithResponse("example-rg", "example-neighborGroup", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key8107", "2345")) + .withDestination( + new NeighborGroupDestination() + .withIpv4Addresses( + Arrays + .asList( + "10.10.10.10", + "20.10.10.10", + "30.10.10.10", + "40.10.10.10", + "50.10.10.10", + "60.10.10.10", + "70.10.10.10", + "80.10.10.10", + "90.10.10.10")) + .withIpv6Addresses(Arrays.asList("2F::/100"))) + .withAnnotation("Updating") + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### NetworkDeviceSkus_Get + +```java +/** Samples for NetworkDeviceSkus Get. */ +public final class NetworkDeviceSkusGetSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDeviceSkus_Get_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkDeviceSkus_Get_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkDeviceSkusGetMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkDeviceSkus().getWithResponse("example-deviceSku", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkDeviceSkus_List + +```java +/** Samples for NetworkDeviceSkus List. */ +public final class NetworkDeviceSkusListSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkDeviceSkusListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkDeviceSkus().list(com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkDevices_Create + +```java +import java.util.HashMap; +import java.util.Map; + +/** Samples for NetworkDevices Create. */ +public final class NetworkDevicesCreateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Create_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkDevices_Create_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkDevicesCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .l2IsolationDomains() - .getByResourceGroupWithResponse( - "resourceGroupName", "l2IsolationDomainName", com.azure.core.util.Context.NONE); + .networkDevices() + .define("example-device") + .withRegion("eastuseuap") + .withExistingResourceGroup("example-rg") + .withTags(mapOf("keyID", "KeyValue")) + .withNetworkDeviceSku("DeviceSku") + .withHostname("NFA-Device") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .withAnnotation("annotation") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### L2IsolationDomains_List +### NetworkDevices_Delete ```java -/** Samples for L2IsolationDomains List. */ -public final class L2IsolationDomainsListSamples { +/** Samples for NetworkDevices Delete. */ +public final class NetworkDevicesDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Delete_MaximumSet_Gen.json */ /** - * Sample code: L2IsolationDomains_ListBySubscription_MaximumSet_Gen. + * Sample code: NetworkDevices_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l2IsolationDomainsListBySubscriptionMaximumSetGen( + public static void networkDevicesDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.l2IsolationDomains().list(com.azure.core.util.Context.NONE); + manager.networkDevices().delete("example-rg", "example-device", com.azure.core.util.Context.NONE); } } ``` -### L2IsolationDomains_ListByResourceGroup +### NetworkDevices_GetByResourceGroup ```java -/** Samples for L2IsolationDomains ListByResourceGroup. */ -public final class L2IsolationDomainsListByResourceGroupSamples { +/** Samples for NetworkDevices GetByResourceGroup. */ +public final class NetworkDevicesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Get_MaximumSet_Gen.json */ /** - * Sample code: L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen. + * Sample code: NetworkDevices_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l2IsolationDomainsListByResourceGroupMaximumSetGen( + public static void networkDevicesGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.l2IsolationDomains().listByResourceGroup("resourceGroupName", com.azure.core.util.Context.NONE); + manager + .networkDevices() + .getByResourceGroupWithResponse("example-rg", "example-device", com.azure.core.util.Context.NONE); } } ``` -### L2IsolationDomains_Update +### NetworkDevices_List ```java -import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; +/** Samples for NetworkDevices List. */ +public final class NetworkDevicesListSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkDevices_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkDevicesListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkDevices().list(com.azure.core.util.Context.NONE); + } +} +``` -/** Samples for L2IsolationDomains Update. */ -public final class L2IsolationDomainsUpdateSamples { +### NetworkDevices_ListByResourceGroup + +```java +/** Samples for NetworkDevices ListByResourceGroup. */ +public final class NetworkDevicesListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: L2IsolationDomains_Update_MaximumSet_Gen. + * Sample code: NetworkDevices_ListByResourceGroup_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l2IsolationDomainsUpdateMaximumSetGen( + public static void networkDevicesListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - L2IsolationDomain resource = - manager - .l2IsolationDomains() - .getByResourceGroupWithResponse( - "resourceGroupName", "l2IsolationDomainName", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withMtu(9000).apply(); + manager.networkDevices().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } ``` -### L2IsolationDomains_UpdateAdministrativeState +### NetworkDevices_Reboot ```java -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Arrays; +import com.azure.resourcemanager.managednetworkfabric.models.RebootProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RebootType; -/** Samples for L2IsolationDomains UpdateAdministrativeState. */ -public final class L2IsolationDomainsUpdateAdministrativeStateSamples { +/** Samples for NetworkDevices Reboot. */ +public final class NetworkDevicesRebootSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Reboot_MaximumSet_Gen.json */ /** - * Sample code: L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen. + * Sample code: NetworkDevices_Reboot_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l2IsolationDomainsUpdateAdministrativeStateMaximumSetGen( + public static void networkDevicesRebootMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .l2IsolationDomains() - .updateAdministrativeState( - "resourceGroupName", - "l2IsolationDomainName", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain")) - .withState(AdministrativeState.ENABLE), + .networkDevices() + .reboot( + "example-rg", + "example-device", + new RebootProperties().withRebootType(RebootType.GRACEFUL_REBOOT_WITH_ZTP), com.azure.core.util.Context.NONE); } } ``` -### L3IsolationDomains_ClearArpTable +### NetworkDevices_RefreshConfiguration ```java -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import java.util.Arrays; +/** Samples for NetworkDevices RefreshConfiguration. */ +public final class NetworkDevicesRefreshConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_RefreshConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkDevices_RefreshConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkDevicesRefreshConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkDevices().refreshConfiguration("example-rg", "example-device", com.azure.core.util.Context.NONE); + } +} +``` -/** Samples for L3IsolationDomains ClearArpTable. */ -public final class L3IsolationDomainsClearArpTableSamples { +### NetworkDevices_Update + +```java +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; +import java.util.HashMap; +import java.util.Map; + +/** Samples for NetworkDevices Update. */ +public final class NetworkDevicesUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_clearArpTable_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Update_MaximumSet_Gen.json */ /** - * Sample code: L3IsolationDomains_clearArpTable_MaximumSet_Gen. + * Sample code: NetworkDevices_Update_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l3IsolationDomainsClearArpTableMaximumSetGen( + public static void networkDevicesUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .l3IsolationDomains() - .clearArpTable( - "resourceGroupName", - "l3IsolationDomainName", - new EnableDisableOnResources() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")), - com.azure.core.util.Context.NONE); + NetworkDevice resource = + manager + .networkDevices() + .getByResourceGroupWithResponse("example-rg", "example-device", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("keyID", "KeyValue")) + .withHostname("NFA-Device") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .withAnnotation("annotation") + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### L3IsolationDomains_ClearNeighborTable +### NetworkDevices_UpdateAdministrativeState ```java -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; +import com.azure.resourcemanager.managednetworkfabric.models.DeviceAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; import java.util.Arrays; -/** Samples for L3IsolationDomains ClearNeighborTable. */ -public final class L3IsolationDomainsClearNeighborTableSamples { +/** Samples for NetworkDevices UpdateAdministrativeState. */ +public final class NetworkDevicesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_clearNeighborTable_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_UpdateAdministrativeState_MaximumSet_Gen.json */ /** - * Sample code: L3IsolationDomains_clearNeighborTable_MaximumSet_Gen. + * Sample code: NetworkDevices_UpdateAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l3IsolationDomainsClearNeighborTableMaximumSetGen( + public static void networkDevicesUpdateAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .l3IsolationDomains() - .clearNeighborTable( - "resourceGroupName", - "example-l3domain", - new EnableDisableOnResources().withResourceIds(Arrays.asList("wnaxqikneofcni")), + .networkDevices() + .updateAdministrativeState( + "example-rg", + "example-device", + new UpdateDeviceAdministrativeState() + .withResourceIds(Arrays.asList("")) + .withState(DeviceAdministrativeState.RMA), com.azure.core.util.Context.NONE); } } ``` -### L3IsolationDomains_Create +### NetworkDevices_Upgrade ```java -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; -import java.util.Arrays; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; -/** Samples for L3IsolationDomains Create. */ -public final class L3IsolationDomainsCreateSamples { +/** Samples for NetworkDevices Upgrade. */ +public final class NetworkDevicesUpgradeSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Upgrade_MaximumSet_Gen.json */ /** - * Sample code: L3IsolationDomains_Create_MaximumSet_Gen. + * Sample code: NetworkDevices_Upgrade_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l3IsolationDomainsCreateMaximumSetGen( + public static void networkDevicesUpgradeMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .l3IsolationDomains() - .define("example-l3domain") - .withRegion("eastus") - .withExistingResourceGroup("resourceGroupName") - .withNetworkFabricId( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/networkFabrics/FabricName") - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) - .withAggregateRouteConfiguration( - new AggregateRouteConfiguration() - .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("10.0.0.0/24"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("10.0.0.1")))) - .withDescription("creating L3 isolation domain") - .withConnectedSubnetRoutePolicy( - new L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy() - .withExportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2")) - .create(); + .networkDevices() + .upgrade( + "example-rg", + "example-device", + new UpdateVersion().withVersion("1.0.0"), + com.azure.core.util.Context.NONE); } } ``` -### L3IsolationDomains_Delete +### NetworkFabricControllers_Create ```java -/** Samples for L3IsolationDomains Delete. */ -public final class L3IsolationDomainsDeleteSamples { +import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; +import com.azure.resourcemanager.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled; +import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NfcSku; +import java.util.Arrays; + +/** Samples for NetworkFabricControllers Create. */ +public final class NetworkFabricControllersCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Create_MaximumSet_Gen.json */ /** - * Sample code: L3IsolationDomains_Delete_MaximumSet_Gen. + * Sample code: NetworkFabricControllers_Create_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l3IsolationDomainsDeleteMaximumSetGen( + public static void networkFabricControllersCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.l3IsolationDomains().delete("resourceGroupName", "example-l3domain", com.azure.core.util.Context.NONE); + manager + .networkFabricControllers() + .define("example-networkController") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withManagedResourceGroupConfiguration( + new ManagedResourceGroupConfiguration().withName("managedResourceGroupName").withLocation("eastus")) + .withIsWorkloadManagementNetworkEnabled(IsWorkloadManagementNetworkEnabled.TRUE) + .withIpv4AddressSpace("172.253.0.0/19") + .withIpv6AddressSpace("::/60") + .withNfcSku(NfcSku.STANDARD) + .withInfrastructureExpressRouteConnections( + Arrays + .asList( + new ExpressRouteConnectionInformation() + .withExpressRouteCircuitId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") + .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) + .withWorkloadExpressRouteConnections( + Arrays + .asList( + new ExpressRouteConnectionInformation() + .withExpressRouteCircuitId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") + .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) + .withAnnotation("annotation") + .create(); } } ``` -### L3IsolationDomains_GetByResourceGroup +### NetworkFabricControllers_Delete ```java -/** Samples for L3IsolationDomains GetByResourceGroup. */ -public final class L3IsolationDomainsGetByResourceGroupSamples { +/** Samples for NetworkFabricControllers Delete. */ +public final class NetworkFabricControllersDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Delete_MaximumSet_Gen.json */ /** - * Sample code: L3IsolationDomains_Get_MaximumSet_Gen. + * Sample code: NetworkFabricControllers_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l3IsolationDomainsGetMaximumSetGen( + public static void networkFabricControllersDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .l3IsolationDomains() - .getByResourceGroupWithResponse("resourceGroupName", "example-l3domain", com.azure.core.util.Context.NONE); + .networkFabricControllers() + .delete("example-rg", "example-networkController", com.azure.core.util.Context.NONE); } } ``` -### L3IsolationDomains_List +### NetworkFabricControllers_GetByResourceGroup ```java -/** Samples for L3IsolationDomains List. */ -public final class L3IsolationDomainsListSamples { +/** Samples for NetworkFabricControllers GetByResourceGroup. */ +public final class NetworkFabricControllersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Get_MaximumSet_Gen.json */ /** - * Sample code: L3IsolationDomains_ListBySubscription_MaximumSet_Gen. + * Sample code: NetworkFabricControllers_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l3IsolationDomainsListBySubscriptionMaximumSetGen( + public static void networkFabricControllersGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.l3IsolationDomains().list(com.azure.core.util.Context.NONE); + manager + .networkFabricControllers() + .getByResourceGroupWithResponse( + "example-rg", "example-networkController", com.azure.core.util.Context.NONE); } } ``` -### L3IsolationDomains_ListByResourceGroup +### NetworkFabricControllers_List ```java -/** Samples for L3IsolationDomains ListByResourceGroup. */ -public final class L3IsolationDomainsListByResourceGroupSamples { +/** Samples for NetworkFabricControllers List. */ +public final class NetworkFabricControllersListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen. + * Sample code: NetworkFabricControllers_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l3IsolationDomainsListByResourceGroupMaximumSetGen( + public static void networkFabricControllersListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.l3IsolationDomains().listByResourceGroup("resourceGroupName", com.azure.core.util.Context.NONE); + manager.networkFabricControllers().list(com.azure.core.util.Context.NONE); } } ``` -### L3IsolationDomains_Update +### NetworkFabricControllers_ListByResourceGroup ```java -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; -import java.util.Arrays; - -/** Samples for L3IsolationDomains Update. */ -public final class L3IsolationDomainsUpdateSamples { +/** Samples for NetworkFabricControllers ListByResourceGroup. */ +public final class NetworkFabricControllersListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: L3IsolationDomains_Update_MaximumSet_Gen. + * Sample code: NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l3IsolationDomainsUpdateMaximumSetGen( + public static void networkFabricControllersListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - L3IsolationDomain resource = - manager - .l3IsolationDomains() - .getByResourceGroupWithResponse( - "resourceGroupName", "example-l3domain", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) - .withAggregateRouteConfiguration( - new AggregateRouteConfiguration() - .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("10.0.0.0/24"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("3FFE:FFFF:0:CD30::a0/29")))) - .withDescription("creating L3 isolation domain") - .withConnectedSubnetRoutePolicy( - new L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy() - .withExportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) - .apply(); + manager.networkFabricControllers().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } ``` -### L3IsolationDomains_UpdateAdministrativeState +### NetworkFabricControllers_Update ```java -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricController; import java.util.Arrays; -/** Samples for L3IsolationDomains UpdateAdministrativeState. */ -public final class L3IsolationDomainsUpdateAdministrativeStateSamples { +/** Samples for NetworkFabricControllers Update. */ +public final class NetworkFabricControllersUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Update_MaximumSet_Gen.json */ /** - * Sample code: L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen. + * Sample code: NetworkFabricControllers_Update_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l3IsolationDomainsUpdateAdministrativeStateMaximumSetGen( + public static void networkFabricControllersUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .l3IsolationDomains() - .updateAdministrativeState( - "resourceGroupName", - "example-l3domain", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) - .withState(AdministrativeState.ENABLE), - com.azure.core.util.Context.NONE); + NetworkFabricController resource = + manager + .networkFabricControllers() + .getByResourceGroupWithResponse( + "example-rg", "example-networkController", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withInfrastructureExpressRouteConnections( + Arrays + .asList( + new ExpressRouteConnectionInformation() + .withExpressRouteCircuitId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") + .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) + .withWorkloadExpressRouteConnections( + Arrays + .asList( + new ExpressRouteConnectionInformation() + .withExpressRouteCircuitId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") + .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) + .apply(); } } ``` -### L3IsolationDomains_UpdateOptionBAdministrativeState +### NetworkFabricSkus_Get ```java -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Arrays; - -/** Samples for L3IsolationDomains UpdateOptionBAdministrativeState. */ -public final class L3IsolationDomainsUpdateOptionBAdministrativeStateSamples { +/** Samples for NetworkFabricSkus Get. */ +public final class NetworkFabricSkusGetSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_updateOptionBAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricSkus_Get_MaximumSet_Gen.json */ /** - * Sample code: L3IsolationDomains_updateOptionBAdministrativeState_MaximumSet_Gen. + * Sample code: NetworkFabricSkus_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l3IsolationDomainsUpdateOptionBAdministrativeStateMaximumSetGen( + public static void networkFabricSkusGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .l3IsolationDomains() - .updateOptionBAdministrativeState( - "resourceGroupName", - "example-l3domain", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) - .withState(AdministrativeState.ENABLE), - com.azure.core.util.Context.NONE); + manager.networkFabricSkus().getWithResponse("example-fabricsku", com.azure.core.util.Context.NONE); } } ``` -### NetworkDeviceSkus_Get +### NetworkFabricSkus_List ```java -/** Samples for NetworkDeviceSkus Get. */ -public final class NetworkDeviceSkusGetSamples { +/** Samples for NetworkFabricSkus List. */ +public final class NetworkFabricSkusListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricSkus_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: NetworkDeviceSkus_Get_MaximumSet_Gen. + * Sample code: NetworkFabricSkus_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDeviceSkusGetMaximumSetGen( + public static void networkFabricSkusListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDeviceSkus().getWithResponse("DefaultSku", com.azure.core.util.Context.NONE); + manager.networkFabricSkus().list(com.azure.core.util.Context.NONE); } } ``` -### NetworkDeviceSkus_List +### NetworkFabrics_CommitConfiguration ```java -/** Samples for NetworkDeviceSkus List. */ -public final class NetworkDeviceSkusListSamples { +/** Samples for NetworkFabrics CommitConfiguration. */ +public final class NetworkFabricsCommitConfigurationSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_CommitConfiguration_MaximumSet_Gen.json */ /** - * Sample code: NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen. + * Sample code: NetworkFabrics_CommitConfiguration_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDeviceSkusListBySubscriptionMaximumSetGen( + public static void networkFabricsCommitConfigurationMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDeviceSkus().list(com.azure.core.util.Context.NONE); + manager.networkFabrics().commitConfiguration("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_Create +### NetworkFabrics_Create ```java -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleTypes; +import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPropertiesOptionAProperties; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for NetworkDevices Create. */ -public final class NetworkDevicesCreateSamples { +/** Samples for NetworkFabrics Create. */ +public final class NetworkFabricsCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Create_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_Create_MaximumSet_Gen. + * Sample code: NetworkFabrics_Create_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesCreateMaximumSetGen( + public static void networkFabricsCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .networkDevices() - .define("networkDeviceName") - .withRegion("eastus") - .withExistingResourceGroup("resourceGroupName") + .networkFabrics() + .define("example-fabric") + .withRegion("eastuseuap") + .withExistingResourceGroup("example-rg") + .withNetworkFabricSku("M4-A400-A100-C16-aa") + .withNetworkFabricControllerId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-fabricController") + .withServerCountPerRack(8) + .withIpv4Prefix("10.18.0.0/19") + .withFabricAsn(29249L) + .withTerminalServerConfiguration( + new TerminalServerConfiguration() + .withUsername("username") + .withPassword("fakeTokenPlaceholder") + .withSerialNumber("123456") + .withPrimaryIpv4Prefix("10.0.0.12/30") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") + .withSecondaryIpv4Prefix("20.0.0.13/30") + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127")) + .withManagementNetworkConfiguration( + new ManagementNetworkConfigurationProperties() + .withInfrastructureVpnConfiguration( + new VpnConfigurationProperties() + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties( + new OptionBProperties() + .withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets( + new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10039")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10039")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10039")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10039")))) + .withOptionAProperties( + new VpnConfigurationPropertiesOptionAProperties() + .withMtu(1501) + .withVlanId(3001) + .withPeerAsn(1235L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withPrimaryIpv4Prefix("10.0.0.12/30") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") + .withSecondaryIpv4Prefix("20.0.0.13/30") + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127"))) + .withWorkloadVpnConfiguration( + new VpnConfigurationProperties() + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties( + new OptionBProperties() + .withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets( + new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10039")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10039")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10039")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10039")))) + .withOptionAProperties( + new VpnConfigurationPropertiesOptionAProperties() + .withMtu(1500) + .withVlanId(3000) + .withPeerAsn(61234L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5)) + .withPrimaryIpv4Prefix("10.0.0.14/30") + .withPrimaryIpv6Prefix("2FFE:FFFF:0:CD30::a7/126") + .withSecondaryIpv4Prefix("10.0.0.15/30") + .withSecondaryIpv6Prefix("2FFE:FFFF:0:CD30::ac/126")))) .withTags(mapOf("keyID", "keyValue")) - .withNetworkDeviceSku("DefaultSku") - .withNetworkDeviceRole(NetworkDeviceRoleTypes.CE) - .withHostname("networkDeviceName") - .withSerialNumber("Arista;DCS-7280PR3-24;12.05;JPE21330382") - .withAnnotation("null") + .withRackCount(4) + .withIpv6Prefix("3FFE:FFFF:0:CD40::/59") + .withAnnotation("annotation") .create(); } @@ -2305,662 +3602,706 @@ public final class NetworkDevicesCreateSamples { } ``` -### NetworkDevices_Delete +### NetworkFabrics_Delete ```java -/** Samples for NetworkDevices Delete. */ -public final class NetworkDevicesDeleteSamples { +/** Samples for NetworkFabrics Delete. */ +public final class NetworkFabricsDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Delete_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_Delete_MaximumSet_Gen. + * Sample code: NetworkFabrics_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesDeleteMaximumSetGen( + public static void networkFabricsDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices().delete("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); + manager.networkFabrics().delete("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_GenerateSupportPackage +### NetworkFabrics_Deprovision ```java -/** Samples for NetworkDevices GenerateSupportPackage. */ -public final class NetworkDevicesGenerateSupportPackageSamples { +/** Samples for NetworkFabrics Deprovision. */ +public final class NetworkFabricsDeprovisionSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_generateSupportPackage_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_deprovision_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_generateSupportPackage_MaximumSet_Gen. + * Sample code: NetworkFabrics_deprovision_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesGenerateSupportPackageMaximumSetGen( + public static void networkFabricsDeprovisionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkDevices() - .generateSupportPackage("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); + manager.networkFabrics().deprovision("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_GetByResourceGroup +### NetworkFabrics_GetByResourceGroup ```java -/** Samples for NetworkDevices GetByResourceGroup. */ -public final class NetworkDevicesGetByResourceGroupSamples { +/** Samples for NetworkFabrics GetByResourceGroup. */ +public final class NetworkFabricsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Get_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_Get_MaximumSet_Gen. + * Sample code: NetworkFabrics_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesGetMaximumSetGen( + public static void networkFabricsGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .networkDevices() - .getByResourceGroupWithResponse("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); + .networkFabrics() + .getByResourceGroupWithResponse("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_GetDynamicInterfaceMaps +### NetworkFabrics_GetTopology ```java -/** Samples for NetworkDevices GetDynamicInterfaceMaps. */ -public final class NetworkDevicesGetDynamicInterfaceMapsSamples { +/** Samples for NetworkFabrics GetTopology. */ +public final class NetworkFabricsGetTopologySamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getDynamicInterfaceMaps_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_GetTopology_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_getDynamicInterfaceMaps_MaximumSet_Gen. + * Sample code: NetworkFabrics_GetTopology_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesGetDynamicInterfaceMapsMaximumSetGen( + public static void networkFabricsGetTopologyMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkDevices() - .getDynamicInterfaceMaps("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); + manager.networkFabrics().getTopology("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_GetStaticInterfaceMaps +### NetworkFabrics_List ```java -/** Samples for NetworkDevices GetStaticInterfaceMaps. */ -public final class NetworkDevicesGetStaticInterfaceMapsSamples { +/** Samples for NetworkFabrics List. */ +public final class NetworkFabricsListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getStaticInterfaceMaps_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_getStaticInterfaceMaps_MaximumSet_Gen. + * Sample code: NetworkFabrics_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesGetStaticInterfaceMapsMaximumSetGen( + public static void networkFabricsListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkDevices() - .getStaticInterfaceMaps("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); + manager.networkFabrics().list(com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_GetStatus +### NetworkFabrics_ListByResourceGroup ```java -/** Samples for NetworkDevices GetStatus. */ -public final class NetworkDevicesGetStatusSamples { +/** Samples for NetworkFabrics ListByResourceGroup. */ +public final class NetworkFabricsListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getStatus_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_getStatus_MaximumSet_Gen. + * Sample code: NetworkFabrics_ListByResourceGroup_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesGetStatusMaximumSetGen( + public static void networkFabricsListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices().getStatus("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); + manager.networkFabrics().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_List +### NetworkFabrics_Provision ```java -/** Samples for NetworkDevices List. */ -public final class NetworkDevicesListSamples { +/** Samples for NetworkFabrics Provision. */ +public final class NetworkFabricsProvisionSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_provision_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_ListBySubscription_MaximumSet_Gen. + * Sample code: NetworkFabrics_provision_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesListBySubscriptionMaximumSetGen( + public static void networkFabricsProvisionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices().list(com.azure.core.util.Context.NONE); + manager.networkFabrics().provision("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_ListByResourceGroup +### NetworkFabrics_RefreshConfiguration ```java -/** Samples for NetworkDevices ListByResourceGroup. */ -public final class NetworkDevicesListByResourceGroupSamples { +/** Samples for NetworkFabrics RefreshConfiguration. */ +public final class NetworkFabricsRefreshConfigurationSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_refreshConfiguration_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_ListByResourceGroup_MaximumSet_Gen. + * Sample code: NetworkFabrics_refreshConfiguration_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesListByResourceGroupMaximumSetGen( + public static void networkFabricsRefreshConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().refreshConfiguration("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkFabrics_Update + +```java +import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabric; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchablePropertiesOptionAProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for NetworkFabrics Update. */ +public final class NetworkFabricsUpdateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Update_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkFabrics_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices().listByResourceGroup("resourceGroupName", com.azure.core.util.Context.NONE); + NetworkFabric resource = + manager + .networkFabrics() + .getByResourceGroupWithResponse("example-rg", "example-fabric", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("keyID", "KeyValue")) + .withRackCount(6) + .withServerCountPerRack(10) + .withIpv4Prefix("10.18.0.0/17") + .withIpv6Prefix("3FFE:FFFF:0:CD40::/60") + .withFabricAsn(12345L) + .withTerminalServerConfiguration( + new NetworkFabricPatchablePropertiesTerminalServerConfiguration() + .withUsername("username1") + .withPassword("fakeTokenPlaceholder") + .withSerialNumber("1234567") + .withPrimaryIpv4Prefix("10.0.0.12/30") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") + .withSecondaryIpv4Prefix("40.0.0.14/30") + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127")) + .withManagementNetworkConfiguration( + new ManagementNetworkConfigurationPatchableProperties() + .withInfrastructureVpnConfiguration( + new VpnConfigurationPatchableProperties() + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .withPeeringOption(PeeringOption.OPTIONB) + .withOptionBProperties( + new OptionBProperties() + .withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets( + new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) + .withOptionAProperties( + new VpnConfigurationPatchablePropertiesOptionAProperties() + .withMtu(1501) + .withVlanId(3001) + .withPeerAsn(1235L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withPrimaryIpv4Prefix("10.0.0.12/30") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") + .withSecondaryIpv4Prefix("20.0.0.13/30") + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127"))) + .withWorkloadVpnConfiguration( + new VpnConfigurationPatchableProperties() + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties( + new OptionBProperties() + .withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets( + new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) + .withOptionAProperties( + new VpnConfigurationPatchablePropertiesOptionAProperties() + .withMtu(1500) + .withVlanId(3000) + .withPeerAsn(61234L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5)) + .withPrimaryIpv4Prefix("10.0.0.14/30") + .withPrimaryIpv6Prefix("2FFE:FFFF:0:CD30::a7/126") + .withSecondaryIpv4Prefix("10.0.0.15/30") + .withSecondaryIpv6Prefix("2FFE:FFFF:0:CD30::ac/126")))) + .withAnnotation("annotation1") + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### NetworkDevices_Reboot +### NetworkFabrics_UpdateInfraManagementBfdConfiguration ```java -/** Samples for NetworkDevices Reboot. */ -public final class NetworkDevicesRebootSamples { +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for NetworkFabrics UpdateInfraManagementBfdConfiguration. */ +public final class NetworkFabricsUpdateInfraManagementBfdConfigurationSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_reboot_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_UpdateInfraManagementBfdConfiguration_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_reboot_MaximumSet_Gen. + * Sample code: NetworkFabrics_UpdateInfraManagementBfdConfiguration_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesRebootMaximumSetGen( + public static void networkFabricsUpdateInfraManagementBfdConfigurationMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices().reboot("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); + manager + .networkFabrics() + .updateInfraManagementBfdConfiguration( + "example-rg", + "example-fabric", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_RestoreConfig +### NetworkFabrics_UpdateWorkloadManagementBfdConfiguration ```java -/** Samples for NetworkDevices RestoreConfig. */ -public final class NetworkDevicesRestoreConfigSamples { +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for NetworkFabrics UpdateWorkloadManagementBfdConfiguration. */ +public final class NetworkFabricsUpdateWorkloadManagementBfdConfigurationSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_restoreConfig_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_UpdateWorkloadManagementBfdConfiguration_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_restoreConfig_MaximumSet_Gen. + * Sample code: NetworkFabrics_UpdateWorkloadManagementBfdConfiguration_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesRestoreConfigMaximumSetGen( + public static void networkFabricsUpdateWorkloadManagementBfdConfigurationMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .networkDevices() - .restoreConfig("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); + .networkFabrics() + .updateWorkloadManagementBfdConfiguration( + "example-rg", + "example-fabric", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_Update +### NetworkFabrics_Upgrade ```java -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; -/** Samples for NetworkDevices Update. */ -public final class NetworkDevicesUpdateSamples { +/** Samples for NetworkFabrics Upgrade. */ +public final class NetworkFabricsUpgradeSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_upgrade_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_Update_MaximumSet_Gen. + * Sample code: NetworkFabrics_upgrade_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesUpdateMaximumSetGen( + public static void networkFabricsUpgradeMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - NetworkDevice resource = - manager - .networkDevices() - .getByResourceGroupWithResponse( - "resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf("keyID", "keyValue")) - .withHostname("networkDeviceName") - .withSerialNumber("Arista;DCS-7280PR3-24;12.05;JPE21330382") - .withAnnotation("null") - .apply(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + manager + .networkFabrics() + .upgrade( + "example-rg", + "example-fabric", + new UpdateVersion().withVersion("version1"), + com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_UpdatePowerCycle +### NetworkFabrics_ValidateConfiguration ```java -import com.azure.resourcemanager.managednetworkfabric.models.PowerEnd; -import com.azure.resourcemanager.managednetworkfabric.models.State; -import com.azure.resourcemanager.managednetworkfabric.models.UpdatePowerCycleProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateAction; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties; -/** Samples for NetworkDevices UpdatePowerCycle. */ -public final class NetworkDevicesUpdatePowerCycleSamples { +/** Samples for NetworkFabrics ValidateConfiguration. */ +public final class NetworkFabricsValidateConfigurationSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_updatePowerCycle_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_ValidateConfiguration_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_updatePowerCycle_MaximumSet_Gen. + * Sample code: NetworkFabrics_ValidateConfiguration_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesUpdatePowerCycleMaximumSetGen( + public static void networkFabricsValidateConfigurationMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .networkDevices() - .updatePowerCycle( - "resourceGroupName", - "networkDeviceName", - new UpdatePowerCycleProperties().withPowerEnd(PowerEnd.PRIMARY).withState(State.ON), + .networkFabrics() + .validateConfiguration( + "example-rg", + "example-fabric", + new ValidateConfigurationProperties().withValidateAction(ValidateAction.CABLING), com.azure.core.util.Context.NONE); } } ``` -### NetworkDevices_UpdateVersion +### NetworkInterfaces_Create ```java -import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersionProperties; - -/** Samples for NetworkDevices UpdateVersion. */ -public final class NetworkDevicesUpdateVersionSamples { +/** Samples for NetworkInterfaces Create. */ +public final class NetworkInterfacesCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_updateVersion_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Create_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_updateVersion_MaximumSet_Gen. + * Sample code: NetworkInterfaces_Create_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesUpdateVersionMaximumSetGen( + public static void networkInterfacesCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .networkDevices() - .updateVersion( - "resourceGroupName", - "networkDeviceName", - new UpdateVersionProperties().withSkuVersion("DefaultSku"), - com.azure.core.util.Context.NONE); + .networkInterfaces() + .define("example-interface") + .withExistingNetworkDevice("example-rg", "example-device") + .withAnnotation("annotation") + .create(); } } ``` -### NetworkFabricControllers_Create +### NetworkInterfaces_Delete ```java -import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; -import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration; -import java.util.Arrays; - -/** Samples for NetworkFabricControllers Create. */ -public final class NetworkFabricControllersCreateSamples { +/** Samples for NetworkInterfaces Delete. */ +public final class NetworkInterfacesDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Delete_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabricControllers_Create_MaximumSet_Gen. + * Sample code: NetworkInterfaces_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricControllersCreateMaximumSetGen( + public static void networkInterfacesDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkFabricControllers() - .define("NetworkControllerName") - .withRegion("eastus") - .withExistingResourceGroup("resourceGroupName") - .withManagedResourceGroupConfiguration( - new ManagedResourceGroupConfiguration().withName("managedResourceGroupName").withLocation("eastus")) - .withIpv4AddressSpace("172.253.0.0/19") - .withInfrastructureExpressRouteConnections( - Arrays - .asList( - new ExpressRouteConnectionInformation() - .withExpressRouteCircuitId( - "/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") - .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) - .withWorkloadExpressRouteConnections( - Arrays - .asList( - new ExpressRouteConnectionInformation() - .withExpressRouteCircuitId( - "/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") - .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) - .withAnnotation("lab 1") - .create(); + manager.networkInterfaces().delete("rgNetworkDevices", "sjzd", "emrgu", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabricControllers_Delete +### NetworkInterfaces_Get ```java -/** Samples for NetworkFabricControllers Delete. */ -public final class NetworkFabricControllersDeleteSamples { +/** Samples for NetworkInterfaces Get. */ +public final class NetworkInterfacesGetSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Get_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabricControllers_Delete_MaximumSet_Gen. + * Sample code: NetworkInterfaces_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricControllersDeleteMaximumSetGen( + public static void networkInterfacesGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .networkFabricControllers() - .delete("resourceGroupName", "networkFabricControllerName", com.azure.core.util.Context.NONE); + .networkInterfaces() + .getWithResponse("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabricControllers_DisableWorkloadManagementNetwork +### NetworkInterfaces_ListByNetworkDevice ```java -/** Samples for NetworkFabricControllers DisableWorkloadManagementNetwork. */ -public final class NetworkFabricControllersDisableWorkloadManagementNetworkSamples { +/** Samples for NetworkInterfaces ListByNetworkDevice. */ +public final class NetworkInterfacesListByNetworkDeviceSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_disableWorkloadManagementNetwork_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_ListByNetworkDevice_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabricControllers_disableWorkloadManagementNetwork_MaximumSet_Gen. + * Sample code: NetworkInterfaces_ListByNetworkDevice_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricControllersDisableWorkloadManagementNetworkMaximumSetGen( + public static void networkInterfacesListByNetworkDeviceMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .networkFabricControllers() - .disableWorkloadManagementNetwork( - "resourceGroupName", "networkFabricControllerName", com.azure.core.util.Context.NONE); + .networkInterfaces() + .listByNetworkDevice("example-rg", "example-device", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabricControllers_EnableWorkloadManagementNetwork +### NetworkInterfaces_Update ```java -/** Samples for NetworkFabricControllers EnableWorkloadManagementNetwork. */ -public final class NetworkFabricControllersEnableWorkloadManagementNetworkSamples { +import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; + +/** Samples for NetworkInterfaces Update. */ +public final class NetworkInterfacesUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_enableWorkloadManagementNetwork_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Update_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabricControllers_enableWorkloadManagementNetwork_MaximumSet_Gen. + * Sample code: NetworkInterfaces_Update_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricControllersEnableWorkloadManagementNetworkMaximumSetGen( + public static void networkInterfacesUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkFabricControllers() - .enableWorkloadManagementNetwork( - "resourceGroupName", "networkFabricControllerName", com.azure.core.util.Context.NONE); + NetworkInterface resource = + manager + .networkInterfaces() + .getWithResponse("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withAnnotation("annotation").apply(); } } ``` -### NetworkFabricControllers_GetByResourceGroup +### NetworkInterfaces_UpdateAdministrativeState ```java -/** Samples for NetworkFabricControllers GetByResourceGroup. */ -public final class NetworkFabricControllersGetByResourceGroupSamples { +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for NetworkInterfaces UpdateAdministrativeState. */ +public final class NetworkInterfacesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_UpdateAdministrativeState_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabricControllers_Get_MaximumSet_Gen. + * Sample code: NetworkInterfaces_UpdateAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricControllersGetMaximumSetGen( + public static void networkInterfacesUpdateAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .networkFabricControllers() - .getByResourceGroupWithResponse( - "resourceGroupName", "networkFabricControllerName", com.azure.core.util.Context.NONE); + .networkInterfaces() + .updateAdministrativeState( + "example-rg", + "example-device", + "example-interface", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); } } ``` -### NetworkFabricControllers_List +### NetworkPacketBrokers_Create ```java -/** Samples for NetworkFabricControllers List. */ -public final class NetworkFabricControllersListSamples { +import java.util.HashMap; +import java.util.Map; + +/** Samples for NetworkPacketBrokers Create. */ +public final class NetworkPacketBrokersCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Create_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabricControllers_ListBySubscription_MaximumSet_Gen. + * Sample code: NetworkPacketBrokers_Create_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricControllersListBySubscriptionMaximumSetGen( + public static void networkPacketBrokersCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabricControllers().list(com.azure.core.util.Context.NONE); + manager + .networkPacketBrokers() + .define("example-networkPacketBroker") + .withRegion("eastuseuap") + .withExistingResourceGroup("example-rg") + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-networkFabric") + .withTags(mapOf("key2806", "key")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### NetworkFabricControllers_ListByResourceGroup +### NetworkPacketBrokers_Delete ```java -/** Samples for NetworkFabricControllers ListByResourceGroup. */ -public final class NetworkFabricControllersListByResourceGroupSamples { +/** Samples for NetworkPacketBrokers Delete. */ +public final class NetworkPacketBrokersDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Delete_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen. + * Sample code: NetworkPacketBrokers_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricControllersListByResourceGroupMaximumSetGen( + public static void networkPacketBrokersDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabricControllers().listByResourceGroup("resourceGroupName", com.azure.core.util.Context.NONE); + manager + .networkPacketBrokers() + .delete("example-rg", "example-networkPacketBroker", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabricControllers_Update +### NetworkPacketBrokers_GetByResourceGroup ```java -import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricController; -import java.util.Arrays; - -/** Samples for NetworkFabricControllers Update. */ -public final class NetworkFabricControllersUpdateSamples { +/** Samples for NetworkPacketBrokers GetByResourceGroup. */ +public final class NetworkPacketBrokersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Get_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabricControllers_Update_MaximumSet_Gen. + * Sample code: NetworkPacketBrokers_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricControllersUpdateMaximumSetGen( + public static void networkPacketBrokersGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - NetworkFabricController resource = - manager - .networkFabricControllers() - .getByResourceGroupWithResponse( - "resourceGroupName", "networkFabricControllerName", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withWorkloadExpressRouteConnections( - Arrays - .asList( - new ExpressRouteConnectionInformation() - .withExpressRouteCircuitId( - "/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") - .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) - .apply(); + manager + .networkPacketBrokers() + .getByResourceGroupWithResponse( + "example-rg", "example-networkPacketBroker", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabricSkus_Get +### NetworkPacketBrokers_List ```java -/** Samples for NetworkFabricSkus Get. */ -public final class NetworkFabricSkusGetSamples { +/** Samples for NetworkPacketBrokers List. */ +public final class NetworkPacketBrokersListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabricSkus_Get_MaximumSet_Gen. + * Sample code: NetworkPacketBrokers_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricSkusGetMaximumSetGen( + public static void networkPacketBrokersListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabricSkus().getWithResponse("networkFabricSkuName", com.azure.core.util.Context.NONE); + manager.networkPacketBrokers().list(com.azure.core.util.Context.NONE); } } ``` -### NetworkFabricSkus_List +### NetworkPacketBrokers_ListByResourceGroup ```java -/** Samples for NetworkFabricSkus List. */ -public final class NetworkFabricSkusListSamples { +/** Samples for NetworkPacketBrokers ListByResourceGroup. */ +public final class NetworkPacketBrokersListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabricSkus_ListBySubscription_MaximumSet_Gen. + * Sample code: NetworkPacketBrokers_ListByResourceGroup_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricSkusListBySubscriptionMaximumSetGen( + public static void networkPacketBrokersListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabricSkus().list(com.azure.core.util.Context.NONE); + manager.networkPacketBrokers().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabrics_Create +### NetworkPacketBrokers_Update ```java -import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBPropertiesAutoGenerated; -import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationProperties; -import java.util.Arrays; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBroker; import java.util.HashMap; -import java.util.Map; - -/** Samples for NetworkFabrics Create. */ -public final class NetworkFabricsCreateSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Create_MaximumSet_Gen.json - */ - /** - * Sample code: NetworkFabrics_Create_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void networkFabricsCreateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkFabrics() - .define("FabricName") - .withRegion("eastuseuap") - .withExistingResourceGroup("resourceGroupName") - .withTags(mapOf("key6468", "")) - .withNetworkFabricSku("M4-A400-A100-C16-aa") - .withRackCount(4) - .withServerCountPerRack(8) - .withIpv4Prefix("10.18.0.0/19") - .withIpv6Prefix("3FFE:FFFF:0:CD40::/59") - .withFabricAsn(29249) - .withNetworkFabricControllerId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName") - .withTerminalServerConfiguration( - new TerminalServerConfiguration() - .withPrimaryIpv4Prefix("20.0.0.12/30") - .withPrimaryIpv6Prefix("3FFE:FFFF:0:CD30::a8/126") - .withSecondaryIpv4Prefix("20.0.0.13/30") - .withSecondaryIpv6Prefix("3FFE:FFFF:0:CD30::ac/126") - .withUsername("username") - .withPassword("fakeTokenPlaceholder") - .withSerialNumber("123456")) - .withManagementNetworkConfiguration( - new ManagementNetworkConfiguration() - .withInfrastructureVpnConfiguration( - new VpnConfigurationProperties() - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties( - new OptionBPropertiesAutoGenerated() - .withImportRouteTargets(Arrays.asList("65046:10039")) - .withExportRouteTargets(Arrays.asList("65046:10039"))) - .withOptionAProperties( - new OptionAProperties() - .withPrimaryIpv4Prefix("20.0.0.12/30") - .withPrimaryIpv6Prefix("3FFE:FFFF:0:CD30::a8/126") - .withSecondaryIpv4Prefix("20.0.0.13/30") - .withSecondaryIpv6Prefix("3FFE:FFFF:0:CD30::ac/126") - .withMtu(5892) - .withVlanId(2724) - .withPeerAsn(42666))) - .withWorkloadVpnConfiguration( - new VpnConfigurationProperties() - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties( - new OptionBPropertiesAutoGenerated() - .withImportRouteTargets(Arrays.asList("65046:10050")) - .withExportRouteTargets(Arrays.asList("65046:10050"))) - .withOptionAProperties( - new OptionAProperties() - .withPrimaryIpv4Prefix("10.0.0.14/30") - .withPrimaryIpv6Prefix("2FFE:FFFF:0:CD30::a7/126") - .withSecondaryIpv4Prefix("10.0.0.15/30") - .withSecondaryIpv6Prefix("2FFE:FFFF:0:CD30::ac/126") - .withMtu(5892) - .withVlanId(2724) - .withPeerAsn(42666)))) - .withAnnotation("annotationValue") - .create(); +import java.util.Map; + +/** Samples for NetworkPacketBrokers Update. */ +public final class NetworkPacketBrokersUpdateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Update_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkPacketBrokers_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkPacketBrokersUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NetworkPacketBroker resource = + manager + .networkPacketBrokers() + .getByResourceGroupWithResponse( + "example-rg", "example-networkPacketBroker", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key8772", "1234")).apply(); } @SuppressWarnings("unchecked") @@ -2976,165 +4317,289 @@ public final class NetworkFabricsCreateSamples { } ``` -### NetworkFabrics_Delete +### NetworkRacks_Create ```java -/** Samples for NetworkFabrics Delete. */ -public final class NetworkFabricsDeleteSamples { +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; +import java.util.HashMap; +import java.util.Map; + +/** Samples for NetworkRacks Create. */ +public final class NetworkRacksCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Create_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabrics_Delete_MaximumSet_Gen. + * Sample code: NetworkRacks_Create_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsDeleteMaximumSetGen( + public static void networkRacksCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .networkFabrics() - .delete("rgNetworkFabrics", "lrhjxlxlhgvufessdcuetcwnto", com.azure.core.util.Context.NONE); + .networkRacks() + .define("example-rack") + .withRegion("eastuseuap") + .withExistingResourceGroup("example-rg") + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-networkFabric") + .withTags(mapOf("keyID", "keyValue")) + .withNetworkRackType(NetworkRackType.AGGREGATE) + .withAnnotation("annotation") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### NetworkFabrics_Deprovision +### NetworkRacks_Delete ```java -/** Samples for NetworkFabrics Deprovision. */ -public final class NetworkFabricsDeprovisionSamples { +/** Samples for NetworkRacks Delete. */ +public final class NetworkRacksDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_deprovision_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Delete_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabrics_deprovision_MaximumSet_Gen. + * Sample code: NetworkRacks_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsDeprovisionMaximumSetGen( + public static void networkRacksDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().deprovision("resourceGroupName", "FabricName", com.azure.core.util.Context.NONE); + manager.networkRacks().delete("example-rg", "example-rack", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabrics_GetByResourceGroup +### NetworkRacks_GetByResourceGroup ```java -/** Samples for NetworkFabrics GetByResourceGroup. */ -public final class NetworkFabricsGetByResourceGroupSamples { +/** Samples for NetworkRacks GetByResourceGroup. */ +public final class NetworkRacksGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Get_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabrics_Get_MaximumSet_Gen. + * Sample code: NetworkRacks_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsGetMaximumSetGen( + public static void networkRacksGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .networkFabrics() - .getByResourceGroupWithResponse("resourceGroupName", "FabricName", com.azure.core.util.Context.NONE); + .networkRacks() + .getByResourceGroupWithResponse("example-rg", "example-rack", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabrics_List +### NetworkRacks_List ```java -/** Samples for NetworkFabrics List. */ -public final class NetworkFabricsListSamples { +/** Samples for NetworkRacks List. */ +public final class NetworkRacksListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabrics_ListBySubscription_MaximumSet_Gen. + * Sample code: NetworkRacks_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsListBySubscriptionMaximumSetGen( + public static void networkRacksListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().list(com.azure.core.util.Context.NONE); + manager.networkRacks().list(com.azure.core.util.Context.NONE); } } ``` -### NetworkFabrics_ListByResourceGroup +### NetworkRacks_ListByResourceGroup ```java -/** Samples for NetworkFabrics ListByResourceGroup. */ -public final class NetworkFabricsListByResourceGroupSamples { +/** Samples for NetworkRacks ListByResourceGroup. */ +public final class NetworkRacksListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabrics_ListByResourceGroup_MaximumSet_Gen. + * Sample code: NetworkRacks_ListByResourceGroup_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsListByResourceGroupMaximumSetGen( + public static void networkRacksListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().listByResourceGroup("rgNetworkFabrics", com.azure.core.util.Context.NONE); + manager.networkRacks().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } ``` -### NetworkFabrics_Provision +### NetworkRacks_Update ```java -/** Samples for NetworkFabrics Provision. */ -public final class NetworkFabricsProvisionSamples { +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; +import java.util.HashMap; +import java.util.Map; + +/** Samples for NetworkRacks Update. */ +public final class NetworkRacksUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_provision_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Update_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabrics_provision_MaximumSet_Gen. + * Sample code: NetworkRacks_Update_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsProvisionMaximumSetGen( + public static void networkRacksUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().provision("resourceGroupName", "FabricName", com.azure.core.util.Context.NONE); + NetworkRack resource = + manager + .networkRacks() + .getByResourceGroupWithResponse("example-rg", "example-rack", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("keyID", "keyValue")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### NetworkFabrics_Update +### NetworkTapRules_Create ```java -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabric; -import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; +import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; +import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortType; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; +import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for NetworkFabrics Update. */ -public final class NetworkFabricsUpdateSamples { +/** Samples for NetworkTapRules Create. */ +public final class NetworkTapRulesCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Create_MaximumSet_Gen.json */ /** - * Sample code: NetworkFabrics_Update_MaximumSet_Gen. + * Sample code: NetworkTapRules_Create_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkFabricsUpdateMaximumSetGen( + public static void networkTapRulesCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - NetworkFabric resource = - manager - .networkFabrics() - .getByResourceGroupWithResponse("resourceGroupName", "FabricName", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf("key1758", "")) - .withTerminalServerConfiguration( - new TerminalServerPatchableProperties() - .withUsername("username") - .withPassword("fakeTokenPlaceholder") - .withSerialNumber("234567")) - .withAnnotation("annotationValue") - .apply(); + manager + .networkTapRules() + .define("example-tapRule") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withTags(mapOf("keyID", "keyValue")) + .withPollingIntervalInSeconds(PollingIntervalInSeconds.THREE_ZERO) + .withConfigurationType(ConfigurationType.FILE) + .withTapRulesUrl("https://microsoft.com/a") + .withMatchConfigurations( + Arrays + .asList( + new NetworkTapRuleMatchConfiguration() + .withMatchConfigurationName("config1") + .withSequenceNumber(10L) + .withIpAddressType(IpAddressType.IPV4) + .withMatchConditions( + Arrays + .asList( + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("TCP")) + .withVlanMatchCondition( + new VlanMatchCondition() + .withVlans(Arrays.asList("10")) + .withInnerVlans(Arrays.asList("11-20")) + .withVlanGroupNames(Arrays.asList("exmaple-vlanGroup"))) + .withIpCondition( + new IpMatchCondition() + .withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("10.10.10.10/20")) + .withIpGroupNames(Arrays.asList("example-ipGroup"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition( + new PortCondition() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("100")) + .withPortGroupNames(Arrays.asList("example-portGroup1"))))) + .withActions( + Arrays + .asList( + new NetworkTapRuleAction() + .withType(TapRuleActionType.DROP) + .withTruncate("100") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup") + .withMatchConfigurationName("match1"))))) + .withDynamicMatchConfigurations( + Arrays + .asList( + new CommonDynamicMatchConfiguration() + .withIpGroups( + Arrays + .asList( + new IpGroupProperties() + .withName("example-ipGroup1") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("10.10.10.10/30")))) + .withVlanGroups( + Arrays + .asList( + new VlanGroupProperties() + .withName("exmaple-vlanGroup") + .withVlans(Arrays.asList("10", "100-200")))) + .withPortGroups( + Arrays + .asList( + new PortGroupProperties() + .withName("example-portGroup1") + .withPorts(Arrays.asList("100-200")), + new PortGroupProperties() + .withName("example-portGroup2") + .withPorts(Arrays.asList("900", "1000-2000")))))) + .withAnnotation("annotation") + .create(); } @SuppressWarnings("unchecked") @@ -3150,245 +4615,340 @@ public final class NetworkFabricsUpdateSamples { } ``` -### NetworkInterfaces_Create +### NetworkTapRules_Delete ```java -/** Samples for NetworkInterfaces Create. */ -public final class NetworkInterfacesCreateSamples { +/** Samples for NetworkTapRules Delete. */ +public final class NetworkTapRulesDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Delete_MaximumSet_Gen.json */ /** - * Sample code: NetworkInterfaces_Create_MaximumSet_Gen. + * Sample code: NetworkTapRules_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkInterfacesCreateMaximumSetGen( + public static void networkTapRulesDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkInterfaces() - .define("networkInterfaceName") - .withExistingNetworkDevice("resourceGroupName", "networkDeviceName") - .withAnnotation("null") - .create(); + manager.networkTapRules().delete("example-rg", "example-tapRule", com.azure.core.util.Context.NONE); } } ``` -### NetworkInterfaces_Delete +### NetworkTapRules_GetByResourceGroup ```java -/** Samples for NetworkInterfaces Delete. */ -public final class NetworkInterfacesDeleteSamples { +/** Samples for NetworkTapRules GetByResourceGroup. */ +public final class NetworkTapRulesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Get_MaximumSet_Gen.json */ /** - * Sample code: NetworkInterfaces_Delete_MaximumSet_Gen. + * Sample code: NetworkTapRules_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkInterfacesDeleteMaximumSetGen( + public static void networkTapRulesGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .networkInterfaces() - .delete("resourceGroupName", "networkDeviceName", "networkInterfaceName", com.azure.core.util.Context.NONE); + .networkTapRules() + .getByResourceGroupWithResponse("example-rg", "example-tapRule", com.azure.core.util.Context.NONE); } } ``` -### NetworkInterfaces_Get +### NetworkTapRules_List ```java -/** Samples for NetworkInterfaces Get. */ -public final class NetworkInterfacesGetSamples { +/** Samples for NetworkTapRules List. */ +public final class NetworkTapRulesListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: NetworkInterfaces_Get_MaximumSet_Gen. + * Sample code: NetworkTapRules_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkInterfacesGetMaximumSetGen( + public static void networkTapRulesListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkInterfaces() - .getWithResponse( - "resourceGroupName", "networkDeviceName", "networkInterfaceName", com.azure.core.util.Context.NONE); + manager.networkTapRules().list(com.azure.core.util.Context.NONE); } } ``` -### NetworkInterfaces_GetStatus +### NetworkTapRules_ListByResourceGroup ```java -/** Samples for NetworkInterfaces GetStatus. */ -public final class NetworkInterfacesGetStatusSamples { +/** Samples for NetworkTapRules ListByResourceGroup. */ +public final class NetworkTapRulesListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_getStatus_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: NetworkInterfaces_getStatus_MaximumSet_Gen. + * Sample code: NetworkTapRules_ListByResourceGroup_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkInterfacesGetStatusMaximumSetGen( + public static void networkTapRulesListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkInterfaces() - .getStatus( - "resourceGroupName", "networkDeviceName", "networkInterfaceName", com.azure.core.util.Context.NONE); + manager.networkTapRules().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } ``` -### NetworkInterfaces_List +### NetworkTapRules_Resync ```java -/** Samples for NetworkInterfaces List. */ -public final class NetworkInterfacesListSamples { +/** Samples for NetworkTapRules Resync. */ +public final class NetworkTapRulesResyncSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_List_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Resync_MaximumSet_Gen.json */ /** - * Sample code: NetworkInterfaces_List_MaximumSet_Gen. + * Sample code: NetworkTapRules_Resync_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkInterfacesListMaximumSetGen( + public static void networkTapRulesResyncMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkInterfaces().list("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); + manager.networkTapRules().resync("example-rg", "example-tapRule", com.azure.core.util.Context.NONE); } } ``` -### NetworkInterfaces_Update +### NetworkTapRules_Update ```java -import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; +import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRule; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortType; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; +import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; -/** Samples for NetworkInterfaces Update. */ -public final class NetworkInterfacesUpdateSamples { +/** Samples for NetworkTapRules Update. */ +public final class NetworkTapRulesUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Update_MaximumSet_Gen.json */ /** - * Sample code: NetworkInterfaces_Update_MaximumSet_Gen. + * Sample code: NetworkTapRules_Update_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkInterfacesUpdateMaximumSetGen( + public static void networkTapRulesUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - NetworkInterface resource = + NetworkTapRule resource = manager - .networkInterfaces() - .getWithResponse( - "resourceGroupName", "networkDeviceName", "networkInterfaceName", com.azure.core.util.Context.NONE) + .networkTapRules() + .getByResourceGroupWithResponse("example-rg", "example-tapRule", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withAnnotation("null").apply(); + resource + .update() + .withTags(mapOf("keyID", "keyValue")) + .withConfigurationType(ConfigurationType.FILE) + .withTapRulesUrl("https://microsoft.com/amdsdx") + .withMatchConfigurations( + Arrays + .asList( + new NetworkTapRuleMatchConfiguration() + .withMatchConfigurationName("config1") + .withSequenceNumber(10L) + .withIpAddressType(IpAddressType.IPV4) + .withMatchConditions( + Arrays + .asList( + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("TCP")) + .withVlanMatchCondition( + new VlanMatchCondition() + .withVlans(Arrays.asList("10")) + .withInnerVlans(Arrays.asList("11-20")) + .withVlanGroupNames(Arrays.asList("exmaple-vlanGroup"))) + .withIpCondition( + new IpMatchCondition() + .withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("10.10.10.10/20")) + .withIpGroupNames(Arrays.asList("example-ipGroup"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition( + new PortCondition() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("100")) + .withPortGroupNames(Arrays.asList("example-portGroup1"))))) + .withActions( + Arrays + .asList( + new NetworkTapRuleAction() + .withType(TapRuleActionType.GOTO) + .withTruncate("100") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup") + .withMatchConfigurationName("match1"))))) + .withDynamicMatchConfigurations( + Arrays + .asList( + new CommonDynamicMatchConfiguration() + .withIpGroups( + Arrays + .asList( + new IpGroupProperties() + .withName("example-ipGroup1") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("10.10.10.10/30")))) + .withVlanGroups( + Arrays + .asList( + new VlanGroupProperties() + .withName("exmaple-vlanGroup") + .withVlans(Arrays.asList("10", "100-200")))) + .withPortGroups( + Arrays + .asList( + new PortGroupProperties() + .withName("example-portGroup1") + .withPorts(Arrays.asList("100-200")))))) + .withAnnotation("annotation") + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### NetworkInterfaces_UpdateAdministrativeState +### NetworkTapRules_UpdateAdministrativeState ```java -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; -/** Samples for NetworkInterfaces UpdateAdministrativeState. */ -public final class NetworkInterfacesUpdateAdministrativeStateSamples { +/** Samples for NetworkTapRules UpdateAdministrativeState. */ +public final class NetworkTapRulesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_UpdateAdministrativeState_MaximumSet_Gen.json */ /** - * Sample code: NetworkInterfaces_updateAdministrativeState_MaximumSet_Gen. + * Sample code: NetworkTapRules_UpdateAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkInterfacesUpdateAdministrativeStateMaximumSetGen( + public static void networkTapRulesUpdateAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .networkInterfaces() + .networkTapRules() .updateAdministrativeState( - "resourceGroupName", - "networkDeviceName", - "networkInterfaceName", - new UpdateAdministrativeState().withState(AdministrativeState.ENABLE), + "example-rg", + "example-tapRule", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } ``` -### NetworkRackSkus_Get - -```java -/** Samples for NetworkRackSkus Get. */ -public final class NetworkRackSkusGetSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_Get_MaximumSet_Gen.json - */ - /** - * Sample code: NetworkRackSkus_Get_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void networkRackSkusGetMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkRackSkus().getWithResponse("networkRackSkuName", com.azure.core.util.Context.NONE); - } -} -``` - -### NetworkRackSkus_List +### NetworkTapRules_ValidateConfiguration ```java -/** Samples for NetworkRackSkus List. */ -public final class NetworkRackSkusListSamples { +/** Samples for NetworkTapRules ValidateConfiguration. */ +public final class NetworkTapRulesValidateConfigurationSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_ValidateConfiguration_MaximumSet_Gen.json */ /** - * Sample code: NetworkRackSkus_ListBySubscription_MaximumSet_Gen. + * Sample code: NetworkTapRules_ValidateConfiguration_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkRackSkusListBySubscriptionMaximumSetGen( + public static void networkTapRulesValidateConfigurationMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkRackSkus().list(com.azure.core.util.Context.NONE); + manager + .networkTapRules() + .validateConfiguration("example-rg", "example-tapRule", com.azure.core.util.Context.NONE); } } ``` -### NetworkRacks_Create +### NetworkTaps_Create ```java +import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; +import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for NetworkRacks Create. */ -public final class NetworkRacksCreateSamples { +/** Samples for NetworkTaps Create. */ +public final class NetworkTapsCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Create_MaximumSet_Gen.json */ /** - * Sample code: NetworkRacks_Create_MaximumSet_Gen. + * Sample code: NetworkTaps_Create_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkRacksCreateMaximumSetGen( + public static void networkTapsCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .networkRacks() - .define("networkRackName") - .withRegion("eastus") - .withExistingResourceGroup("resourceGroupName") - .withNetworkRackSku("RackSKU") - .withNetworkFabricId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/networkFabricName") - .withTags(mapOf("keyID", "keyValue")) - .withAnnotation("null") + .networkTaps() + .define("example-networkTap") + .withRegion("eastuseuap") + .withExistingResourceGroup("example-rg") + .withNetworkPacketBrokerId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/example-networkPacketBroker") + .withDestinations( + Arrays + .asList( + new NetworkTapPropertiesDestinationsItem() + .withName("example-destinaionName") + .withDestinationType(DestinationType.ISOLATION_DOMAIN) + .withDestinationId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsloationDomains/example-l3Domain/internalNetworks/example-internalNetwork") + .withIsolationDomainProperties( + new IsolationDomainProperties() + .withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup"))) + .withDestinationTapRuleId( + "/subscriptions/xxxx-xxxx-xxxx-xxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkTapRules/example-destinationTapRule"))) + .withTags(mapOf("key6024", "1234")) + .withPollingType(PollingType.PULL) + .withAnnotation("annotation") .create(); } @@ -3405,123 +4965,160 @@ public final class NetworkRacksCreateSamples { } ``` -### NetworkRacks_Delete +### NetworkTaps_Delete ```java -/** Samples for NetworkRacks Delete. */ -public final class NetworkRacksDeleteSamples { +/** Samples for NetworkTaps Delete. */ +public final class NetworkTapsDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Delete_MaximumSet_Gen.json */ /** - * Sample code: NetworkRacks_Delete_MaximumSet_Gen. + * Sample code: NetworkTaps_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkRacksDeleteMaximumSetGen( + public static void networkTapsDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkRacks().delete("resourceGroupName", "networkRackName", com.azure.core.util.Context.NONE); + manager.networkTaps().delete("example-rg", "example-networkTap", com.azure.core.util.Context.NONE); } } ``` -### NetworkRacks_GetByResourceGroup +### NetworkTaps_GetByResourceGroup ```java -/** Samples for NetworkRacks GetByResourceGroup. */ -public final class NetworkRacksGetByResourceGroupSamples { +/** Samples for NetworkTaps GetByResourceGroup. */ +public final class NetworkTapsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Get_MaximumSet_Gen.json */ /** - * Sample code: NetworkRacks_Get_MaximumSet_Gen. + * Sample code: NetworkTaps_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkRacksGetMaximumSetGen( + public static void networkTapsGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .networkRacks() - .getByResourceGroupWithResponse("resourceGroupName", "networkRackName", com.azure.core.util.Context.NONE); + .networkTaps() + .getByResourceGroupWithResponse("example-rg", "example-networkTap", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkTaps_List + +```java +/** Samples for NetworkTaps List. */ +public final class NetworkTapsListSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTaps_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapsListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkTaps().list(com.azure.core.util.Context.NONE); } } ``` -### NetworkRacks_List +### NetworkTaps_ListByResourceGroup ```java -/** Samples for NetworkRacks List. */ -public final class NetworkRacksListSamples { +/** Samples for NetworkTaps ListByResourceGroup. */ +public final class NetworkTapsListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: NetworkRacks_ListBySubscription_MaximumSet_Gen. + * Sample code: NetworkTaps_ListByResourceGroup_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkRacksListBySubscriptionMaximumSetGen( + public static void networkTapsListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkRacks().list(com.azure.core.util.Context.NONE); + manager.networkTaps().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } ``` -### NetworkRacks_ListByResourceGroup +### NetworkTaps_Resync ```java -/** Samples for NetworkRacks ListByResourceGroup. */ -public final class NetworkRacksListByResourceGroupSamples { +/** Samples for NetworkTaps Resync. */ +public final class NetworkTapsResyncSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Resync_MaximumSet_Gen.json */ /** - * Sample code: NetworkRacks_ListByResourceGroup_MaximumSet_Gen. + * Sample code: NetworkTaps_Resync_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkRacksListByResourceGroupMaximumSetGen( + public static void networkTapsResyncMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkRacks().listByResourceGroup("resourceGroupName", com.azure.core.util.Context.NONE); + manager.networkTaps().resync("example-rg", "example-networkTap", com.azure.core.util.Context.NONE); } } ``` -### NetworkRacks_Update +### NetworkTaps_Update ```java -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; -import java.io.IOException; +import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; +import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for NetworkRacks Update. */ -public final class NetworkRacksUpdateSamples { +/** Samples for NetworkTaps Update. */ +public final class NetworkTapsUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Update_MaximumSet_Gen.json */ /** - * Sample code: NetworkRacks_Update_MaximumSet_Gen. + * Sample code: NetworkTaps_Update_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkRacksUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) throws IOException { - NetworkRack resource = + public static void networkTapsUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NetworkTap resource = manager - .networkRacks() - .getByResourceGroupWithResponse( - "resourceGroupName", "networkRackName", com.azure.core.util.Context.NONE) + .networkTaps() + .getByResourceGroupWithResponse("example-rg", "example-networkTap", com.azure.core.util.Context.NONE) .getValue(); resource .update() - .withTags(mapOf("keyID", "keyValue")) - .withProperties( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)) + .withTags(mapOf("key6024", "1234")) + .withPollingType(PollingType.PULL) + .withDestinationsForUpdate( + Arrays + .asList( + new NetworkTapPatchableParametersDestinationsItem() + .withName("example-destinaionName") + .withDestinationType(DestinationType.ISOLATION_DOMAIN) + .withDestinationId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsloationDomains/example-l3Domain/internalNetworks/example-internalNetwork") + .withIsolationDomainProperties( + new IsolationDomainProperties() + .withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup"))) + .withDestinationTapRuleId( + "/subscriptions/xxxx-xxxx-xxxx-xxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkTapRules/example-destinationTapRule"))) + .withAnnotation("annotation1") .apply(); } @@ -3538,18 +5135,55 @@ public final class NetworkRacksUpdateSamples { } ``` +### NetworkTaps_UpdateAdministrativeState + +```java +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for NetworkTaps UpdateAdministrativeState. */ +public final class NetworkTapsUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_UpdateAdministrativeState_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTaps_UpdateAdministrativeState_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapsUpdateAdministrativeStateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkTaps() + .updateAdministrativeState( + "example-rg", + "example-networkTap", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} +``` + ### NetworkToNetworkInterconnects_Create ```java +import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; import com.azure.resourcemanager.managednetworkfabric.models.NniType; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import java.util.Arrays; /** Samples for NetworkToNetworkInterconnects Create. */ public final class NetworkToNetworkInterconnectsCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json */ /** * Sample code: NetworkToNetworkInterconnects_Create_MaximumSet_Gen. @@ -3560,24 +5194,57 @@ public final class NetworkToNetworkInterconnectsCreateSamples { com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkToNetworkInterconnects() - .define("DefaultNNI") - .withExistingNetworkFabric("resourceGroupName", "FabricName") + .define("example-nni") + .withExistingNetworkFabric("example-rg", "example-fabric") + .withUseOptionB(BooleanEnumProperty.TRUE) .withNniType(NniType.CE) - .withIsManagementType(BooleanEnumProperty.TRUE) - .withUseOptionB(BooleanEnumProperty.FALSE) - .withLayer2Configuration(new Layer2Configuration().withPortCount(10).withMtu(1500)) - .withLayer3Configuration( - new Layer3Configuration() - .withPrimaryIpv4Prefix("172.31.0.0/31") - .withPrimaryIpv6Prefix("3FFE:FFFF:0:CD30::a0/126") - .withSecondaryIpv4Prefix("172.31.0.20/31") - .withSecondaryIpv6Prefix("3FFE:FFFF:0:CD30::a4/126") - .withImportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1") - .withExportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2") - .withPeerAsn(50272) - .withVlanId(2064)) + .withIsManagementType(IsManagementType.TRUE) + .withLayer2Configuration( + new Layer2Configuration() + .withMtu(1500) + .withInterfaces( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkDevices/example-networkDevice/networkInterfaces/example-networkInterface"))) + .withOptionBLayer3Configuration( + new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration() + .withPrimaryIpv4Prefix("10.0.0.12/30") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") + .withSecondaryIpv4Prefix("40.0.0.14/30") + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127") + .withPeerAsn(61234L) + .withVlanId(1234)) + .withNpbStaticRouteConfiguration( + new NpbStaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(25)) + .withIpv4Routes( + Arrays + .asList( + new StaticRouteProperties() + .withPrefix("20.0.0.12/30") + .withNextHop(Arrays.asList("21.20.20.20")))) + .withIpv6Routes( + Arrays + .asList( + new StaticRouteProperties() + .withPrefix("3FFE:FFFF:0:CD30::ac/127") + .withNextHop(Arrays.asList("4FFE:FFFF:0:CD30::ac"))))) + .withImportRoutePolicy( + new ImportRoutePolicyInformation() + .withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") + .withImportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy")) + .withExportRoutePolicy( + new ExportRoutePolicyInformation() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy")) + .withEgressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withIngressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") .create(); } } @@ -3589,7 +5256,7 @@ public final class NetworkToNetworkInterconnectsCreateSamples { /** Samples for NetworkToNetworkInterconnects Delete. */ public final class NetworkToNetworkInterconnectsDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Delete_MaximumSet_Gen.json */ /** * Sample code: NetworkToNetworkInterconnects_Delete_MaximumSet_Gen. @@ -3600,7 +5267,7 @@ public final class NetworkToNetworkInterconnectsDeleteSamples { com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkToNetworkInterconnects() - .delete("resourceGroupName", "FabricName", "DefaultNNI", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE); } } ``` @@ -3611,7 +5278,7 @@ public final class NetworkToNetworkInterconnectsDeleteSamples { /** Samples for NetworkToNetworkInterconnects Get. */ public final class NetworkToNetworkInterconnectsGetSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json */ /** * Sample code: NetworkToNetworkInterconnects_Get_MaximumSet_Gen. @@ -3622,29 +5289,174 @@ public final class NetworkToNetworkInterconnectsGetSamples { com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkToNetworkInterconnects() - .getWithResponse("resourceGroupName", "FabricName", "DefaultNNI", com.azure.core.util.Context.NONE); + .getWithResponse("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkToNetworkInterconnects_ListByNetworkFabric + +```java +/** Samples for NetworkToNetworkInterconnects ListByNetworkFabric. */ +public final class NetworkToNetworkInterconnectsListByNetworkFabricSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_ListByNetworkFabric_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkToNetworkInterconnects_ListByNetworkFabric_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkToNetworkInterconnectsListByNetworkFabricMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkToNetworkInterconnects() + .listByNetworkFabric("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkToNetworkInterconnects_Update + +```java +import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import java.util.Arrays; + +/** Samples for NetworkToNetworkInterconnects Update. */ +public final class NetworkToNetworkInterconnectsUpdateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Update_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkToNetworkInterconnects_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkToNetworkInterconnectsUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NetworkToNetworkInterconnect resource = + manager + .networkToNetworkInterconnects() + .getWithResponse("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withLayer2Configuration( + new Layer2Configuration() + .withMtu(1500) + .withInterfaces( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkDevices/example-networkDevice/networkInterfaces/example-networkInterface"))) + .withOptionBLayer3Configuration( + new OptionBLayer3Configuration() + .withPrimaryIpv4Prefix("20.0.0.12/29") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") + .withSecondaryIpv4Prefix("20.0.0.14/29") + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127") + .withPeerAsn(2345L) + .withVlanId(1235)) + .withNpbStaticRouteConfiguration( + new NpbStaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(310).withMultiplier(15)) + .withIpv4Routes( + Arrays + .asList( + new StaticRouteProperties() + .withPrefix("20.0.0.11/30") + .withNextHop(Arrays.asList("21.20.20.10")))) + .withIpv6Routes( + Arrays + .asList( + new StaticRouteProperties() + .withPrefix("4FFE:FFFF:0:CD30::ac/127") + .withNextHop(Arrays.asList("5FFE:FFFF:0:CD30::ac"))))) + .withImportRoutePolicy( + new ImportRoutePolicyInformation() + .withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1") + .withImportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1")) + .withExportRoutePolicy( + new ExportRoutePolicyInformation() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1")) + .withEgressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withIngressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .apply(); + } +} +``` + +### NetworkToNetworkInterconnects_UpdateAdministrativeState + +```java +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for NetworkToNetworkInterconnects UpdateAdministrativeState. */ +public final class NetworkToNetworkInterconnectsUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_updateAdministrativeState_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkToNetworkInterconnects_updateAdministrativeState_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkToNetworkInterconnectsUpdateAdministrativeStateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkToNetworkInterconnects() + .updateAdministrativeState( + "example-rg", + "example-fabric", + "example-nni", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); } } ``` -### NetworkToNetworkInterconnects_List +### NetworkToNetworkInterconnects_UpdateNpbStaticRouteBfdAdministrativeState ```java -/** Samples for NetworkToNetworkInterconnects List. */ -public final class NetworkToNetworkInterconnectsListSamples { +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for NetworkToNetworkInterconnects UpdateNpbStaticRouteBfdAdministrativeState. */ +public final class NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeState { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_List_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_updateNpbStaticRouteBfdAdministrativeState_MaximumSet_Gen.json */ /** - * Sample code: NetworkToNetworkInterconnects_List_MaximumSet_Gen. + * Sample code: NetworkToNetworkInterconnects_updateNpbStaticRouteBfdAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkToNetworkInterconnectsListMaximumSetGen( + public static void networkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeStateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkToNetworkInterconnects() - .list("resourceGroupName", "FabricName", com.azure.core.util.Context.NONE); + .updateNpbStaticRouteBfdAdministrativeState( + "example-rg", + "example-fabric", + "example-nni", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); } } ``` @@ -3655,7 +5467,7 @@ public final class NetworkToNetworkInterconnectsListSamples { /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ListOperations.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ListOperations.json */ /** * Sample code: ListOperations. @@ -3669,14 +5481,38 @@ public final class OperationsListSamples { } ``` +### RoutePolicies_CommitConfiguration + +```java +/** Samples for RoutePolicies CommitConfiguration. */ +public final class RoutePoliciesCommitConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_CommitConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: RoutePolicies_CommitConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void routePoliciesCommitConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .routePolicies() + .commitConfiguration("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE); + } +} +``` + ### RoutePolicies_Create ```java import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties; import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyActionType; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyConditionType; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; @@ -3687,7 +5523,7 @@ import java.util.Map; /** Samples for RoutePolicies Create. */ public final class RoutePoliciesCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Create_MaximumSet_Gen.json */ /** * Sample code: RoutePolicies_Create_MaximumSet_Gen. @@ -3698,31 +5534,36 @@ public final class RoutePoliciesCreateSamples { com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .routePolicies() - .define("routePolicyName") - .withRegion("EastUS") - .withExistingResourceGroup("rgRoutePolicies") + .define("example-routePolicy") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withTags(mapOf("keyID", "keyValue")) + .withAddressFamilyType(AddressFamilyType.IPV4) .withStatements( Arrays .asList( new RoutePolicyStatementProperties() - .withAnnotation("annotationValue") + .withAnnotation("annotation") .withSequenceNumber(7L) .withCondition( new StatementConditionProperties() .withIpCommunityIds( Arrays .asList( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName")) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity")) + .withType(RoutePolicyConditionType.OR) .withIpPrefixId( - "subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix") .withIpExtendedCommunityIds( Arrays .asList( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName"))) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) .withAction( new StatementActionProperties() .withLocalPreference(20L) - .withActionType(CommunityActionTypes.PERMIT) + .withActionType(RoutePolicyActionType.PERMIT) .withIpCommunityProperties( new ActionIpCommunityProperties() .withAdd( @@ -3730,19 +5571,19 @@ public final class RoutePoliciesCreateSamples { .withIpCommunityIds( Arrays .asList( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName"))) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity"))) .withDelete( new IpCommunityIdList() .withIpCommunityIds( Arrays .asList( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName"))) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity"))) .withSet( new IpCommunityIdList() .withIpCommunityIds( Arrays .asList( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName")))) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity")))) .withIpExtendedCommunityProperties( new ActionIpExtendedCommunityProperties() .withAdd( @@ -3750,21 +5591,20 @@ public final class RoutePoliciesCreateSamples { .withIpExtendedCommunityIds( Arrays .asList( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName"))) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) .withDelete( new IpExtendedCommunityIdList() .withIpExtendedCommunityIds( Arrays .asList( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName"))) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) .withSet( new IpExtendedCommunityIdList() .withIpExtendedCommunityIds( Arrays .asList( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName"))))))) - .withTags(mapOf("key8254", "")) - .withAnnotation("annotationValue") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))))))) + .withAnnotation("annotation") .create(); } @@ -3787,7 +5627,7 @@ public final class RoutePoliciesCreateSamples { /** Samples for RoutePolicies Delete. */ public final class RoutePoliciesDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Delete_MaximumSet_Gen.json */ /** * Sample code: RoutePolicies_Delete_MaximumSet_Gen. @@ -3796,7 +5636,7 @@ public final class RoutePoliciesDeleteSamples { */ public static void routePoliciesDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.routePolicies().delete("rgRoutePolicies", "routePolicyName", com.azure.core.util.Context.NONE); + manager.routePolicies().delete("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE); } } ``` @@ -3807,7 +5647,7 @@ public final class RoutePoliciesDeleteSamples { /** Samples for RoutePolicies GetByResourceGroup. */ public final class RoutePoliciesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Get_MaximumSet_Gen.json */ /** * Sample code: RoutePolicies_Get_MaximumSet_Gen. @@ -3818,7 +5658,7 @@ public final class RoutePoliciesGetByResourceGroupSamples { com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .routePolicies() - .getByResourceGroupWithResponse("rgRoutePolicies", "routePolicyName", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE); } } ``` @@ -3829,7 +5669,7 @@ public final class RoutePoliciesGetByResourceGroupSamples { /** Samples for RoutePolicies List. */ public final class RoutePoliciesListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: RoutePolicies_ListBySubscription_MaximumSet_Gen. @@ -3849,7 +5689,7 @@ public final class RoutePoliciesListSamples { /** Samples for RoutePolicies ListByResourceGroup. */ public final class RoutePoliciesListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: RoutePolicies_ListByResourceGroup_MaximumSet_Gen. @@ -3858,7 +5698,7 @@ public final class RoutePoliciesListByResourceGroupSamples { */ public static void routePoliciesListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.routePolicies().listByResourceGroup("rgRoutePolicies", com.azure.core.util.Context.NONE); + manager.routePolicies().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } ``` @@ -3866,14 +5706,24 @@ public final class RoutePoliciesListByResourceGroupSamples { ### RoutePolicies_Update ```java +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyActionType; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyConditionType; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for RoutePolicies Update. */ public final class RoutePoliciesUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Update_MaximumSet_Gen.json */ /** * Sample code: RoutePolicies_Update_MaximumSet_Gen. @@ -3885,10 +5735,75 @@ public final class RoutePoliciesUpdateSamples { RoutePolicy resource = manager .routePolicies() - .getByResourceGroupWithResponse( - "resourceGroupName", "routePolicyName", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key8254", "")).apply(); + resource + .update() + .withTags(mapOf("keyID", "keyValue")) + .withStatements( + Arrays + .asList( + new RoutePolicyStatementProperties() + .withAnnotation("annotation") + .withSequenceNumber(7L) + .withCondition( + new StatementConditionProperties() + .withIpCommunityIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity")) + .withType(RoutePolicyConditionType.OR) + .withIpPrefixId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix") + .withIpExtendedCommunityIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) + .withAction( + new StatementActionProperties() + .withLocalPreference(20L) + .withActionType(RoutePolicyActionType.PERMIT) + .withIpCommunityProperties( + new ActionIpCommunityProperties() + .withAdd( + new IpCommunityIdList() + .withIpCommunityIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity"))) + .withDelete( + new IpCommunityIdList() + .withIpCommunityIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity"))) + .withSet( + new IpCommunityIdList() + .withIpCommunityIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity")))) + .withIpExtendedCommunityProperties( + new ActionIpExtendedCommunityProperties() + .withAdd( + new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) + .withDelete( + new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) + .withSet( + new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))))))) + .apply(); } @SuppressWarnings("unchecked") @@ -3904,3 +5819,55 @@ public final class RoutePoliciesUpdateSamples { } ``` +### RoutePolicies_UpdateAdministrativeState + +```java +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for RoutePolicies UpdateAdministrativeState. */ +public final class RoutePoliciesUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_UpdateAdministrativeState_MaximumSet_Gen.json + */ + /** + * Sample code: RoutePolicies_UpdateAdministrativeState_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void routePoliciesUpdateAdministrativeStateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .routePolicies() + .updateAdministrativeState( + "example-rg", + "example-routePolicy", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} +``` + +### RoutePolicies_ValidateConfiguration + +```java +/** Samples for RoutePolicies ValidateConfiguration. */ +public final class RoutePoliciesValidateConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_ValidateConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: RoutePolicies_ValidateConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void routePoliciesValidateConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .routePolicies() + .validateConfiguration("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE); + } +} +``` + diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/pom.xml b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/pom.xml index 1e5c4ee5a3ef2..25c20c3b5bd3d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/pom.xml +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for Managed Network Fabric Management - This package contains Microsoft Azure SDK for Managed Network Fabric Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Self service experience for Azure Network Fabric API. Package tag package-2023-02-01-preview. + This package contains Microsoft Azure SDK for Managed Network Fabric Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Self service experience for Azure Network Fabric API. Package tag package-2023-06-15. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/ManagedNetworkFabricManager.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/ManagedNetworkFabricManager.java index cfec7d7ab4b21..03a6b93858b42 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/ManagedNetworkFabricManager.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/ManagedNetworkFabricManager.java @@ -28,38 +28,48 @@ import com.azure.resourcemanager.managednetworkfabric.implementation.AzureNetworkFabricManagementServiceApiBuilder; import com.azure.resourcemanager.managednetworkfabric.implementation.ExternalNetworksImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.InternalNetworksImpl; +import com.azure.resourcemanager.managednetworkfabric.implementation.InternetGatewayRulesImpl; +import com.azure.resourcemanager.managednetworkfabric.implementation.InternetGatewaysImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.IpCommunitiesImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.IpExtendedCommunitiesImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.IpPrefixesImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.L2IsolationDomainsImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.L3IsolationDomainsImpl; +import com.azure.resourcemanager.managednetworkfabric.implementation.NeighborGroupsImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkDeviceSkusImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkDevicesImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricControllersImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricSkusImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkFabricsImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkInterfacesImpl; -import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkRackSkusImpl; +import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkPacketBrokersImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkRacksImpl; +import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkTapRulesImpl; +import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkTapsImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.NetworkToNetworkInterconnectsImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.OperationsImpl; import com.azure.resourcemanager.managednetworkfabric.implementation.RoutePoliciesImpl; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlLists; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworks; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworks; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRules; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGateways; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunities; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunities; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixes; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomains; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomains; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroups; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSkus; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevices; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllers; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSkus; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabrics; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfaces; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackSkus; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokers; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRacks; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRules; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTaps; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnects; import com.azure.resourcemanager.managednetworkfabric.models.Operations; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicies; @@ -74,6 +84,10 @@ public final class ManagedNetworkFabricManager { private AccessControlLists accessControlLists; + private InternetGateways internetGateways; + + private InternetGatewayRules internetGatewayRules; + private IpCommunities ipCommunities; private IpExtendedCommunities ipExtendedCommunities; @@ -88,6 +102,8 @@ public final class ManagedNetworkFabricManager { private ExternalNetworks externalNetworks; + private NeighborGroups neighborGroups; + private NetworkDeviceSkus networkDeviceSkus; private NetworkDevices networkDevices; @@ -102,10 +118,14 @@ public final class ManagedNetworkFabricManager { private NetworkToNetworkInterconnects networkToNetworkInterconnects; - private NetworkRackSkus networkRackSkus; + private NetworkPacketBrokers networkPacketBrokers; private NetworkRacks networkRacks; + private NetworkTapRules networkTapRules; + + private NetworkTaps networkTaps; + private Operations operations; private RoutePolicies routePolicies; @@ -344,6 +364,30 @@ public AccessControlLists accessControlLists() { return accessControlLists; } + /** + * Gets the resource collection API of InternetGateways. It manages InternetGateway. + * + * @return Resource collection API of InternetGateways. + */ + public InternetGateways internetGateways() { + if (this.internetGateways == null) { + this.internetGateways = new InternetGatewaysImpl(clientObject.getInternetGateways(), this); + } + return internetGateways; + } + + /** + * Gets the resource collection API of InternetGatewayRules. It manages InternetGatewayRule. + * + * @return Resource collection API of InternetGatewayRules. + */ + public InternetGatewayRules internetGatewayRules() { + if (this.internetGatewayRules == null) { + this.internetGatewayRules = new InternetGatewayRulesImpl(clientObject.getInternetGatewayRules(), this); + } + return internetGatewayRules; + } + /** * Gets the resource collection API of IpCommunities. It manages IpCommunity. * @@ -428,6 +472,18 @@ public ExternalNetworks externalNetworks() { return externalNetworks; } + /** + * Gets the resource collection API of NeighborGroups. It manages NeighborGroup. + * + * @return Resource collection API of NeighborGroups. + */ + public NeighborGroups neighborGroups() { + if (this.neighborGroups == null) { + this.neighborGroups = new NeighborGroupsImpl(clientObject.getNeighborGroups(), this); + } + return neighborGroups; + } + /** * Gets the resource collection API of NetworkDeviceSkus. * @@ -515,15 +571,15 @@ public NetworkToNetworkInterconnects networkToNetworkInterconnects() { } /** - * Gets the resource collection API of NetworkRackSkus. + * Gets the resource collection API of NetworkPacketBrokers. It manages NetworkPacketBroker. * - * @return Resource collection API of NetworkRackSkus. + * @return Resource collection API of NetworkPacketBrokers. */ - public NetworkRackSkus networkRackSkus() { - if (this.networkRackSkus == null) { - this.networkRackSkus = new NetworkRackSkusImpl(clientObject.getNetworkRackSkus(), this); + public NetworkPacketBrokers networkPacketBrokers() { + if (this.networkPacketBrokers == null) { + this.networkPacketBrokers = new NetworkPacketBrokersImpl(clientObject.getNetworkPacketBrokers(), this); } - return networkRackSkus; + return networkPacketBrokers; } /** @@ -538,6 +594,30 @@ public NetworkRacks networkRacks() { return networkRacks; } + /** + * Gets the resource collection API of NetworkTapRules. It manages NetworkTapRule. + * + * @return Resource collection API of NetworkTapRules. + */ + public NetworkTapRules networkTapRules() { + if (this.networkTapRules == null) { + this.networkTapRules = new NetworkTapRulesImpl(clientObject.getNetworkTapRules(), this); + } + return networkTapRules; + } + + /** + * Gets the resource collection API of NetworkTaps. It manages NetworkTap. + * + * @return Resource collection API of NetworkTaps. + */ + public NetworkTaps networkTaps() { + if (this.networkTaps == null) { + this.networkTaps = new NetworkTapsImpl(clientObject.getNetworkTaps(), this); + } + return networkTaps; + } + /** * Gets the resource collection API of Operations. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AccessControlListsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AccessControlListsClient.java index 9313b5f44ad04..4f87a313bc1d2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AccessControlListsClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AccessControlListsClient.java @@ -8,14 +8,36 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatch; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; /** An instance of this class provides access to all the operations defined in AccessControlListsClient. */ public interface AccessControlListsClient { /** - * Create Access Control List. + * Creates Access Control List. + * + *

Implements Access Control List PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Access Control List resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AccessControlListInner> beginCreate( + String resourceGroupName, String accessControlListName, AccessControlListInner body); + + /** + * Creates Access Control List. * *

Implements Access Control List PUT method. * @@ -26,14 +48,14 @@ public interface AccessControlListsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition along with {@link Response}. + * @return the {@link SyncPoller} for polling of the Access Control List resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AccessControlListInner> beginCreate( String resourceGroupName, String accessControlListName, AccessControlListInner body, Context context); /** - * Create Access Control List. + * Creates Access Control List. * *

Implements Access Control List PUT method. * @@ -43,11 +65,29 @@ Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition. + * @return the Access Control List resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) AccessControlListInner create(String resourceGroupName, String accessControlListName, AccessControlListInner body); + /** + * Creates Access Control List. + * + *

Implements Access Control List PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Access Control List resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AccessControlListInner create( + String resourceGroupName, String accessControlListName, AccessControlListInner body, Context context); + /** * Gets a Access Control List. * @@ -59,7 +99,7 @@ Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition along with {@link Response}. + * @return the Access Control List resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -75,13 +115,30 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition. + * @return the Access Control List resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) AccessControlListInner getByResourceGroup(String resourceGroupName, String accessControlListName); /** - * Updates a Access Control List. + * Updates the Access Control List. + * + *

API to update certain properties of the Access Control List resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Access Control List properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Access Control List resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AccessControlListInner> beginUpdate( + String resourceGroupName, String accessControlListName, AccessControlListPatch body); + + /** + * Updates the Access Control List. * *

API to update certain properties of the Access Control List resource. * @@ -92,14 +149,14 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition along with {@link Response}. + * @return the {@link SyncPoller} for polling of the Access Control List resource definition. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AccessControlListInner> beginUpdate( String resourceGroupName, String accessControlListName, AccessControlListPatch body, Context context); /** - * Updates a Access Control List. + * Updates the Access Control List. * *

API to update certain properties of the Access Control List resource. * @@ -109,11 +166,44 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition. + * @return the Access Control List resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) AccessControlListInner update(String resourceGroupName, String accessControlListName, AccessControlListPatch body); + /** + * Updates the Access Control List. + * + *

API to update certain properties of the Access Control List resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Access Control List properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Access Control List resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AccessControlListInner update( + String resourceGroupName, String accessControlListName, AccessControlListPatch body, Context context); + + /** + * Deletes a Access Control List. + * + *

Implements Access Control List DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String accessControlListName); + /** * Deletes a Access Control List. * @@ -125,10 +215,11 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String accessControlListName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String accessControlListName, Context context); /** * Deletes a Access Control List. @@ -144,6 +235,21 @@ Response updateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String accessControlListName); + /** + * Deletes a Access Control List. + * + *

Implements Access Control List DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accessControlListName, Context context); + /** * List AccessControlLists by resource group. * @@ -153,7 +259,7 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists as paginated response with {@link PagedIterable}. + * @return list of Access Control Lists as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -168,7 +274,7 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists as paginated response with {@link PagedIterable}. + * @return list of Access Control Lists as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -180,7 +286,7 @@ Response updateWithResponse( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists as paginated response with {@link PagedIterable}. + * @return list of Access Control Lists as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -194,8 +300,210 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists as paginated response with {@link PagedIterable}. + * @return list of Access Control Lists as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); + + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body); + + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body, Context context); + + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner updateAdministrativeState( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body); + + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner updateAdministrativeState( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body, Context context); + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginResync(String resourceGroupName, String accessControlListName); + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginResync(String resourceGroupName, String accessControlListName, Context context); + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String accessControlListName); + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner resync( + String resourceGroupName, String accessControlListName, Context context); + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String accessControlListName); + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String accessControlListName, Context context); + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String accessControlListName); + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String accessControlListName, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AzureNetworkFabricManagementServiceApi.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AzureNetworkFabricManagementServiceApi.java index e70d96df5a819..c330af0395140 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AzureNetworkFabricManagementServiceApi.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/AzureNetworkFabricManagementServiceApi.java @@ -10,7 +10,7 @@ /** The interface for AzureNetworkFabricManagementServiceApi class. */ public interface AzureNetworkFabricManagementServiceApi { /** - * Gets The ID of the target subscription. + * Gets The ID of the target subscription. The value must be an UUID. * * @return the subscriptionId value. */ @@ -51,6 +51,20 @@ public interface AzureNetworkFabricManagementServiceApi { */ AccessControlListsClient getAccessControlLists(); + /** + * Gets the InternetGatewaysClient object to access its operations. + * + * @return the InternetGatewaysClient object. + */ + InternetGatewaysClient getInternetGateways(); + + /** + * Gets the InternetGatewayRulesClient object to access its operations. + * + * @return the InternetGatewayRulesClient object. + */ + InternetGatewayRulesClient getInternetGatewayRules(); + /** * Gets the IpCommunitiesClient object to access its operations. * @@ -100,6 +114,13 @@ public interface AzureNetworkFabricManagementServiceApi { */ ExternalNetworksClient getExternalNetworks(); + /** + * Gets the NeighborGroupsClient object to access its operations. + * + * @return the NeighborGroupsClient object. + */ + NeighborGroupsClient getNeighborGroups(); + /** * Gets the NetworkDeviceSkusClient object to access its operations. * @@ -150,11 +171,11 @@ public interface AzureNetworkFabricManagementServiceApi { NetworkToNetworkInterconnectsClient getNetworkToNetworkInterconnects(); /** - * Gets the NetworkRackSkusClient object to access its operations. + * Gets the NetworkPacketBrokersClient object to access its operations. * - * @return the NetworkRackSkusClient object. + * @return the NetworkPacketBrokersClient object. */ - NetworkRackSkusClient getNetworkRackSkus(); + NetworkPacketBrokersClient getNetworkPacketBrokers(); /** * Gets the NetworkRacksClient object to access its operations. @@ -163,6 +184,20 @@ public interface AzureNetworkFabricManagementServiceApi { */ NetworkRacksClient getNetworkRacks(); + /** + * Gets the NetworkTapRulesClient object to access its operations. + * + * @return the NetworkTapRulesClient object. + */ + NetworkTapRulesClient getNetworkTapRules(); + + /** + * Gets the NetworkTapsClient object to access its operations. + * + * @return the NetworkTapsClient object. + */ + NetworkTapsClient getNetworkTaps(); + /** * Gets the OperationsClient object to access its operations. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/ExternalNetworksClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/ExternalNetworksClient.java index 8996a36ef4011..a9aacef9306db 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/ExternalNetworksClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/ExternalNetworksClient.java @@ -11,8 +11,8 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -24,13 +24,13 @@ public interface ExternalNetworksClient { *

Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the ExternalNetwork item. + * @return the {@link SyncPoller} for polling of defines the External Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ExternalNetworkInner> beginCreate( @@ -42,14 +42,14 @@ SyncPoller, ExternalNetworkInner> beginCreate( *

Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the ExternalNetwork item. + * @return the {@link SyncPoller} for polling of defines the External Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ExternalNetworkInner> beginCreate( @@ -65,13 +65,13 @@ SyncPoller, ExternalNetworkInner> beginCreate( *

Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item. + * @return defines the External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) ExternalNetworkInner create( @@ -83,14 +83,14 @@ ExternalNetworkInner create( *

Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item. + * @return defines the External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) ExternalNetworkInner create( @@ -106,13 +106,13 @@ ExternalNetworkInner create( *

Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item along with {@link Response}. + * @return defines the External Network resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -124,48 +124,48 @@ Response getWithResponse( *

Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item. + * @return defines the External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) ExternalNetworkInner get(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName); /** - * Updates a ExternalNetworks. + * Updates a External Networks. * *

API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the ExternalNetwork item. + * @return the {@link SyncPoller} for polling of defines the External Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ExternalNetworkInner> beginUpdate( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body); /** - * Updates a ExternalNetworks. + * Updates a External Networks. * *

API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the ExternalNetwork item. + * @return the {@link SyncPoller} for polling of defines the External Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ExternalNetworkInner> beginUpdate( @@ -176,37 +176,37 @@ SyncPoller, ExternalNetworkInner> beginUpdate( Context context); /** - * Updates a ExternalNetworks. + * Updates a External Networks. * *

API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item. + * @return defines the External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) ExternalNetworkInner update( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, ExternalNetworkPatch body); /** - * Updates a ExternalNetworks. + * Updates a External Networks. * *

API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item. + * @return defines the External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) ExternalNetworkInner update( @@ -222,8 +222,8 @@ ExternalNetworkInner update( *

Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -239,8 +239,8 @@ SyncPoller, Void> beginDelete( *

Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -257,8 +257,8 @@ SyncPoller, Void> beginDelete( *

Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -272,8 +272,8 @@ SyncPoller, Void> beginDelete( *

Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -288,14 +288,14 @@ SyncPoller, Void> beginDelete( *

Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ExternalNetworks as paginated response with {@link PagedIterable}. + * @return list of External Networks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String l3IsolationDomainName); + PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); /** * Executes list operation to display External Networks within an isolation domain. @@ -303,15 +303,16 @@ SyncPoller, Void> beginDelete( *

Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ExternalNetworks as paginated response with {@link PagedIterable}. + * @return list of External Networks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String l3IsolationDomainName, Context context); + PagedIterable listByL3IsolationDomain( + String resourceGroupName, String l3IsolationDomainName, Context context); /** * Implements the operation to the underlying resources. @@ -319,20 +320,21 @@ SyncPoller, Void> beginDelete( *

Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String externalNetworkName, + UpdateAdministrativeState body); /** * Implements the operation to the underlying resources. @@ -340,22 +342,23 @@ SyncPoller, Void> beginUpdateAdministrativeState( *

Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body, - Context context); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String externalNetworkName, + UpdateAdministrativeState body, + Context context); /** * Implements the operation to the underlying resources. @@ -363,15 +366,16 @@ SyncPoller, Void> beginUpdateAdministrativeState( *

Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateAdministrativeState( + CommonPostActionResponseForStateUpdateInner updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, @@ -383,102 +387,17 @@ void updateAdministrativeState( *

Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void updateAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body, - Context context); - - /** - * Executes BGP state update operation to the underlying resources. - * - *

Update BGP for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body); - - /** - * Executes BGP state update operation to the underlying resources. - * - *

Update BGP for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body, - Context context); - - /** - * Executes BGP state update operation to the underlying resources. - * - *

Update BGP for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void updateBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body); - - /** - * Executes BGP state update operation to the underlying resources. - * - *

Update BGP for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateBgpAdministrativeState( + CommonPostActionResponseForStateUpdateInner updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, @@ -486,260 +405,92 @@ void updateBgpAdministrativeState( Context context); /** - * Execute BfdForBgp update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BfdForBgp for externalNetwork. + *

Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateBfdForBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateStaticRouteBfdAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String externalNetworkName, + UpdateAdministrativeState body); /** - * Execute BfdForBgp update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BfdForBgp for externalNetwork. + *

Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateBfdForBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body, - Context context); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateStaticRouteBfdAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String externalNetworkName, + UpdateAdministrativeState body, + Context context); /** - * Execute BfdForBgp update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BfdForBgp for externalNetwork. + *

Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateBfdForBgpAdministrativeState( + CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body); /** - * Execute BfdForBgp update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BfdForBgp for externalNetwork. + *

Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateBfdForBgpAdministrativeState( + CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context); - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body); - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context); - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void clearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body); - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void clearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context); - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body); - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context); - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void clearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body); - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void clearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternalNetworksClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternalNetworksClient.java index ed3665e0f0451..ee8deef9c1a76 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternalNetworksClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternalNetworksClient.java @@ -11,8 +11,8 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -24,13 +24,13 @@ public interface InternalNetworksClient { *

Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the InternalNetwork item. + * @return the {@link SyncPoller} for polling of defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, InternalNetworkInner> beginCreate( @@ -42,14 +42,14 @@ SyncPoller, InternalNetworkInner> beginCreate( *

Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the InternalNetwork item. + * @return the {@link SyncPoller} for polling of defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, InternalNetworkInner> beginCreate( @@ -65,13 +65,13 @@ SyncPoller, InternalNetworkInner> beginCreate( *

Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the InternalNetwork item. + * @return defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) InternalNetworkInner create( @@ -83,14 +83,14 @@ InternalNetworkInner create( *

Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the InternalNetwork item. + * @return defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) InternalNetworkInner create( @@ -106,8 +106,8 @@ InternalNetworkInner create( *

Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -124,8 +124,8 @@ Response getWithResponse( *

Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -140,13 +140,13 @@ Response getWithResponse( *

Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the InternalNetwork item. + * @return the {@link SyncPoller} for polling of defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, InternalNetworkInner> beginUpdate( @@ -158,14 +158,14 @@ SyncPoller, InternalNetworkInner> beginUpdate( *

Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the InternalNetwork item. + * @return the {@link SyncPoller} for polling of defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, InternalNetworkInner> beginUpdate( @@ -181,13 +181,13 @@ SyncPoller, InternalNetworkInner> beginUpdate( *

Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the InternalNetwork item. + * @return defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) InternalNetworkInner update( @@ -199,14 +199,14 @@ InternalNetworkInner update( *

Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the InternalNetwork item. + * @return defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) InternalNetworkInner update( @@ -222,8 +222,8 @@ InternalNetworkInner update( *

Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -239,8 +239,8 @@ SyncPoller, Void> beginDelete( *

Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -257,8 +257,8 @@ SyncPoller, Void> beginDelete( *

Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -272,8 +272,8 @@ SyncPoller, Void> beginDelete( *

Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -288,14 +288,14 @@ SyncPoller, Void> beginDelete( *

Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternalNetworks as paginated response with {@link PagedIterable}. + * @return list of Internal Networks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String l3IsolationDomainName); + PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); /** * Executes list operation to display list of all internal networks @@ -303,15 +303,16 @@ SyncPoller, Void> beginDelete( *

Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternalNetworks as paginated response with {@link PagedIterable}. + * @return list of Internal Networks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String l3IsolationDomainName, Context context); + PagedIterable listByL3IsolationDomain( + String resourceGroupName, String l3IsolationDomainName, Context context); /** * Executes the operation to the underlying resources. @@ -319,20 +320,21 @@ SyncPoller, Void> beginDelete( *

Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body); /** * Executes the operation to the underlying resources. @@ -340,22 +342,23 @@ SyncPoller, Void> beginUpdateAdministrativeState( *

Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body, + Context context); /** * Executes the operation to the underlying resources. @@ -363,15 +366,16 @@ SyncPoller, Void> beginUpdateAdministrativeState( *

Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateAdministrativeState( + CommonPostActionResponseForStateUpdateInner updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, @@ -383,16 +387,17 @@ void updateAdministrativeState( *

Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateAdministrativeState( + CommonPostActionResponseForStateUpdateInner updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, @@ -405,20 +410,21 @@ void updateAdministrativeState( *

Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateBgpAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body); /** * Executes the operation to the underlying resources for updating BGP state on edge devices. @@ -426,22 +432,23 @@ SyncPoller, Void> beginUpdateBgpAdministrativeState( *

Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateBgpAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body, + Context context); /** * Executes the operation to the underlying resources for updating BGP state on edge devices. @@ -449,15 +456,16 @@ SyncPoller, Void> beginUpdateBgpAdministrativeState( *

Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateBgpAdministrativeState( + CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, @@ -469,16 +477,17 @@ void updateBgpAdministrativeState( *

Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateBgpAdministrativeState( + CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, @@ -488,62 +497,65 @@ void updateBgpAdministrativeState( /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateBfdForBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateStaticRouteBfdAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body); /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateBfdForBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateStaticRouteBfdAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body, + Context context); /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateBfdForBgpAdministrativeState( + CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, @@ -552,277 +564,20 @@ void updateBfdForBgpAdministrativeState( /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void updateBfdForBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context); - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body); - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context); - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void clearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body); - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void clearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context); - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body); - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context); - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void clearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body); - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void clearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context); - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateBfdForStaticRouteAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body); - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateBfdForStaticRouteAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context); - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void updateBfdForStaticRouteAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body); - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateBfdForStaticRouteAdministrativeState( + CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewayRulesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewayRulesClient.java new file mode 100644 index 0000000000000..25c36fab912a3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewayRulesClient.java @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRulePatch; + +/** An instance of this class provides access to all the operations defined in InternetGatewayRulesClient. */ +public interface InternetGatewayRulesClient { + /** + * Creates an Internet Gateway rule. + * + *

Creates an Internet Gateway rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternetGatewayRuleInner> beginCreate( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body); + + /** + * Creates an Internet Gateway rule. + * + *

Creates an Internet Gateway rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternetGatewayRuleInner> beginCreate( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body, Context context); + + /** + * Creates an Internet Gateway rule. + * + *

Creates an Internet Gateway rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InternetGatewayRuleInner create( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body); + + /** + * Creates an Internet Gateway rule. + * + *

Creates an Internet Gateway rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InternetGatewayRuleInner create( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body, Context context); + + /** + * Gets an Internet Gateway Rule. + * + *

Gets an Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Internet Gateway Rule resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String internetGatewayRuleName, Context context); + + /** + * Gets an Internet Gateway Rule. + * + *

Gets an Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Internet Gateway Rule resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InternetGatewayRuleInner getByResourceGroup(String resourceGroupName, String internetGatewayRuleName); + + /** + * Updates an Internet Gateway Rule. + * + *

API to update certain properties of the Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Internet Gateway Rule properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternetGatewayRuleInner> beginUpdate( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body); + + /** + * Updates an Internet Gateway Rule. + * + *

API to update certain properties of the Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Internet Gateway Rule properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternetGatewayRuleInner> beginUpdate( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body, Context context); + + /** + * Updates an Internet Gateway Rule. + * + *

API to update certain properties of the Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Internet Gateway Rule properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InternetGatewayRuleInner update( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body); + + /** + * Updates an Internet Gateway Rule. + * + *

API to update certain properties of the Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Internet Gateway Rule properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InternetGatewayRuleInner update( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body, Context context); + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String internetGatewayRuleName); + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String internetGatewayRuleName, Context context); + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String internetGatewayRuleName); + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String internetGatewayRuleName, Context context); + + /** + * List Internet Gateway Rules by resource group. + * + *

Implements Internet Gateway Rules list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List Internet Gateway Rules by resource group. + * + *

Implements Internet Gateway Rules list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List Internet Gateway Rules by subscription. + * + *

List all Internet Gateway rules in the given subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List Internet Gateway Rules by subscription. + * + *

List all Internet Gateway rules in the given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewaysClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewaysClient.java new file mode 100644 index 0000000000000..99c707cb416c2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/InternetGatewaysClient.java @@ -0,0 +1,304 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayInner; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayPatch; + +/** An instance of this class provides access to all the operations defined in InternetGatewaysClient. */ +public interface InternetGatewaysClient { + /** + * Create a Network Fabric Service Internet Gateway. + * + *

Creates a Network Fabric Service Internet Gateway resource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternetGatewayInner> beginCreate( + String resourceGroupName, String internetGatewayName, InternetGatewayInner body); + + /** + * Create a Network Fabric Service Internet Gateway. + * + *

Creates a Network Fabric Service Internet Gateway resource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternetGatewayInner> beginCreate( + String resourceGroupName, String internetGatewayName, InternetGatewayInner body, Context context); + + /** + * Create a Network Fabric Service Internet Gateway. + * + *

Creates a Network Fabric Service Internet Gateway resource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InternetGatewayInner create(String resourceGroupName, String internetGatewayName, InternetGatewayInner body); + + /** + * Create a Network Fabric Service Internet Gateway. + * + *

Creates a Network Fabric Service Internet Gateway resource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InternetGatewayInner create( + String resourceGroupName, String internetGatewayName, InternetGatewayInner body, Context context); + + /** + * Retrieves details of Network Fabric Service Internet Gateway. + * + *

Implements Gateway GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String internetGatewayName, Context context); + + /** + * Retrieves details of Network Fabric Service Internet Gateway. + * + *

Implements Gateway GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InternetGatewayInner getByResourceGroup(String resourceGroupName, String internetGatewayName); + + /** + * Updates a Network Fabric Service Internet Gateway. + * + *

Execute patch on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternetGatewayInner> beginUpdate( + String resourceGroupName, String internetGatewayName, InternetGatewayPatch body); + + /** + * Updates a Network Fabric Service Internet Gateway. + * + *

Execute patch on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InternetGatewayInner> beginUpdate( + String resourceGroupName, String internetGatewayName, InternetGatewayPatch body, Context context); + + /** + * Updates a Network Fabric Service Internet Gateway. + * + *

Execute patch on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InternetGatewayInner update(String resourceGroupName, String internetGatewayName, InternetGatewayPatch body); + + /** + * Updates a Network Fabric Service Internet Gateway. + * + *

Execute patch on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InternetGatewayInner update( + String resourceGroupName, String internetGatewayName, InternetGatewayPatch body, Context context); + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String internetGatewayName); + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String internetGatewayName, Context context); + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String internetGatewayName); + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String internetGatewayName, Context context); + + /** + * List Internet Gateways by resource group. + * + *

Displays Internet Gateways list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List Internet Gateways by resource group. + * + *

Displays Internet Gateways list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List Internet Gateways by subscription. + * + *

Displays Internet Gateways list by subscription GET method. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List Internet Gateways by subscription. + * + *

Displays Internet Gateways list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpCommunitiesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpCommunitiesClient.java index f356bf7a6f758..5908e68ba18ae 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpCommunitiesClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpCommunitiesClient.java @@ -27,7 +27,7 @@ public interface IpCommunitiesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IpCommunity resource definition. + * @return the {@link SyncPoller} for polling of the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpCommunityInner> beginCreate( @@ -45,7 +45,7 @@ SyncPoller, IpCommunityInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IpCommunity resource definition. + * @return the {@link SyncPoller} for polling of the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpCommunityInner> beginCreate( @@ -62,7 +62,7 @@ SyncPoller, IpCommunityInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition. + * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner body); @@ -79,7 +79,7 @@ SyncPoller, IpCommunityInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition. + * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner body, Context context); @@ -95,7 +95,7 @@ SyncPoller, IpCommunityInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition along with {@link Response}. + * @return the IP Community resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -111,7 +111,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition. + * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) IpCommunityInner getByResourceGroup(String resourceGroupName, String ipCommunityName); @@ -127,7 +127,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IpCommunity resource definition. + * @return the {@link SyncPoller} for polling of the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpCommunityInner> beginUpdate( @@ -145,7 +145,7 @@ SyncPoller, IpCommunityInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IpCommunity resource definition. + * @return the {@link SyncPoller} for polling of the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpCommunityInner> beginUpdate( @@ -162,7 +162,7 @@ SyncPoller, IpCommunityInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition. + * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) IpCommunityInner update(String resourceGroupName, String ipCommunityName, IpCommunityPatch body); @@ -179,7 +179,7 @@ SyncPoller, IpCommunityInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition. + * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) IpCommunityInner update(String resourceGroupName, String ipCommunityName, IpCommunityPatch body, Context context); @@ -245,56 +245,56 @@ SyncPoller, IpCommunityInner> beginUpdate( void delete(String resourceGroupName, String ipCommunityName, Context context); /** - * List IpCommunities by resource group. + * List IP Communities by resource group. * - *

Implements IpCommunities list by resource group GET method. + *

Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Communities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List IpCommunities by resource group. + * List IP Communities by resource group. * - *

Implements IpCommunities list by resource group GET method. + *

Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Communities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List IpCommunities by subscription. + * List IP Communities by subscription. * - *

Implements IpCommunities list by subscription GET method. + *

Implements IP Communities list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Communities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List IpCommunities by subscription. + * List IP Communities by subscription. * - *

Implements IpCommunities list by subscription GET method. + *

Implements IP Communities list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Communities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpExtendedCommunitiesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpExtendedCommunitiesClient.java index fb49d78927bd4..97432c2c69219 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpExtendedCommunitiesClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpExtendedCommunitiesClient.java @@ -27,7 +27,7 @@ public interface IpExtendedCommunitiesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IpExtendedCommunity resource definition. + * @return the {@link SyncPoller} for polling of the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpExtendedCommunityInner> beginCreate( @@ -45,7 +45,7 @@ SyncPoller, IpExtendedCommunityInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IpExtendedCommunity resource definition. + * @return the {@link SyncPoller} for polling of the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpExtendedCommunityInner> beginCreate( @@ -62,7 +62,7 @@ SyncPoller, IpExtendedCommunityInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition. + * @return the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) IpExtendedCommunityInner create( @@ -80,7 +80,7 @@ IpExtendedCommunityInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition. + * @return the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) IpExtendedCommunityInner create( @@ -97,7 +97,7 @@ IpExtendedCommunityInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition along with {@link Response}. + * @return the IP Extended Community resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -113,7 +113,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition. + * @return the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) IpExtendedCommunityInner getByResourceGroup(String resourceGroupName, String ipExtendedCommunityName); @@ -129,7 +129,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IpExtendedCommunity resource definition. + * @return the {@link SyncPoller} for polling of the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpExtendedCommunityInner> beginUpdate( @@ -147,7 +147,7 @@ SyncPoller, IpExtendedCommunityInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IpExtendedCommunity resource definition. + * @return the {@link SyncPoller} for polling of the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpExtendedCommunityInner> beginUpdate( @@ -164,7 +164,7 @@ SyncPoller, IpExtendedCommunityInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition. + * @return the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) IpExtendedCommunityInner update( @@ -182,7 +182,7 @@ IpExtendedCommunityInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition. + * @return the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) IpExtendedCommunityInner update( @@ -258,7 +258,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -273,7 +273,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -285,7 +285,7 @@ SyncPoller, Void> beginDelete( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -299,7 +299,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpPrefixesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpPrefixesClient.java index 4ada7597e5240..acb3db82472bb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpPrefixesClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/IpPrefixesClient.java @@ -27,7 +27,7 @@ public interface IpPrefixesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IPPrefix resource definition. + * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpPrefixInner> beginCreate( @@ -45,7 +45,7 @@ SyncPoller, IpPrefixInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IPPrefix resource definition. + * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpPrefixInner> beginCreate( @@ -62,7 +62,7 @@ SyncPoller, IpPrefixInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition. + * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner body); @@ -79,7 +79,7 @@ SyncPoller, IpPrefixInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition. + * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner body, Context context); @@ -95,7 +95,7 @@ SyncPoller, IpPrefixInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition along with {@link Response}. + * @return the IP Prefix resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -111,7 +111,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition. + * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) IpPrefixInner getByResourceGroup(String resourceGroupName, String ipPrefixName); @@ -127,7 +127,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IPPrefix resource definition. + * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpPrefixInner> beginUpdate( @@ -145,7 +145,7 @@ SyncPoller, IpPrefixInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IPPrefix resource definition. + * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IpPrefixInner> beginUpdate( @@ -162,7 +162,7 @@ SyncPoller, IpPrefixInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition. + * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPrefixPatch body); @@ -179,7 +179,7 @@ SyncPoller, IpPrefixInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition. + * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPrefixPatch body, Context context); @@ -253,7 +253,7 @@ SyncPoller, IpPrefixInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes as paginated response with {@link PagedIterable}. + * @return list of IP Prefixes as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -268,7 +268,7 @@ SyncPoller, IpPrefixInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes as paginated response with {@link PagedIterable}. + * @return list of IP Prefixes as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -280,7 +280,7 @@ SyncPoller, IpPrefixInner> beginUpdate( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes as paginated response with {@link PagedIterable}. + * @return list of IP Prefixes as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -294,7 +294,7 @@ SyncPoller, IpPrefixInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes as paginated response with {@link PagedIterable}. + * @return list of IP Prefixes as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L2IsolationDomainsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L2IsolationDomainsClient.java index f72b3a971b6b5..526808e4f09ca 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L2IsolationDomainsClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L2IsolationDomainsClient.java @@ -11,12 +11,12 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.ArpPropertiesInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Map; /** An instance of this class provides access to all the operations defined in L2IsolationDomainsClient. */ public interface L2IsolationDomainsClient { @@ -32,7 +32,7 @@ public interface L2IsolationDomainsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L2IsolationDomain resource definition. + * @return the {@link SyncPoller} for polling of the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, L2IsolationDomainInner> beginCreate( @@ -51,7 +51,7 @@ SyncPoller, L2IsolationDomainInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L2IsolationDomain resource definition. + * @return the {@link SyncPoller} for polling of the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, L2IsolationDomainInner> beginCreate( @@ -69,7 +69,7 @@ SyncPoller, L2IsolationDomainInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition. + * @return the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) L2IsolationDomainInner create(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainInner body); @@ -87,7 +87,7 @@ SyncPoller, L2IsolationDomainInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition. + * @return the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) L2IsolationDomainInner create( @@ -104,7 +104,7 @@ L2IsolationDomainInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition along with {@link Response}. + * @return the L2 Isolation Domain resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -120,13 +120,13 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition. + * @return the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) L2IsolationDomainInner getByResourceGroup(String resourceGroupName, String l2IsolationDomainName); /** - * Updates a L2 Isolation Domain. + * Updates the L2 Isolation Domain. * *

API to update certain properties of the L2 Isolation Domain resource. * @@ -136,14 +136,14 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L2IsolationDomain resource definition. + * @return the {@link SyncPoller} for polling of the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, L2IsolationDomainInner> beginUpdate( String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body); /** - * Updates a L2 Isolation Domain. + * Updates the L2 Isolation Domain. * *

API to update certain properties of the L2 Isolation Domain resource. * @@ -154,14 +154,14 @@ SyncPoller, L2IsolationDomainInner> beginUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L2IsolationDomain resource definition. + * @return the {@link SyncPoller} for polling of the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, L2IsolationDomainInner> beginUpdate( String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body, Context context); /** - * Updates a L2 Isolation Domain. + * Updates the L2 Isolation Domain. * *

API to update certain properties of the L2 Isolation Domain resource. * @@ -171,13 +171,13 @@ SyncPoller, L2IsolationDomainInner> beginUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition. + * @return the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) L2IsolationDomainInner update(String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body); /** - * Updates a L2 Isolation Domain. + * Updates the L2 Isolation Domain. * *

API to update certain properties of the L2 Isolation Domain resource. * @@ -188,14 +188,14 @@ SyncPoller, L2IsolationDomainInner> beginUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition. + * @return the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) L2IsolationDomainInner update( String resourceGroupName, String l2IsolationDomainName, L2IsolationDomainPatch body, Context context); /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -210,7 +210,7 @@ L2IsolationDomainInner update( SyncPoller, Void> beginDelete(String resourceGroupName, String l2IsolationDomainName); /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -227,7 +227,7 @@ SyncPoller, Void> beginDelete( String resourceGroupName, String l2IsolationDomainName, Context context); /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -241,7 +241,7 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String l2IsolationDomainName); /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -261,16 +261,17 @@ SyncPoller, Void> beginDelete( *

Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body); + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body); /** * Implements the operation to the underlying resources. @@ -278,17 +279,18 @@ SyncPoller, Void> beginUpdateAdministrativeState( *

Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context); + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context); /** * Implements the operation to the underlying resources. @@ -296,14 +298,15 @@ SyncPoller, Void> beginUpdateAdministrativeState( *

Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateAdministrativeState( + CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState( String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body); /** @@ -312,214 +315,139 @@ void updateAdministrativeState( *

Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateAdministrativeState( + CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState( String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClearArpTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body); + SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String l2IsolationDomainName); /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClearArpTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context); + SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String l2IsolationDomainName, Context context); /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - void clearArpTable(String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body); + ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l2IsolationDomainName); /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - void clearArpTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context); + ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String l2IsolationDomainName, Context context); /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClearNeighborTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginCommitConfiguration(String resourceGroupName, String l2IsolationDomainName); /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClearNeighborTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context); - - /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void clearNeighborTable(String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginCommitConfiguration(String resourceGroupName, String l2IsolationDomainName, Context context); /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. - * @param context The context to associate with this operation. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void clearNeighborTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context); - - /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of show ARP entries response per network device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller>, Map> beginGetArpEntries( + CommonPostActionResponseForStateUpdateInner commitConfiguration( String resourceGroupName, String l2IsolationDomainName); /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of show ARP entries response per network device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller>, Map> beginGetArpEntries( - String resourceGroupName, String l2IsolationDomainName, Context context); - - /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return show ARP entries response per network device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Map getArpEntries(String resourceGroupName, String l2IsolationDomainName); - - /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return show ARP entries response per network device. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - Map getArpEntries( + CommonPostActionResponseForStateUpdateInner commitConfiguration( String resourceGroupName, String l2IsolationDomainName, Context context); /** @@ -531,7 +459,7 @@ Map getArpEntries( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -546,7 +474,7 @@ Map getArpEntries( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -558,7 +486,7 @@ Map getArpEntries( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -572,7 +500,7 @@ Map getArpEntries( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L3IsolationDomainsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L3IsolationDomainsClient.java index 72db75482a3d3..c9e3a9410b2e2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L3IsolationDomainsClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/L3IsolationDomainsClient.java @@ -11,8 +11,10 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -31,7 +33,7 @@ public interface L3IsolationDomainsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L3IsolationDomain resource definition. + * @return the {@link SyncPoller} for polling of the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, L3IsolationDomainInner> beginCreate( @@ -51,7 +53,7 @@ SyncPoller, L3IsolationDomainInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L3IsolationDomain resource definition. + * @return the {@link SyncPoller} for polling of the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, L3IsolationDomainInner> beginCreate( @@ -70,7 +72,7 @@ SyncPoller, L3IsolationDomainInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition. + * @return the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) L3IsolationDomainInner create(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainInner body); @@ -89,7 +91,7 @@ SyncPoller, L3IsolationDomainInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition. + * @return the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) L3IsolationDomainInner create( @@ -106,7 +108,7 @@ L3IsolationDomainInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition along with {@link Response}. + * @return the L3 Isolation Domain resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -122,7 +124,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition. + * @return the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) L3IsolationDomainInner getByResourceGroup(String resourceGroupName, String l3IsolationDomainName); @@ -138,7 +140,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L3IsolationDomain resource definition. + * @return the {@link SyncPoller} for polling of the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, L3IsolationDomainInner> beginUpdate( @@ -156,7 +158,7 @@ SyncPoller, L3IsolationDomainInner> beginUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L3IsolationDomain resource definition. + * @return the {@link SyncPoller} for polling of the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, L3IsolationDomainInner> beginUpdate( @@ -173,7 +175,7 @@ SyncPoller, L3IsolationDomainInner> beginUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition. + * @return the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) L3IsolationDomainInner update(String resourceGroupName, String l3IsolationDomainName, L3IsolationDomainPatch body); @@ -190,7 +192,7 @@ SyncPoller, L3IsolationDomainInner> beginUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition. + * @return the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) L3IsolationDomainInner update( @@ -266,7 +268,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -281,7 +283,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -293,7 +295,7 @@ SyncPoller, Void> beginDelete( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -307,7 +309,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -318,16 +320,17 @@ SyncPoller, Void> beginDelete( *

Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body); + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body); /** * executes enable operation to the underlying resources. @@ -335,17 +338,18 @@ SyncPoller, Void> beginUpdateAdministrativeState( *

Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context); + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context); /** * executes enable operation to the underlying resources. @@ -353,14 +357,15 @@ SyncPoller, Void> beginUpdateAdministrativeState( *

Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateAdministrativeState( + CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body); /** @@ -369,216 +374,138 @@ void updateAdministrativeState( *

Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void updateAdministrativeState( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context); - - /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateOptionBAdministrativeState( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body); - - /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateOptionBAdministrativeState( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context); - - /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void updateOptionBAdministrativeState( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body); - - /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateOptionBAdministrativeState( + CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context); /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClearArpTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body); + SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String l3IsolationDomainName); /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClearArpTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context); + SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - void clearArpTable(String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body); + ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String l3IsolationDomainName); /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - void clearArpTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context); + ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String l3IsolationDomainName, Context context); /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClearNeighborTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginCommitConfiguration(String resourceGroupName, String l3IsolationDomainName); /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginClearNeighborTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginCommitConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context); /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void clearNeighborTable(String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body); + CommonPostActionResponseForStateUpdateInner commitConfiguration( + String resourceGroupName, String l3IsolationDomainName); /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void clearNeighborTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context); + CommonPostActionResponseForStateUpdateInner commitConfiguration( + String resourceGroupName, String l3IsolationDomainName, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NeighborGroupsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NeighborGroupsClient.java new file mode 100644 index 0000000000000..e20cf7dadb947 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NeighborGroupsClient.java @@ -0,0 +1,303 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatch; + +/** An instance of this class provides access to all the operations defined in NeighborGroupsClient. */ +public interface NeighborGroupsClient { + /** + * Creates the Neighbor Group. + * + *

Implements the Neighbor Group PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NeighborGroupInner> beginCreate( + String resourceGroupName, String neighborGroupName, NeighborGroupInner body); + + /** + * Creates the Neighbor Group. + * + *

Implements the Neighbor Group PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NeighborGroupInner> beginCreate( + String resourceGroupName, String neighborGroupName, NeighborGroupInner body, Context context); + + /** + * Creates the Neighbor Group. + * + *

Implements the Neighbor Group PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NeighborGroupInner create(String resourceGroupName, String neighborGroupName, NeighborGroupInner body); + + /** + * Creates the Neighbor Group. + * + *

Implements the Neighbor Group PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NeighborGroupInner create( + String resourceGroupName, String neighborGroupName, NeighborGroupInner body, Context context); + + /** + * Retrieves details of neighbor Group using GET method. + * + *

Gets the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Neighbor Group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String neighborGroupName, Context context); + + /** + * Retrieves details of neighbor Group using GET method. + * + *

Gets the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NeighborGroupInner getByResourceGroup(String resourceGroupName, String neighborGroupName); + + /** + * API to update certain properties of the Neighbor Group Resources. + * + *

Updates the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Neighbor Group properties to update. Only annotations are supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NeighborGroupInner> beginUpdate( + String resourceGroupName, String neighborGroupName, NeighborGroupPatch body); + + /** + * API to update certain properties of the Neighbor Group Resources. + * + *

Updates the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Neighbor Group properties to update. Only annotations are supported. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NeighborGroupInner> beginUpdate( + String resourceGroupName, String neighborGroupName, NeighborGroupPatch body, Context context); + + /** + * API to update certain properties of the Neighbor Group Resources. + * + *

Updates the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Neighbor Group properties to update. Only annotations are supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NeighborGroupInner update(String resourceGroupName, String neighborGroupName, NeighborGroupPatch body); + + /** + * API to update certain properties of the Neighbor Group Resources. + * + *

Updates the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Neighbor Group properties to update. Only annotations are supported. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NeighborGroupInner update( + String resourceGroupName, String neighborGroupName, NeighborGroupPatch body, Context context); + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String neighborGroupName); + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String neighborGroupName, Context context); + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String neighborGroupName); + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String neighborGroupName, Context context); + + /** + * List Neighbor Groups by resource group. + * + *

Displays NeighborGroups list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List Neighbor Groups by resource group. + * + *

Displays NeighborGroups list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List Neighbor Groups by subscription. + * + *

Displays NeighborGroups list by subscription GET method. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List Neighbor Groups by subscription. + * + *

Displays NeighborGroups list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDeviceSkusClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDeviceSkusClient.java index 8aebea12bb2a6..b4459680b1996 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDeviceSkusClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDeviceSkusClient.java @@ -16,14 +16,14 @@ public interface NetworkDeviceSkusClient { /** * Gets a Network Device Sku. * - *

Get Network Device SKU details. + *

Get a Network Device SKU details. * - * @param networkDeviceSkuName Name of the Network Device Sku. + * @param networkDeviceSkuName Name of the Network Device SKU. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Device SKU details along with {@link Response}. + * @return a Network Device SKU details along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String networkDeviceSkuName, Context context); @@ -31,31 +31,31 @@ public interface NetworkDeviceSkusClient { /** * Gets a Network Device Sku. * - *

Get Network Device SKU details. + *

Get a Network Device SKU details. * - * @param networkDeviceSkuName Name of the Network Device Sku. + * @param networkDeviceSkuName Name of the Network Device SKU. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Device SKU details. + * @return a Network Device SKU details. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkDeviceSkuInner get(String networkDeviceSkuName); /** - * List NetworkDeviceSkus by subscription. + * List Network Device SKUs by subscription. * *

List Network Device SKUs for the given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDeviceSkus as paginated response with {@link PagedIterable}. + * @return list of Network Device SKUs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List NetworkDeviceSkus by subscription. + * List Network Device SKUs by subscription. * *

List Network Device SKUs for the given subscription. * @@ -63,7 +63,7 @@ public interface NetworkDeviceSkusClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDeviceSkus as paginated response with {@link PagedIterable}. + * @return list of Network Device SKUs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDevicesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDevicesClient.java index ad4938c5ac87e..ac3f26f6a50d3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDevicesClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkDevicesClient.java @@ -11,15 +11,12 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetDeviceStatusPropertiesInner; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetDynamicInterfaceMapsPropertiesItemInner; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetStaticInterfaceMapsPropertiesItemInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.SupportPackagePropertiesInner; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParameters; -import com.azure.resourcemanager.managednetworkfabric.models.UpdatePowerCycleProperties; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersionProperties; -import java.util.List; +import com.azure.resourcemanager.managednetworkfabric.models.RebootProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; /** An instance of this class provides access to all the operations defined in NetworkDevicesClient. */ public interface NetworkDevicesClient { @@ -34,7 +31,7 @@ public interface NetworkDevicesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkDevice resource definition. + * @return the {@link SyncPoller} for polling of the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkDeviceInner> beginCreate( @@ -52,7 +49,7 @@ SyncPoller, NetworkDeviceInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkDevice resource definition. + * @return the {@link SyncPoller} for polling of the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkDeviceInner> beginCreate( @@ -69,7 +66,7 @@ SyncPoller, NetworkDeviceInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkDevice resource definition. + * @return the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkDeviceInner create(String resourceGroupName, String networkDeviceName, NetworkDeviceInner body); @@ -86,7 +83,7 @@ SyncPoller, NetworkDeviceInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkDevice resource definition. + * @return the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkDeviceInner create( @@ -95,7 +92,7 @@ NetworkDeviceInner create( /** * Gets a Network Device. * - *

Get the Network Device resource details. + *

Gets the Network Device resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. @@ -112,7 +109,7 @@ Response getByResourceGroupWithResponse( /** * Gets a Network Device. * - *

Get the Network Device resource details. + *

Gets the Network Device resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. @@ -135,7 +132,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkDevice resource definition. + * @return the {@link SyncPoller} for polling of the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkDeviceInner> beginUpdate( @@ -153,7 +150,7 @@ SyncPoller, NetworkDeviceInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkDevice resource definition. + * @return the {@link SyncPoller} for polling of the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkDeviceInner> beginUpdate( @@ -170,7 +167,7 @@ SyncPoller, NetworkDeviceInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkDevice resource definition. + * @return the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkDeviceInner update(String resourceGroupName, String networkDeviceName, NetworkDevicePatchParameters body); @@ -187,7 +184,7 @@ SyncPoller, NetworkDeviceInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkDevice resource definition. + * @return the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkDeviceInner update( @@ -314,14 +311,16 @@ NetworkDeviceInner update( *

Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginReboot(String resourceGroupName, String networkDeviceName); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginReboot(String resourceGroupName, String networkDeviceName, RebootProperties body); /** * Implements the operation to the underlying resources. @@ -329,15 +328,17 @@ NetworkDeviceInner update( *

Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginReboot(String resourceGroupName, String networkDeviceName, Context context); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginReboot(String resourceGroupName, String networkDeviceName, RebootProperties body, Context context); /** * Implements the operation to the underlying resources. @@ -345,13 +346,16 @@ NetworkDeviceInner update( *

Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void reboot(String resourceGroupName, String networkDeviceName); + CommonPostActionResponseForStateUpdateInner reboot( + String resourceGroupName, String networkDeviceName, RebootProperties body); /** * Implements the operation to the underlying resources. @@ -359,476 +363,223 @@ NetworkDeviceInner update( *

Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void reboot(String resourceGroupName, String networkDeviceName, Context context); - - /** - * Restores the configuration to last applied good configuration from Azure. - * - *

Restore the configuration of the Network Device resource to last known good configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestoreConfig(String resourceGroupName, String networkDeviceName); - - /** - * Restores the configuration to last applied good configuration from Azure. - * - *

Restore the configuration of the Network Device resource to last known good configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestoreConfig( - String resourceGroupName, String networkDeviceName, Context context); - - /** - * Restores the configuration to last applied good configuration from Azure. - * - *

Restore the configuration of the Network Device resource to last known good configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void restoreConfig(String resourceGroupName, String networkDeviceName); - - /** - * Restores the configuration to last applied good configuration from Azure. - * - *

Restore the configuration of the Network Device resource to last known good configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void restoreConfig(String resourceGroupName, String networkDeviceName, Context context); - - /** - * Implements SKU version upgrade of network device. - * - *

Update the SKU version of the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateVersion( - String resourceGroupName, String networkDeviceName, UpdateVersionProperties body); - - /** - * Implements SKU version upgrade of network device. - * - *

Update the SKU version of the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateVersion( - String resourceGroupName, String networkDeviceName, UpdateVersionProperties body, Context context); - - /** - * Implements SKU version upgrade of network device. - * - *

Update the SKU version of the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void updateVersion(String resourceGroupName, String networkDeviceName, UpdateVersionProperties body); - - /** - * Implements SKU version upgrade of network device. - * - *

Update the SKU version of the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateVersion( - String resourceGroupName, String networkDeviceName, UpdateVersionProperties body, Context context); + CommonPostActionResponseForStateUpdateInner reboot( + String resourceGroupName, String networkDeviceName, RebootProperties body, Context context); /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of generate support package post action properties. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SupportPackagePropertiesInner> beginGenerateSupportPackage( - String resourceGroupName, String networkDeviceName); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginRefreshConfiguration(String resourceGroupName, String networkDeviceName); /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of generate support package post action properties. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SupportPackagePropertiesInner> beginGenerateSupportPackage( - String resourceGroupName, String networkDeviceName, Context context); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginRefreshConfiguration(String resourceGroupName, String networkDeviceName, Context context); /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return generate support package post action properties. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - SupportPackagePropertiesInner generateSupportPackage(String resourceGroupName, String networkDeviceName); + CommonPostActionResponseForStateUpdateInner refreshConfiguration( + String resourceGroupName, String networkDeviceName); /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return generate support package post action properties. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - SupportPackagePropertiesInner generateSupportPackage( + CommonPostActionResponseForStateUpdateInner refreshConfiguration( String resourceGroupName, String networkDeviceName, Context context); /** * Implements the operation to the underlying resources. * - *

Update PDU power cycle of the Network Device. + *

Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdatePowerCycle( - String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body); /** * Implements the operation to the underlying resources. * - *

Update PDU power cycle of the Network Device. + *

Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdatePowerCycle( - String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body, Context context); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body, Context context); /** * Implements the operation to the underlying resources. * - *

Update PDU power cycle of the Network Device. + *

Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updatePowerCycle(String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body); + CommonPostActionResponseForStateUpdateInner updateAdministrativeState( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body); /** * Implements the operation to the underlying resources. * - *

Update PDU power cycle of the Network Device. + *

Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updatePowerCycle( - String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body, Context context); - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the running status of the Network Device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, GetDeviceStatusPropertiesInner> beginGetStatus( - String resourceGroupName, String networkDeviceName); - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the running status of the Network Device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, GetDeviceStatusPropertiesInner> beginGetStatus( - String resourceGroupName, String networkDeviceName, Context context); - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - GetDeviceStatusPropertiesInner getStatus(String resourceGroupName, String networkDeviceName); - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - GetDeviceStatusPropertiesInner getStatus(String resourceGroupName, String networkDeviceName, Context context); - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the static interface maps for the given Network Device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller< - PollResult>, - List> - beginGetStaticInterfaceMaps(String resourceGroupName, String networkDeviceName); - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the static interface maps for the given Network Device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller< - PollResult>, - List> - beginGetStaticInterfaceMaps(String resourceGroupName, String networkDeviceName, Context context); - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the static interface maps for the given Network Device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - List getStaticInterfaceMaps( - String resourceGroupName, String networkDeviceName); - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the static interface maps for the given Network Device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - List getStaticInterfaceMaps( - String resourceGroupName, String networkDeviceName, Context context); + CommonPostActionResponseForStateUpdateInner updateAdministrativeState( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body, Context context); /** * Implements the operation to the underlying resources. * - *

Get the dynamic interface maps for the given Network Device. + *

Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the dynamic interface maps for the given Network Device. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller< - PollResult>, - List> - beginGetDynamicInterfaceMaps(String resourceGroupName, String networkDeviceName); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body); /** * Implements the operation to the underlying resources. * - *

Get the dynamic interface maps for the given Network Device. + *

Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the dynamic interface maps for the given Network Device. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller< - PollResult>, - List> - beginGetDynamicInterfaceMaps(String resourceGroupName, String networkDeviceName, Context context); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context); /** * Implements the operation to the underlying resources. * - *

Get the dynamic interface maps for the given Network Device. + *

Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the dynamic interface maps for the given Network Device. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - List getDynamicInterfaceMaps( - String resourceGroupName, String networkDeviceName); + CommonPostActionResponseForStateUpdateInner upgrade( + String resourceGroupName, String networkDeviceName, UpdateVersion body); /** * Implements the operation to the underlying resources. * - *

Get the dynamic interface maps for the given Network Device. + *

Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the dynamic interface maps for the given Network Device. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - List getDynamicInterfaceMaps( - String resourceGroupName, String networkDeviceName, Context context); + CommonPostActionResponseForStateUpdateInner upgrade( + String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricControllersClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricControllersClient.java index 0e34ae7b847c9..90c988a0764dc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricControllersClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricControllersClient.java @@ -27,7 +27,7 @@ public interface NetworkFabricControllersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkFabricController resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkFabricControllerInner> beginCreate( @@ -45,7 +45,7 @@ SyncPoller, NetworkFabricControllerInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkFabricController resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkFabricControllerInner> beginCreate( @@ -65,7 +65,7 @@ SyncPoller, NetworkFabricControllerInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition. + * @return the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkFabricControllerInner create( @@ -83,7 +83,7 @@ NetworkFabricControllerInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition. + * @return the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkFabricControllerInner create( @@ -103,7 +103,7 @@ NetworkFabricControllerInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition along with {@link Response}. + * @return the Network Fabric Controller resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -119,7 +119,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition. + * @return the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkFabricControllerInner getByResourceGroup(String resourceGroupName, String networkFabricControllerName); @@ -135,7 +135,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkFabricController resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkFabricControllerInner> beginUpdate( @@ -153,7 +153,7 @@ SyncPoller, NetworkFabricControllerInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkFabricController resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkFabricControllerInner> beginUpdate( @@ -173,7 +173,7 @@ SyncPoller, NetworkFabricControllerInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition. + * @return the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkFabricControllerInner update( @@ -191,7 +191,7 @@ NetworkFabricControllerInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition. + * @return the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkFabricControllerInner update( @@ -270,7 +270,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers as paginated response with {@link PagedIterable}. + * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -285,7 +285,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers as paginated response with {@link PagedIterable}. + * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -297,7 +297,7 @@ SyncPoller, Void> beginDelete( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers as paginated response with {@link PagedIterable}. + * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -311,133 +311,8 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers as paginated response with {@link PagedIterable}. + * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); - - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginEnableWorkloadManagementNetwork( - String resourceGroupName, String networkFabricControllerName); - - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginEnableWorkloadManagementNetwork( - String resourceGroupName, String networkFabricControllerName, Context context); - - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void enableWorkloadManagementNetwork(String resourceGroupName, String networkFabricControllerName); - - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void enableWorkloadManagementNetwork(String resourceGroupName, String networkFabricControllerName, Context context); - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDisableWorkloadManagementNetwork( - String resourceGroupName, String networkFabricControllerName); - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDisableWorkloadManagementNetwork( - String resourceGroupName, String networkFabricControllerName, Context context); - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void disableWorkloadManagementNetwork(String resourceGroupName, String networkFabricControllerName); - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void disableWorkloadManagementNetwork( - String resourceGroupName, String networkFabricControllerName, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricSkusClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricSkusClient.java index a31a13b26936d..7f8c8bb30f1f0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricSkusClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricSkusClient.java @@ -16,14 +16,14 @@ public interface NetworkFabricSkusClient { /** * Gets a Network Fabric Sku. * - *

Implements Network Fabric Sku GET method. + *

Implements Network Fabric SKU GET method. * - * @param networkFabricSkuName Name of the Network Fabric Sku. + * @param networkFabricSkuName Name of the Network Fabric SKU. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricSku resource definition along with {@link Response}. + * @return the Network Fabric SKU resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String networkFabricSkuName, Context context); @@ -31,39 +31,39 @@ public interface NetworkFabricSkusClient { /** * Gets a Network Fabric Sku. * - *

Implements Network Fabric Sku GET method. + *

Implements Network Fabric SKU GET method. * - * @param networkFabricSkuName Name of the Network Fabric Sku. + * @param networkFabricSkuName Name of the Network Fabric SKU. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricSku resource definition. + * @return the Network Fabric SKU resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkFabricSkuInner get(String networkFabricSkuName); /** - * List NetworkFabricSkus by subscription. + * List Network Fabric SKUs by subscription. * - *

Implements NetworkFabricSkus list by subscription GET method. + *

Implements Network Fabric SKUs list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricSkus as paginated response with {@link PagedIterable}. + * @return list of Network Fabric SKUs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List NetworkFabricSkus by subscription. + * List Network Fabric SKUs by subscription. * - *

Implements NetworkFabricSkus list by subscription GET method. + *

Implements Network Fabric SKUs list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricSkus as paginated response with {@link PagedIterable}. + * @return list of Network Fabric SKUs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricsClient.java index 9808d85563ded..dd3c229eac2c9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricsClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkFabricsClient.java @@ -11,8 +11,14 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatchParameters; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatch; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties; /** An instance of this class provides access to all the operations defined in NetworkFabricsClient. */ public interface NetworkFabricsClient { @@ -27,7 +33,7 @@ public interface NetworkFabricsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkFabric resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkFabricInner> beginCreate( @@ -45,7 +51,7 @@ SyncPoller, NetworkFabricInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkFabric resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkFabricInner> beginCreate( @@ -62,7 +68,7 @@ SyncPoller, NetworkFabricInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabric resource definition. + * @return the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkFabricInner create(String resourceGroupName, String networkFabricName, NetworkFabricInner body); @@ -79,7 +85,7 @@ SyncPoller, NetworkFabricInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabric resource definition. + * @return the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkFabricInner create( @@ -128,11 +134,11 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkFabric resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkFabricInner> beginUpdate( - String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body); + String resourceGroupName, String networkFabricName, NetworkFabricPatch body); /** * Updates a Network Fabric. @@ -146,11 +152,11 @@ SyncPoller, NetworkFabricInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkFabric resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkFabricInner> beginUpdate( - String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body, Context context); + String resourceGroupName, String networkFabricName, NetworkFabricPatch body, Context context); /** * Updates a Network Fabric. @@ -163,10 +169,10 @@ SyncPoller, NetworkFabricInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabric resource definition. + * @return the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkFabricInner update(String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body); + NetworkFabricInner update(String resourceGroupName, String networkFabricName, NetworkFabricPatch body); /** * Updates a Network Fabric. @@ -180,11 +186,11 @@ SyncPoller, NetworkFabricInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabric resource definition. + * @return the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkFabricInner update( - String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body, Context context); + String resourceGroupName, String networkFabricName, NetworkFabricPatch body, Context context); /** * Deletes a Network Fabric. @@ -247,7 +253,7 @@ NetworkFabricInner update( void delete(String resourceGroupName, String networkFabricName, Context context); /** - * List NetworkFabrics by resource group. + * List Network Fabrics by resource group. * *

List all the Network Fabric resources in the given resource group. * @@ -255,13 +261,13 @@ NetworkFabricInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics as paginated response with {@link PagedIterable}. + * @return list of Network Fabrics as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List NetworkFabrics by resource group. + * List Network Fabrics by resource group. * *

List all the Network Fabric resources in the given resource group. * @@ -270,25 +276,25 @@ NetworkFabricInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics as paginated response with {@link PagedIterable}. + * @return list of Network Fabrics as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List NetworkFabrics by subscription. + * List Network Fabrics by subscription. * *

List all the Network Fabric resources in the given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics as paginated response with {@link PagedIterable}. + * @return list of Network Fabrics as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List NetworkFabrics by subscription. + * List Network Fabrics by subscription. * *

List all the Network Fabric resources in the given subscription. * @@ -296,7 +302,7 @@ NetworkFabricInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics as paginated response with {@link PagedIterable}. + * @return list of Network Fabrics as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -307,14 +313,15 @@ NetworkFabricInner update( *

Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginProvision(String resourceGroupName, String networkFabricName); + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginProvision(String resourceGroupName, String networkFabricName); /** * Implements the operation to the underlying resources. @@ -322,16 +329,16 @@ NetworkFabricInner update( *

Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginProvision( - String resourceGroupName, String networkFabricName, Context context); + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginProvision(String resourceGroupName, String networkFabricName, Context context); /** * Implements the operation to the underlying resources. @@ -339,13 +346,14 @@ SyncPoller, Void> beginProvision( *

Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void provision(String resourceGroupName, String networkFabricName); + CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, String networkFabricName); /** * Implements the operation to the underlying resources. @@ -353,14 +361,16 @@ SyncPoller, Void> beginProvision( *

Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void provision(String resourceGroupName, String networkFabricName, Context context); + CommonPostActionResponseForDeviceUpdateInner provision( + String resourceGroupName, String networkFabricName, Context context); /** * Implements the operation to the underlying resources. @@ -368,14 +378,15 @@ SyncPoller, Void> beginProvision( *

Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeprovision(String resourceGroupName, String networkFabricName); + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginDeprovision(String resourceGroupName, String networkFabricName); /** * Implements the operation to the underlying resources. @@ -383,16 +394,16 @@ SyncPoller, Void> beginProvision( *

Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeprovision( - String resourceGroupName, String networkFabricName, Context context); + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginDeprovision(String resourceGroupName, String networkFabricName, Context context); /** * Implements the operation to the underlying resources. @@ -400,13 +411,14 @@ SyncPoller, Void> beginDeprovision( *

Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deprovision(String resourceGroupName, String networkFabricName); + CommonPostActionResponseForDeviceUpdateInner deprovision(String resourceGroupName, String networkFabricName); /** * Implements the operation to the underlying resources. @@ -414,12 +426,505 @@ SyncPoller, Void> beginDeprovision( *

Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForDeviceUpdateInner deprovision( + String resourceGroupName, String networkFabricName, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpgrade(String resourceGroupName, String networkFabricName, UpdateVersion body); + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpgrade(String resourceGroupName, String networkFabricName, UpdateVersion body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner upgrade( + String resourceGroupName, String networkFabricName, UpdateVersion body); + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deprovision(String resourceGroupName, String networkFabricName, Context context); + CommonPostActionResponseForStateUpdateInner upgrade( + String resourceGroupName, String networkFabricName, UpdateVersion body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginRefreshConfiguration(String resourceGroupName, String networkFabricName); + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginRefreshConfiguration(String resourceGroupName, String networkFabricName, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner refreshConfiguration( + String resourceGroupName, String networkFabricName); + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner refreshConfiguration( + String resourceGroupName, String networkFabricName, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateWorkloadManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateWorkloadManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateInfraManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateInfraManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body); + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body); + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of topology of the underlying resources in the given Network Fabric + * instance. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ValidateConfigurationResponseInner> beginGetTopology( + String resourceGroupName, String networkFabricName); + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of topology of the underlying resources in the given Network Fabric + * instance. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ValidateConfigurationResponseInner> beginGetTopology( + String resourceGroupName, String networkFabricName, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return topology of the underlying resources in the given Network Fabric instance. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ValidateConfigurationResponseInner getTopology(String resourceGroupName, String networkFabricName); + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return topology of the underlying resources in the given Network Fabric instance. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ValidateConfigurationResponseInner getTopology(String resourceGroupName, String networkFabricName, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginCommitConfiguration(String resourceGroupName, String networkFabricName); + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginCommitConfiguration(String resourceGroupName, String networkFabricName, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String networkFabricName); + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner commitConfiguration( + String resourceGroupName, String networkFabricName, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkInterfacesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkInterfacesClient.java index c4d534f812cba..68b41941bd78d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkInterfacesClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkInterfacesClient.java @@ -11,7 +11,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InterfaceStatusInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatch; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -24,8 +24,8 @@ public interface NetworkInterfacesClient { *

Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -42,8 +42,8 @@ SyncPoller, NetworkInterfaceInner> beginCreate *

Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -65,8 +65,8 @@ SyncPoller, NetworkInterfaceInner> beginCreate *

Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -83,8 +83,8 @@ NetworkInterfaceInner create( *

Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -106,8 +106,8 @@ NetworkInterfaceInner create( *

Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -124,8 +124,8 @@ Response getWithResponse( *

Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -140,8 +140,8 @@ Response getWithResponse( *

Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -158,8 +158,8 @@ SyncPoller, NetworkInterfaceInner> beginUpdate *

Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -181,8 +181,8 @@ SyncPoller, NetworkInterfaceInner> beginUpdate *

Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -199,8 +199,8 @@ NetworkInterfaceInner update( *

Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -222,8 +222,8 @@ NetworkInterfaceInner update( *

Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -239,8 +239,8 @@ SyncPoller, Void> beginDelete( *

Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -257,8 +257,8 @@ SyncPoller, Void> beginDelete( *

Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -272,8 +272,8 @@ SyncPoller, Void> beginDelete( *

Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -288,14 +288,14 @@ SyncPoller, Void> beginDelete( *

List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of NetworkInterfaces as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String networkDeviceName); + PagedIterable listByNetworkDevice(String resourceGroupName, String networkDeviceName); /** * List all Network Interfaces that are available using an Network Device. @@ -303,7 +303,7 @@ SyncPoller, Void> beginDelete( *

List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -311,76 +311,8 @@ SyncPoller, Void> beginDelete( * @return list of NetworkInterfaces as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String networkDeviceName, Context context); - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the running status of the Network Interface. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InterfaceStatusInner> beginGetStatus( - String resourceGroupName, String networkDeviceName, String networkInterfaceName); - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the running status of the Network Interface. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, InterfaceStatusInner> beginGetStatus( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context); - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Interface. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - InterfaceStatusInner getStatus(String resourceGroupName, String networkDeviceName, String networkInterfaceName); - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Interface. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - InterfaceStatusInner getStatus( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context); + PagedIterable listByNetworkDevice( + String resourceGroupName, String networkDeviceName, Context context); /** * Updates the admin state of the network interface. @@ -388,20 +320,21 @@ InterfaceStatusInner getStatus( *

Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, - String networkDeviceName, - String networkInterfaceName, - UpdateAdministrativeState body); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, + String networkDeviceName, + String networkInterfaceName, + UpdateAdministrativeState body); /** * Updates the admin state of the network interface. @@ -409,22 +342,23 @@ SyncPoller, Void> beginUpdateAdministrativeState( *

Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, - String networkDeviceName, - String networkInterfaceName, - UpdateAdministrativeState body, - Context context); + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, + String networkDeviceName, + String networkInterfaceName, + UpdateAdministrativeState body, + Context context); /** * Updates the admin state of the network interface. @@ -432,15 +366,16 @@ SyncPoller, Void> beginUpdateAdministrativeState( *

Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateAdministrativeState( + CommonPostActionResponseForStateUpdateInner updateAdministrativeState( String resourceGroupName, String networkDeviceName, String networkInterfaceName, @@ -452,16 +387,17 @@ void updateAdministrativeState( *

Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - void updateAdministrativeState( + CommonPostActionResponseForStateUpdateInner updateAdministrativeState( String resourceGroupName, String networkDeviceName, String networkInterfaceName, diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkPacketBrokersClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkPacketBrokersClient.java new file mode 100644 index 0000000000000..c1f04fc62b6e6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkPacketBrokersClient.java @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerPatch; + +/** An instance of this class provides access to all the operations defined in NetworkPacketBrokersClient. */ +public interface NetworkPacketBrokersClient { + /** + * Create Network Packet Broker. + * + *

Creates a Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkPacketBrokerInner> beginCreate( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body); + + /** + * Create Network Packet Broker. + * + *

Creates a Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkPacketBrokerInner> beginCreate( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body, Context context); + + /** + * Create Network Packet Broker. + * + *

Creates a Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkPacketBrokerInner create( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body); + + /** + * Create Network Packet Broker. + * + *

Creates a Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkPacketBrokerInner create( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body, Context context); + + /** + * Gets a Network Packet Broker. + * + *

Retrieves details of this Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String networkPacketBrokerName, Context context); + + /** + * Gets a Network Packet Broker. + * + *

Retrieves details of this Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkPacketBrokerInner getByResourceGroup(String resourceGroupName, String networkPacketBrokerName); + + /** + * Updates the Network Packet Broker. + * + *

API to update certain properties of the Network Packet Broker resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Network Packet Broker properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkPacketBrokerInner> beginUpdate( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body); + + /** + * Updates the Network Packet Broker. + * + *

API to update certain properties of the Network Packet Broker resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Network Packet Broker properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkPacketBrokerInner> beginUpdate( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body, Context context); + + /** + * Updates the Network Packet Broker. + * + *

API to update certain properties of the Network Packet Broker resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Network Packet Broker properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkPacketBrokerInner update( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body); + + /** + * Updates the Network Packet Broker. + * + *

API to update certain properties of the Network Packet Broker resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Network Packet Broker properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkPacketBrokerInner update( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body, Context context); + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String networkPacketBrokerName); + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String networkPacketBrokerName, Context context); + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String networkPacketBrokerName); + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String networkPacketBrokerName, Context context); + + /** + * List all Network Packet Brokers under resource group. + * + *

Displays NetworkPacketBrokers list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all Network Packet Brokers under resource group. + * + *

Displays NetworkPacketBrokers list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List Network Packet Brokers by subscription. + * + *

Displays Network Packet Brokers list by subscription GET method. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List Network Packet Brokers by subscription. + * + *

Displays Network Packet Brokers list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkRackSkusClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkRackSkusClient.java deleted file mode 100644 index 39fdae0cb7444..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkRackSkusClient.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackSkuInner; - -/** An instance of this class provides access to all the operations defined in NetworkRackSkusClient. */ -public interface NetworkRackSkusClient { - /** - * Gets a Network Rack Sku. - * - *

Get Network Rack SKU resource. - * - * @param networkRackSkuName Name of the Network Rack Sku. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Rack SKU resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String networkRackSkuName, Context context); - - /** - * Gets a Network Rack Sku. - * - *

Get Network Rack SKU resource. - * - * @param networkRackSkuName Name of the Network Rack Sku. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Rack SKU resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkRackSkuInner get(String networkRackSkuName); - - /** - * List NetworkRackSkus by subscription. - * - *

List all Network Rack SKUs in the given subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRackSkus as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List NetworkRackSkus by subscription. - * - *

List all Network Rack SKUs in the given subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRackSkus as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkRacksClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkRacksClient.java index 1e377ea3235ef..b31f03a8cc78a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkRacksClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkRacksClient.java @@ -12,7 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackPatch; +import com.azure.resourcemanager.managednetworkfabric.models.TagsUpdate; /** An instance of this class provides access to all the operations defined in NetworkRacksClient. */ public interface NetworkRacksClient { @@ -27,7 +27,7 @@ public interface NetworkRacksClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkRack resource definition. + * @return the {@link SyncPoller} for polling of the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkRackInner> beginCreate( @@ -45,7 +45,7 @@ SyncPoller, NetworkRackInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkRack resource definition. + * @return the {@link SyncPoller} for polling of the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkRackInner> beginCreate( @@ -62,7 +62,7 @@ SyncPoller, NetworkRackInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkRack resource definition. + * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner body); @@ -79,7 +79,7 @@ SyncPoller, NetworkRackInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkRack resource definition. + * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner body, Context context); @@ -127,11 +127,11 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkRack resource definition. + * @return the {@link SyncPoller} for polling of the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkRackInner> beginUpdate( - String resourceGroupName, String networkRackName, NetworkRackPatch body); + String resourceGroupName, String networkRackName, TagsUpdate body); /** * Updates a Network Rack. @@ -145,11 +145,11 @@ SyncPoller, NetworkRackInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkRack resource definition. + * @return the {@link SyncPoller} for polling of the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkRackInner> beginUpdate( - String resourceGroupName, String networkRackName, NetworkRackPatch body, Context context); + String resourceGroupName, String networkRackName, TagsUpdate body, Context context); /** * Updates a Network Rack. @@ -162,10 +162,10 @@ SyncPoller, NetworkRackInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkRack resource definition. + * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkRackInner update(String resourceGroupName, String networkRackName, NetworkRackPatch body); + NetworkRackInner update(String resourceGroupName, String networkRackName, TagsUpdate body); /** * Updates a Network Rack. @@ -179,10 +179,10 @@ SyncPoller, NetworkRackInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkRack resource definition. + * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkRackInner update(String resourceGroupName, String networkRackName, NetworkRackPatch body, Context context); + NetworkRackInner update(String resourceGroupName, String networkRackName, TagsUpdate body, Context context); /** * Deletes a Network Rack. @@ -245,7 +245,7 @@ SyncPoller, NetworkRackInner> beginUpdate( void delete(String resourceGroupName, String networkRackName, Context context); /** - * List NetworkRacks by resource group. + * List Network Racks by resource group. * *

List all Network Rack resources in the given resource group. * @@ -253,13 +253,13 @@ SyncPoller, NetworkRackInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks as paginated response with {@link PagedIterable}. + * @return list of Network Racks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List NetworkRacks by resource group. + * List Network Racks by resource group. * *

List all Network Rack resources in the given resource group. * @@ -268,25 +268,25 @@ SyncPoller, NetworkRackInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks as paginated response with {@link PagedIterable}. + * @return list of Network Racks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List NetworkRacks by subscription. + * List Network Racks by subscription. * *

List all Network Rack resources in the given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks as paginated response with {@link PagedIterable}. + * @return list of Network Racks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List NetworkRacks by subscription. + * List Network Racks by subscription. * *

List all Network Rack resources in the given subscription. * @@ -294,7 +294,7 @@ SyncPoller, NetworkRackInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks as paginated response with {@link PagedIterable}. + * @return list of Network Racks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapRulesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapRulesClient.java new file mode 100644 index 0000000000000..00e3abe8f6f26 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapRulesClient.java @@ -0,0 +1,509 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatch; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; + +/** An instance of this class provides access to all the operations defined in NetworkTapRulesClient. */ +public interface NetworkTapRulesClient { + /** + * Create Network Tap Rule. + * + *

Create Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkTapRuleInner> beginCreate( + String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body); + + /** + * Create Network Tap Rule. + * + *

Create Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkTapRuleInner> beginCreate( + String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body, Context context); + + /** + * Create Network Tap Rule. + * + *

Create Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkTapRuleInner create(String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body); + + /** + * Create Network Tap Rule. + * + *

Create Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkTapRuleInner create( + String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body, Context context); + + /** + * Gets a Network Tap Rule. + * + *

Get Network Tap Rule resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Tap Rule resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String networkTapRuleName, Context context); + + /** + * Gets a Network Tap Rule. + * + *

Get Network Tap Rule resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Tap Rule resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkTapRuleInner getByResourceGroup(String resourceGroupName, String networkTapRuleName); + + /** + * Updates a Network Tap Rule. + * + *

Update certain properties of the Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Network Tap Rule properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkTapRuleInner> beginUpdate( + String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body); + + /** + * Updates a Network Tap Rule. + * + *

Update certain properties of the Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Network Tap Rule properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkTapRuleInner> beginUpdate( + String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body, Context context); + + /** + * Updates a Network Tap Rule. + * + *

Update certain properties of the Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Network Tap Rule properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkTapRuleInner update(String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body); + + /** + * Updates a Network Tap Rule. + * + *

Update certain properties of the Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Network Tap Rule properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkTapRuleInner update( + String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body, Context context); + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String networkTapRuleName); + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String networkTapRuleName, Context context); + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String networkTapRuleName); + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String networkTapRuleName, Context context); + + /** + * List Network Tap Rules by resource group. + * + *

List all the Network Tap Rule resources in the given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List Network Tap Rules by resource group. + * + *

List all the Network Tap Rule resources in the given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List NetworkTapRules by subscription. + * + *

List all the Network Tap Rule resources in the given subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List NetworkTapRules by subscription. + * + *

List all the Network Tap Rule resources in the given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body); + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body, Context context); + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner updateAdministrativeState( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body); + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner updateAdministrativeState( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body, Context context); + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginResync(String resourceGroupName, String networkTapRuleName); + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginResync(String resourceGroupName, String networkTapRuleName, Context context); + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapRuleName); + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner resync( + String resourceGroupName, String networkTapRuleName, Context context); + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String networkTapRuleName); + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String networkTapRuleName, Context context); + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String networkTapRuleName); + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String networkTapRuleName, Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapsClient.java new file mode 100644 index 0000000000000..a110098611d51 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkTapsClient.java @@ -0,0 +1,440 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatch; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; + +/** An instance of this class provides access to all the operations defined in NetworkTapsClient. */ +public interface NetworkTapsClient { + /** + * Create Network Tap. + * + *

Creates a Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkTapInner> beginCreate( + String resourceGroupName, String networkTapName, NetworkTapInner body); + + /** + * Create Network Tap. + * + *

Creates a Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkTapInner> beginCreate( + String resourceGroupName, String networkTapName, NetworkTapInner body, Context context); + + /** + * Create Network Tap. + * + *

Creates a Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner body); + + /** + * Create Network Tap. + * + *

Creates a Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner body, Context context); + + /** + * Gets a Network Tap. + * + *

Retrieves details of this Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String networkTapName, Context context); + + /** + * Gets a Network Tap. + * + *

Retrieves details of this Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkTapInner getByResourceGroup(String resourceGroupName, String networkTapName); + + /** + * Updates the Network Taps. + * + *

API to update certain properties of the Network Tap resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Network Tap properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkTapInner> beginUpdate( + String resourceGroupName, String networkTapName, NetworkTapPatch body); + + /** + * Updates the Network Taps. + * + *

API to update certain properties of the Network Tap resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Network Tap properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkTapInner> beginUpdate( + String resourceGroupName, String networkTapName, NetworkTapPatch body, Context context); + + /** + * Updates the Network Taps. + * + *

API to update certain properties of the Network Tap resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Network Tap properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkTapInner update(String resourceGroupName, String networkTapName, NetworkTapPatch body); + + /** + * Updates the Network Taps. + * + *

API to update certain properties of the Network Tap resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Network Tap properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkTapInner update(String resourceGroupName, String networkTapName, NetworkTapPatch body, Context context); + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String networkTapName); + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String networkTapName, Context context); + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String networkTapName); + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String networkTapName, Context context); + + /** + * List Network Taps by resource group. + * + *

Displays Network Taps list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List Network Taps by resource group. + * + *

Displays Network Taps list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List Network Taps by subscription. + * + *

Displays Network Taps list by subscription GET method. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List Network Taps by subscription. + * + *

Displays Network Taps list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for device updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState(String resourceGroupName, String networkTapName, UpdateAdministrativeState body); + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for device updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body, Context context); + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body); + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body, Context context); + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginResync(String resourceGroupName, String networkTapName); + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginResync(String resourceGroupName, String networkTapName, Context context); + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapName); + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner resync( + String resourceGroupName, String networkTapName, Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkToNetworkInterconnectsClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkToNetworkInterconnectsClient.java index 88be04bfaa5e6..c4ba96e425486 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkToNetworkInterconnectsClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/NetworkToNetworkInterconnectsClient.java @@ -11,7 +11,10 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatch; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; /** An instance of this class provides access to all the operations defined in NetworkToNetworkInterconnectsClient. */ public interface NetworkToNetworkInterconnectsClient { @@ -21,13 +24,13 @@ public interface NetworkToNetworkInterconnectsClient { *

Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkToNetworkInterconnect resource definition. + * @return the {@link SyncPoller} for polling of the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkToNetworkInterconnectInner> beginCreate( @@ -42,14 +45,14 @@ SyncPoller, NetworkToNetworkInterc *

Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkToNetworkInterconnect resource definition. + * @return the {@link SyncPoller} for polling of the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkToNetworkInterconnectInner> beginCreate( @@ -65,13 +68,13 @@ SyncPoller, NetworkToNetworkInterc *

Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition. + * @return the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkToNetworkInterconnectInner create( @@ -86,14 +89,14 @@ NetworkToNetworkInterconnectInner create( *

Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition. + * @return the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkToNetworkInterconnectInner create( @@ -109,13 +112,13 @@ NetworkToNetworkInterconnectInner create( *

Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnect. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition along with {@link Response}. + * @return the Network To Network Interconnect resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -127,25 +130,113 @@ Response getWithResponse( *

Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnect. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition. + * @return the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkToNetworkInterconnectInner get( String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName); + /** + * Updates a Network To NetworkInterconnects. + * + *

Update certain properties of the Network To NetworkInterconnects resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Network to Network Interconnect properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network To Network Interconnect resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkToNetworkInterconnectInner> beginUpdate( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectPatch body); + + /** + * Updates a Network To NetworkInterconnects. + * + *

Update certain properties of the Network To NetworkInterconnects resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Network to Network Interconnect properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network To Network Interconnect resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkToNetworkInterconnectInner> beginUpdate( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectPatch body, + Context context); + + /** + * Updates a Network To NetworkInterconnects. + * + *

Update certain properties of the Network To NetworkInterconnects resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Network to Network Interconnect properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network To Network Interconnect resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkToNetworkInterconnectInner update( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectPatch body); + + /** + * Updates a Network To NetworkInterconnects. + * + *

Update certain properties of the Network To NetworkInterconnects resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Network to Network Interconnect properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network To Network Interconnect resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkToNetworkInterconnectInner update( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectPatch body, + Context context); + /** * Deletes a NetworkToNetworkInterconnects. * *

Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -161,8 +252,8 @@ SyncPoller, Void> beginDelete( *

Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -179,8 +270,8 @@ SyncPoller, Void> beginDelete( *

Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -194,8 +285,8 @@ SyncPoller, Void> beginDelete( *

Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -211,14 +302,15 @@ void delete( *

Implements Network To Network Interconnects list by Network Fabric GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkToNetworkInterconnects as paginated response with {@link PagedIterable}. + * @return list of Network To Network Interconnects as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String networkFabricName); + PagedIterable listByNetworkFabric( + String resourceGroupName, String networkFabricName); /** * Executes list operation to display Network To Network Interconnects within a Network Fabric. @@ -226,14 +318,194 @@ void delete( *

Implements Network To Network Interconnects list by Network Fabric GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkToNetworkInterconnects as paginated response with {@link PagedIterable}. + * @return list of Network To Network Interconnects as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( + PagedIterable listByNetworkFabric( String resourceGroupName, String networkFabricName, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateNpbStaticRouteBfdAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateNpbStaticRouteBfdAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner updateAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner updateAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/RoutePoliciesClient.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/RoutePoliciesClient.java index 9269cca656372..81214e1948f24 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/RoutePoliciesClient.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/RoutePoliciesClient.java @@ -11,8 +11,12 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; /** An instance of this class provides access to all the operations defined in RoutePoliciesClient. */ public interface RoutePoliciesClient { @@ -298,4 +302,198 @@ SyncPoller, RoutePolicyInner> beginUpdate( */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); + + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for device updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body); + + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for device updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body, Context context); + + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body); + + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body, Context context); + + /** + * Validates the configuration of the resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String routePolicyName); + + /** + * Validates the configuration of the resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String routePolicyName, Context context); + + /** + * Validates the configuration of the resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String routePolicyName); + + /** + * Validates the configuration of the resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String routePolicyName, Context context); + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginCommitConfiguration(String resourceGroupName, String routePolicyName); + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CommonPostActionResponseForStateUpdateInner> + beginCommitConfiguration(String resourceGroupName, String routePolicyName, Context context); + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner commitConfiguration(String resourceGroupName, String routePolicyName); + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CommonPostActionResponseForStateUpdateInner commitConfiguration( + String resourceGroupName, String routePolicyName, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListInner.java index e4e5af6075631..d2a2770e1e8cf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListInner.java @@ -8,14 +8,18 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListConditionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; import java.util.List; import java.util.Map; -/** The AccessControlList resource definition. */ +/** The Access Control List resource definition. */ @Fluent public final class AccessControlListInner extends Resource { /* @@ -67,58 +71,133 @@ public AccessControlListInner withTags(Map tags) { } /** - * Get the addressFamily property: IP address family. Example: ipv4 | ipv6. + * Get the lastSyncedTime property: The last synced timestamp. * - * @return the addressFamily value. + * @return the lastSyncedTime value. */ - public AddressFamily addressFamily() { - return this.innerProperties() == null ? null : this.innerProperties().addressFamily(); + public OffsetDateTime lastSyncedTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastSyncedTime(); } /** - * Set the addressFamily property: IP address family. Example: ipv4 | ipv6. + * Get the configurationState property: Configuration state of the resource. * - * @param addressFamily the addressFamily value to set. + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } + + /** + * Get the configurationType property: Input method to configure Access Control List. + * + * @return the configurationType value. + */ + public ConfigurationType configurationType() { + return this.innerProperties() == null ? null : this.innerProperties().configurationType(); + } + + /** + * Set the configurationType property: Input method to configure Access Control List. + * + * @param configurationType the configurationType value to set. * @return the AccessControlListInner object itself. */ - public AccessControlListInner withAddressFamily(AddressFamily addressFamily) { + public AccessControlListInner withConfigurationType(ConfigurationType configurationType) { if (this.innerProperties() == null) { this.innerProperties = new AccessControlListProperties(); } - this.innerProperties().withAddressFamily(addressFamily); + this.innerProperties().withConfigurationType(configurationType); return this; } /** - * Get the conditions property: Access Control List conditions. + * Get the aclsUrl property: Access Control List file URL. * - * @return the conditions value. + * @return the aclsUrl value. */ - public List conditions() { - return this.innerProperties() == null ? null : this.innerProperties().conditions(); + public String aclsUrl() { + return this.innerProperties() == null ? null : this.innerProperties().aclsUrl(); } /** - * Set the conditions property: Access Control List conditions. + * Set the aclsUrl property: Access Control List file URL. * - * @param conditions the conditions value to set. + * @param aclsUrl the aclsUrl value to set. * @return the AccessControlListInner object itself. */ - public AccessControlListInner withConditions(List conditions) { + public AccessControlListInner withAclsUrl(String aclsUrl) { if (this.innerProperties() == null) { this.innerProperties = new AccessControlListProperties(); } - this.innerProperties().withConditions(conditions); + this.innerProperties().withAclsUrl(aclsUrl); return this; } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the matchConfigurations property: List of match configurations. * - * @return the provisioningState value. + * @return the matchConfigurations value. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public List matchConfigurations() { + return this.innerProperties() == null ? null : this.innerProperties().matchConfigurations(); + } + + /** + * Set the matchConfigurations property: List of match configurations. + * + * @param matchConfigurations the matchConfigurations value to set. + * @return the AccessControlListInner object itself. + */ + public AccessControlListInner withMatchConfigurations( + List matchConfigurations) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessControlListProperties(); + } + this.innerProperties().withMatchConfigurations(matchConfigurations); + return this; + } + + /** + * Get the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @return the dynamicMatchConfigurations value. + */ + public List dynamicMatchConfigurations() { + return this.innerProperties() == null ? null : this.innerProperties().dynamicMatchConfigurations(); + } + + /** + * Set the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @param dynamicMatchConfigurations the dynamicMatchConfigurations value to set. + * @return the AccessControlListInner object itself. + */ + public AccessControlListInner withDynamicMatchConfigurations( + List dynamicMatchConfigurations) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessControlListProperties(); + } + this.innerProperties().withDynamicMatchConfigurations(dynamicMatchConfigurations); + return this; } /** diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListPatchProperties.java index db3ca64c742c4..5134fef3adabb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListPatchProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListPatchProperties.java @@ -5,75 +5,73 @@ package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListConditionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** AccessControlListPatchProperties define the patchable resource properties. */ +/** Access Control Lists patch properties. */ @Fluent -public final class AccessControlListPatchProperties extends AnnotationResource { +public final class AccessControlListPatchProperties extends AccessControlListPatchableProperties { /* - * IP address family. Example: ipv4 | ipv6. + * Switch configuration description. */ - @JsonProperty(value = "addressFamily") - private AddressFamily addressFamily; - - /* - * Access Control List conditions. - */ - @JsonProperty(value = "conditions") - private List conditions; + @JsonProperty(value = "annotation") + private String annotation; /** Creates an instance of AccessControlListPatchProperties class. */ public AccessControlListPatchProperties() { } /** - * Get the addressFamily property: IP address family. Example: ipv4 | ipv6. + * Get the annotation property: Switch configuration description. * - * @return the addressFamily value. + * @return the annotation value. */ - public AddressFamily addressFamily() { - return this.addressFamily; + public String annotation() { + return this.annotation; } /** - * Set the addressFamily property: IP address family. Example: ipv4 | ipv6. + * Set the annotation property: Switch configuration description. * - * @param addressFamily the addressFamily value to set. + * @param annotation the annotation value to set. * @return the AccessControlListPatchProperties object itself. */ - public AccessControlListPatchProperties withAddressFamily(AddressFamily addressFamily) { - this.addressFamily = addressFamily; + public AccessControlListPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; return this; } - /** - * Get the conditions property: Access Control List conditions. - * - * @return the conditions value. - */ - public List conditions() { - return this.conditions; + /** {@inheritDoc} */ + @Override + public AccessControlListPatchProperties withConfigurationType(ConfigurationType configurationType) { + super.withConfigurationType(configurationType); + return this; } - /** - * Set the conditions property: Access Control List conditions. - * - * @param conditions the conditions value to set. - * @return the AccessControlListPatchProperties object itself. - */ - public AccessControlListPatchProperties withConditions(List conditions) { - this.conditions = conditions; + /** {@inheritDoc} */ + @Override + public AccessControlListPatchProperties withAclsUrl(String aclsUrl) { + super.withAclsUrl(aclsUrl); return this; } /** {@inheritDoc} */ @Override - public AccessControlListPatchProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); + public AccessControlListPatchProperties withMatchConfigurations( + List matchConfigurations) { + super.withMatchConfigurations(matchConfigurations); + return this; + } + + /** {@inheritDoc} */ + @Override + public AccessControlListPatchProperties withDynamicMatchConfigurations( + List dynamicMatchConfigurations) { + super.withDynamicMatchConfigurations(dynamicMatchConfigurations); return this; } @@ -85,8 +83,5 @@ public AccessControlListPatchProperties withAnnotation(String annotation) { @Override public void validate() { super.validate(); - if (conditions() != null) { - conditions().forEach(e -> e.validate()); - } } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListProperties.java index 28e9f2a0e7383..fb01165acbaf9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/AccessControlListProperties.java @@ -5,86 +5,188 @@ package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListConditionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; import java.util.List; -/** AccessControlListProperties define the resource properties. */ +/** Access Control List Properties defines the resource properties. */ @Fluent public final class AccessControlListProperties extends AnnotationResource { /* - * IP address family. Example: ipv4 | ipv6. + * The last synced timestamp. */ - @JsonProperty(value = "addressFamily", required = true) - private AddressFamily addressFamily; + @JsonProperty(value = "lastSyncedTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastSyncedTime; /* - * Access Control List conditions. + * Configuration state of the resource. */ - @JsonProperty(value = "conditions", required = true) - private List conditions; + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; /* - * Gets the provisioning state of the resource. + * Provisioning state of the resource. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; + /* + * Administrative state of the resource. + */ + @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) + private AdministrativeState administrativeState; + + /* + * Input method to configure Access Control List. + */ + @JsonProperty(value = "configurationType") + private ConfigurationType configurationType; + + /* + * Access Control List file URL. + */ + @JsonProperty(value = "aclsUrl") + private String aclsUrl; + + /* + * List of match configurations. + */ + @JsonProperty(value = "matchConfigurations") + private List matchConfigurations; + + /* + * List of dynamic match configurations. + */ + @JsonProperty(value = "dynamicMatchConfigurations") + private List dynamicMatchConfigurations; + /** Creates an instance of AccessControlListProperties class. */ public AccessControlListProperties() { } /** - * Get the addressFamily property: IP address family. Example: ipv4 | ipv6. + * Get the lastSyncedTime property: The last synced timestamp. * - * @return the addressFamily value. + * @return the lastSyncedTime value. */ - public AddressFamily addressFamily() { - return this.addressFamily; + public OffsetDateTime lastSyncedTime() { + return this.lastSyncedTime; } /** - * Set the addressFamily property: IP address family. Example: ipv4 | ipv6. + * Get the configurationState property: Configuration state of the resource. * - * @param addressFamily the addressFamily value to set. + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Get the configurationType property: Input method to configure Access Control List. + * + * @return the configurationType value. + */ + public ConfigurationType configurationType() { + return this.configurationType; + } + + /** + * Set the configurationType property: Input method to configure Access Control List. + * + * @param configurationType the configurationType value to set. * @return the AccessControlListProperties object itself. */ - public AccessControlListProperties withAddressFamily(AddressFamily addressFamily) { - this.addressFamily = addressFamily; + public AccessControlListProperties withConfigurationType(ConfigurationType configurationType) { + this.configurationType = configurationType; return this; } /** - * Get the conditions property: Access Control List conditions. + * Get the aclsUrl property: Access Control List file URL. * - * @return the conditions value. + * @return the aclsUrl value. */ - public List conditions() { - return this.conditions; + public String aclsUrl() { + return this.aclsUrl; } /** - * Set the conditions property: Access Control List conditions. + * Set the aclsUrl property: Access Control List file URL. * - * @param conditions the conditions value to set. + * @param aclsUrl the aclsUrl value to set. * @return the AccessControlListProperties object itself. */ - public AccessControlListProperties withConditions(List conditions) { - this.conditions = conditions; + public AccessControlListProperties withAclsUrl(String aclsUrl) { + this.aclsUrl = aclsUrl; return this; } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the matchConfigurations property: List of match configurations. * - * @return the provisioningState value. + * @return the matchConfigurations value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public List matchConfigurations() { + return this.matchConfigurations; + } + + /** + * Set the matchConfigurations property: List of match configurations. + * + * @param matchConfigurations the matchConfigurations value to set. + * @return the AccessControlListProperties object itself. + */ + public AccessControlListProperties withMatchConfigurations( + List matchConfigurations) { + this.matchConfigurations = matchConfigurations; + return this; + } + + /** + * Get the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @return the dynamicMatchConfigurations value. + */ + public List dynamicMatchConfigurations() { + return this.dynamicMatchConfigurations; + } + + /** + * Set the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @param dynamicMatchConfigurations the dynamicMatchConfigurations value to set. + * @return the AccessControlListProperties object itself. + */ + public AccessControlListProperties withDynamicMatchConfigurations( + List dynamicMatchConfigurations) { + this.dynamicMatchConfigurations = dynamicMatchConfigurations; + return this; } /** {@inheritDoc} */ @@ -102,21 +204,11 @@ public AccessControlListProperties withAnnotation(String annotation) { @Override public void validate() { super.validate(); - if (addressFamily() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property addressFamily in model AccessControlListProperties")); + if (matchConfigurations() != null) { + matchConfigurations().forEach(e -> e.validate()); } - if (conditions() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property conditions in model AccessControlListProperties")); - } else { - conditions().forEach(e -> e.validate()); + if (dynamicMatchConfigurations() != null) { + dynamicMatchConfigurations().forEach(e -> e.validate()); } } - - private static final ClientLogger LOGGER = new ClientLogger(AccessControlListProperties.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ArpPropertiesInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ArpPropertiesInner.java deleted file mode 100644 index e98ddf8c94e0e..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ArpPropertiesInner.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Show ARP table entry properties. */ -@Fluent -public final class ArpPropertiesInner { - /* - * Ipv4 or Ipv6 address - */ - @JsonProperty(value = "address", required = true) - private String address; - - /* - * Duration in seconds. - */ - @JsonProperty(value = "age", required = true) - private String age; - - /* - * Hardware address. - */ - @JsonProperty(value = "macAddress", required = true) - private String macAddress; - - /* - * Layer 2 interface name. - */ - @JsonProperty(value = "interface", required = true) - private String interfaceProperty; - - /* - * ARP status - */ - @JsonProperty(value = "state") - private String state; - - /** Creates an instance of ArpPropertiesInner class. */ - public ArpPropertiesInner() { - } - - /** - * Get the address property: Ipv4 or Ipv6 address. - * - * @return the address value. - */ - public String address() { - return this.address; - } - - /** - * Set the address property: Ipv4 or Ipv6 address. - * - * @param address the address value to set. - * @return the ArpPropertiesInner object itself. - */ - public ArpPropertiesInner withAddress(String address) { - this.address = address; - return this; - } - - /** - * Get the age property: Duration in seconds. - * - * @return the age value. - */ - public String age() { - return this.age; - } - - /** - * Set the age property: Duration in seconds. - * - * @param age the age value to set. - * @return the ArpPropertiesInner object itself. - */ - public ArpPropertiesInner withAge(String age) { - this.age = age; - return this; - } - - /** - * Get the macAddress property: Hardware address. - * - * @return the macAddress value. - */ - public String macAddress() { - return this.macAddress; - } - - /** - * Set the macAddress property: Hardware address. - * - * @param macAddress the macAddress value to set. - * @return the ArpPropertiesInner object itself. - */ - public ArpPropertiesInner withMacAddress(String macAddress) { - this.macAddress = macAddress; - return this; - } - - /** - * Get the interfaceProperty property: Layer 2 interface name. - * - * @return the interfaceProperty value. - */ - public String interfaceProperty() { - return this.interfaceProperty; - } - - /** - * Set the interfaceProperty property: Layer 2 interface name. - * - * @param interfaceProperty the interfaceProperty value to set. - * @return the ArpPropertiesInner object itself. - */ - public ArpPropertiesInner withInterfaceProperty(String interfaceProperty) { - this.interfaceProperty = interfaceProperty; - return this; - } - - /** - * Get the state property: ARP status. - * - * @return the state value. - */ - public String state() { - return this.state; - } - - /** - * Set the state property: ARP status. - * - * @param state the state value to set. - * @return the ArpPropertiesInner object itself. - */ - public ArpPropertiesInner withState(String state) { - this.state = state; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (address() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property address in model ArpPropertiesInner")); - } - if (age() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property age in model ArpPropertiesInner")); - } - if (macAddress() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property macAddress in model ArpPropertiesInner")); - } - if (interfaceProperty() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property interfaceProperty in model ArpPropertiesInner")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ArpPropertiesInner.class); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceUpdateInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceUpdateInner.java new file mode 100644 index 0000000000000..3414b55ad2e0a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForDeviceUpdateInner.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Common response for device updates. */ +@Fluent +public final class CommonPostActionResponseForDeviceUpdateInner extends ManagementError { + /* + * Gets the configuration state. + */ + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; + + /* + * List of ARM Resource IDs for which the given action applied successfully. + */ + @JsonProperty(value = "successfulDevices") + private List successfulDevices; + + /* + * List of ARM Resource IDs for which the given action failed to apply. + */ + @JsonProperty(value = "failedDevices") + private List failedDevices; + + /** Creates an instance of CommonPostActionResponseForDeviceUpdateInner class. */ + public CommonPostActionResponseForDeviceUpdateInner() { + } + + /** + * Get the configurationState property: Gets the configuration state. + * + * @return the configurationState value. + */ + public ConfigurationState getConfigurationState() { + return this.configurationState; + } + + /** + * Get the successfulDevices property: List of ARM Resource IDs for which the given action applied successfully. + * + * @return the successfulDevices value. + */ + public List getSuccessfulDevices() { + return this.successfulDevices; + } + + /** + * Set the successfulDevices property: List of ARM Resource IDs for which the given action applied successfully. + * + * @param successfulDevices the successfulDevices value to set. + * @return the CommonPostActionResponseForDeviceUpdateInner object itself. + */ + public CommonPostActionResponseForDeviceUpdateInner withSuccessfulDevices(List successfulDevices) { + this.successfulDevices = successfulDevices; + return this; + } + + /** + * Get the failedDevices property: List of ARM Resource IDs for which the given action failed to apply. + * + * @return the failedDevices value. + */ + public List getFailedDevices() { + return this.failedDevices; + } + + /** + * Set the failedDevices property: List of ARM Resource IDs for which the given action failed to apply. + * + * @param failedDevices the failedDevices value to set. + * @return the CommonPostActionResponseForDeviceUpdateInner object itself. + */ + public CommonPostActionResponseForDeviceUpdateInner withFailedDevices(List failedDevices) { + this.failedDevices = failedDevices; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForStateUpdateInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForStateUpdateInner.java new file mode 100644 index 0000000000000..0c419f110167b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/CommonPostActionResponseForStateUpdateInner.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Common response for the state updates. */ +@Immutable +public final class CommonPostActionResponseForStateUpdateInner extends ManagementError { + /* + * Gets the configuration state. + */ + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; + + /** Creates an instance of CommonPostActionResponseForStateUpdateInner class. */ + public CommonPostActionResponseForStateUpdateInner() { + } + + /** + * Get the configurationState property: Gets the configuration state. + * + * @return the configurationState value. + */ + public ConfigurationState getConfigurationState() { + return this.configurationState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkInner.java index ec4aa5c186924..182e19a554a5c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkInner.java @@ -8,15 +8,17 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -/** Defines the ExternalNetwork item. */ +/** Defines the External Network resource. */ @Fluent public final class ExternalNetworkInner extends ProxyResource { /* @@ -62,34 +64,6 @@ public String networkToNetworkInterconnectId() { return this.innerProperties() == null ? null : this.innerProperties().networkToNetworkInterconnectId(); } - /** - * Get the disabledOnResources property: List of resources the externalNetwork is disabled on. Can be either entire - * NetworkFabric or NetworkRack. - * - * @return the disabledOnResources value. - */ - public List disabledOnResources() { - return this.innerProperties() == null ? null : this.innerProperties().disabledOnResources(); - } - - /** - * Get the administrativeState property: AdministrativeState of the externalNetwork. Example: Enabled | Disabled. - * - * @return the administrativeState value. - */ - public EnabledDisabledState administrativeState() { - return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); - } - - /** - * Get the provisioningState property: Gets the provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - /** * Get the peeringOption property: Peering option list. * @@ -118,7 +92,7 @@ public ExternalNetworkInner withPeeringOption(PeeringOption peeringOption) { * * @return the optionBProperties value. */ - public OptionBProperties optionBProperties() { + public L3OptionBProperties optionBProperties() { return this.innerProperties() == null ? null : this.innerProperties().optionBProperties(); } @@ -128,7 +102,7 @@ public OptionBProperties optionBProperties() { * @param optionBProperties the optionBProperties value to set. * @return the ExternalNetworkInner object itself. */ - public ExternalNetworkInner withOptionBProperties(OptionBProperties optionBProperties) { + public ExternalNetworkInner withOptionBProperties(L3OptionBProperties optionBProperties) { if (this.innerProperties() == null) { this.innerProperties = new ExternalNetworkProperties(); } @@ -160,7 +134,35 @@ public ExternalNetworkInner withOptionAProperties(ExternalNetworkPropertiesOptio } /** - * Get the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } + + /** + * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @return the importRoutePolicyId value. */ @@ -169,7 +171,8 @@ public String importRoutePolicyId() { } /** - * Set the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @param importRoutePolicyId the importRoutePolicyId value to set. * @return the ExternalNetworkInner object itself. @@ -183,7 +186,8 @@ public ExternalNetworkInner withImportRoutePolicyId(String importRoutePolicyId) } /** - * Get the exportRoutePolicyId property: ARM resource ID of exportRoutePolicy. + * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @return the exportRoutePolicyId value. */ @@ -192,7 +196,8 @@ public String exportRoutePolicyId() { } /** - * Set the exportRoutePolicyId property: ARM resource ID of exportRoutePolicy. + * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @param exportRoutePolicyId the exportRoutePolicyId value to set. * @return the ExternalNetworkInner object itself. @@ -205,6 +210,52 @@ public ExternalNetworkInner withExportRoutePolicyId(String exportRoutePolicyId) return this; } + /** + * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * + * @return the importRoutePolicy value. + */ + public ImportRoutePolicy importRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicy(); + } + + /** + * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * + * @param importRoutePolicy the importRoutePolicy value to set. + * @return the ExternalNetworkInner object itself. + */ + public ExternalNetworkInner withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new ExternalNetworkProperties(); + } + this.innerProperties().withImportRoutePolicy(importRoutePolicy); + return this; + } + + /** + * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * + * @return the exportRoutePolicy value. + */ + public ExportRoutePolicy exportRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicy(); + } + + /** + * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * + * @param exportRoutePolicy the exportRoutePolicy value to set. + * @return the ExternalNetworkInner object itself. + */ + public ExternalNetworkInner withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new ExternalNetworkProperties(); + } + this.innerProperties().withExportRoutePolicy(exportRoutePolicy); + return this; + } + /** * Get the annotation property: Switch configuration description. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkPatchProperties.java index 5685766bd6713..3b0668e9e6025 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkPatchProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkPatchProperties.java @@ -6,8 +6,10 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3OptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; import com.fasterxml.jackson.annotation.JsonProperty; @@ -24,26 +26,38 @@ public final class ExternalNetworkPatchProperties extends AnnotationResource { * option B properties object */ @JsonProperty(value = "optionBProperties") - private OptionBProperties optionBProperties; + private L3OptionBProperties optionBProperties; /* * option A properties object */ @JsonProperty(value = "optionAProperties") - private Layer3OptionAProperties optionAProperties; + private ExternalNetworkPatchPropertiesOptionAProperties optionAProperties; /* - * ARM resource ID of importRoutePolicy. + * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. */ @JsonProperty(value = "importRoutePolicyId") private String importRoutePolicyId; /* - * ARM resource ID of exportRoutePolicy. + * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. */ @JsonProperty(value = "exportRoutePolicyId") private String exportRoutePolicyId; + /* + * Import Route Policy either IPv4 or IPv6. + */ + @JsonProperty(value = "importRoutePolicy") + private ImportRoutePolicy importRoutePolicy; + + /* + * Export Route Policy either IPv4 or IPv6. + */ + @JsonProperty(value = "exportRoutePolicy") + private ExportRoutePolicy exportRoutePolicy; + /** Creates an instance of ExternalNetworkPatchProperties class. */ public ExternalNetworkPatchProperties() { } @@ -73,7 +87,7 @@ public ExternalNetworkPatchProperties withPeeringOption(PeeringOption peeringOpt * * @return the optionBProperties value. */ - public OptionBProperties optionBProperties() { + public L3OptionBProperties optionBProperties() { return this.optionBProperties; } @@ -83,7 +97,7 @@ public OptionBProperties optionBProperties() { * @param optionBProperties the optionBProperties value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties withOptionBProperties(OptionBProperties optionBProperties) { + public ExternalNetworkPatchProperties withOptionBProperties(L3OptionBProperties optionBProperties) { this.optionBProperties = optionBProperties; return this; } @@ -93,7 +107,7 @@ public ExternalNetworkPatchProperties withOptionBProperties(OptionBProperties op * * @return the optionAProperties value. */ - public Layer3OptionAProperties optionAProperties() { + public ExternalNetworkPatchPropertiesOptionAProperties optionAProperties() { return this.optionAProperties; } @@ -103,13 +117,15 @@ public Layer3OptionAProperties optionAProperties() { * @param optionAProperties the optionAProperties value to set. * @return the ExternalNetworkPatchProperties object itself. */ - public ExternalNetworkPatchProperties withOptionAProperties(Layer3OptionAProperties optionAProperties) { + public ExternalNetworkPatchProperties withOptionAProperties( + ExternalNetworkPatchPropertiesOptionAProperties optionAProperties) { this.optionAProperties = optionAProperties; return this; } /** - * Get the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @return the importRoutePolicyId value. */ @@ -118,7 +134,8 @@ public String importRoutePolicyId() { } /** - * Set the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @param importRoutePolicyId the importRoutePolicyId value to set. * @return the ExternalNetworkPatchProperties object itself. @@ -129,7 +146,8 @@ public ExternalNetworkPatchProperties withImportRoutePolicyId(String importRoute } /** - * Get the exportRoutePolicyId property: ARM resource ID of exportRoutePolicy. + * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @return the exportRoutePolicyId value. */ @@ -138,7 +156,8 @@ public String exportRoutePolicyId() { } /** - * Set the exportRoutePolicyId property: ARM resource ID of exportRoutePolicy. + * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @param exportRoutePolicyId the exportRoutePolicyId value to set. * @return the ExternalNetworkPatchProperties object itself. @@ -148,6 +167,46 @@ public ExternalNetworkPatchProperties withExportRoutePolicyId(String exportRoute return this; } + /** + * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * + * @return the importRoutePolicy value. + */ + public ImportRoutePolicy importRoutePolicy() { + return this.importRoutePolicy; + } + + /** + * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * + * @param importRoutePolicy the importRoutePolicy value to set. + * @return the ExternalNetworkPatchProperties object itself. + */ + public ExternalNetworkPatchProperties withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { + this.importRoutePolicy = importRoutePolicy; + return this; + } + + /** + * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * + * @return the exportRoutePolicy value. + */ + public ExportRoutePolicy exportRoutePolicy() { + return this.exportRoutePolicy; + } + + /** + * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * + * @param exportRoutePolicy the exportRoutePolicy value to set. + * @return the ExternalNetworkPatchProperties object itself. + */ + public ExternalNetworkPatchProperties withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; + return this; + } + /** {@inheritDoc} */ @Override public ExternalNetworkPatchProperties withAnnotation(String annotation) { @@ -169,5 +228,11 @@ public void validate() { if (optionAProperties() != null) { optionAProperties().validate(); } + if (importRoutePolicy() != null) { + importRoutePolicy().validate(); + } + if (exportRoutePolicy() != null) { + exportRoutePolicy().validate(); + } } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkProperties.java index 2b865fb2fa314..337d686f4d8a8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ExternalNetworkProperties.java @@ -6,14 +6,16 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; /** External Network Properties. */ @Fluent @@ -25,53 +27,65 @@ public final class ExternalNetworkProperties extends AnnotationResource { private String networkToNetworkInterconnectId; /* - * List of resources the externalNetwork is disabled on. Can be either entire NetworkFabric or NetworkRack. + * Peering option list. */ - @JsonProperty(value = "disabledOnResources", access = JsonProperty.Access.WRITE_ONLY) - private List disabledOnResources; + @JsonProperty(value = "peeringOption", required = true) + private PeeringOption peeringOption; /* - * AdministrativeState of the externalNetwork. Example: Enabled | Disabled. + * option B properties object */ - @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) - private EnabledDisabledState administrativeState; + @JsonProperty(value = "optionBProperties") + private L3OptionBProperties optionBProperties; /* - * Gets the provisioning state of the resource. + * option A properties object */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; + @JsonProperty(value = "optionAProperties") + private ExternalNetworkPropertiesOptionAProperties optionAProperties; /* - * Peering option list. + * Configuration state of the resource. */ - @JsonProperty(value = "peeringOption", required = true) - private PeeringOption peeringOption; + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; /* - * option B properties object + * Provisioning state of the resource. */ - @JsonProperty(value = "optionBProperties") - private OptionBProperties optionBProperties; + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; /* - * option A properties object + * Administrative state of the resource. */ - @JsonProperty(value = "optionAProperties") - private ExternalNetworkPropertiesOptionAProperties optionAProperties; + @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) + private AdministrativeState administrativeState; /* - * ARM resource ID of importRoutePolicy. + * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. */ @JsonProperty(value = "importRoutePolicyId") private String importRoutePolicyId; /* - * ARM resource ID of exportRoutePolicy. + * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. */ @JsonProperty(value = "exportRoutePolicyId") private String exportRoutePolicyId; + /* + * Import Route Policy either IPv4 or IPv6. + */ + @JsonProperty(value = "importRoutePolicy") + private ImportRoutePolicy importRoutePolicy; + + /* + * Export Route Policy either IPv4 or IPv6. + */ + @JsonProperty(value = "exportRoutePolicy") + private ExportRoutePolicy exportRoutePolicy; + /** Creates an instance of ExternalNetworkProperties class. */ public ExternalNetworkProperties() { } @@ -85,34 +99,6 @@ public String networkToNetworkInterconnectId() { return this.networkToNetworkInterconnectId; } - /** - * Get the disabledOnResources property: List of resources the externalNetwork is disabled on. Can be either entire - * NetworkFabric or NetworkRack. - * - * @return the disabledOnResources value. - */ - public List disabledOnResources() { - return this.disabledOnResources; - } - - /** - * Get the administrativeState property: AdministrativeState of the externalNetwork. Example: Enabled | Disabled. - * - * @return the administrativeState value. - */ - public EnabledDisabledState administrativeState() { - return this.administrativeState; - } - - /** - * Get the provisioningState property: Gets the provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - /** * Get the peeringOption property: Peering option list. * @@ -138,7 +124,7 @@ public ExternalNetworkProperties withPeeringOption(PeeringOption peeringOption) * * @return the optionBProperties value. */ - public OptionBProperties optionBProperties() { + public L3OptionBProperties optionBProperties() { return this.optionBProperties; } @@ -148,7 +134,7 @@ public OptionBProperties optionBProperties() { * @param optionBProperties the optionBProperties value to set. * @return the ExternalNetworkProperties object itself. */ - public ExternalNetworkProperties withOptionBProperties(OptionBProperties optionBProperties) { + public ExternalNetworkProperties withOptionBProperties(L3OptionBProperties optionBProperties) { this.optionBProperties = optionBProperties; return this; } @@ -175,7 +161,35 @@ public ExternalNetworkProperties withOptionAProperties( } /** - * Get the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @return the importRoutePolicyId value. */ @@ -184,7 +198,8 @@ public String importRoutePolicyId() { } /** - * Set the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @param importRoutePolicyId the importRoutePolicyId value to set. * @return the ExternalNetworkProperties object itself. @@ -195,7 +210,8 @@ public ExternalNetworkProperties withImportRoutePolicyId(String importRoutePolic } /** - * Get the exportRoutePolicyId property: ARM resource ID of exportRoutePolicy. + * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @return the exportRoutePolicyId value. */ @@ -204,7 +220,8 @@ public String exportRoutePolicyId() { } /** - * Set the exportRoutePolicyId property: ARM resource ID of exportRoutePolicy. + * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @param exportRoutePolicyId the exportRoutePolicyId value to set. * @return the ExternalNetworkProperties object itself. @@ -214,6 +231,46 @@ public ExternalNetworkProperties withExportRoutePolicyId(String exportRoutePolic return this; } + /** + * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * + * @return the importRoutePolicy value. + */ + public ImportRoutePolicy importRoutePolicy() { + return this.importRoutePolicy; + } + + /** + * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * + * @param importRoutePolicy the importRoutePolicy value to set. + * @return the ExternalNetworkProperties object itself. + */ + public ExternalNetworkProperties withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { + this.importRoutePolicy = importRoutePolicy; + return this; + } + + /** + * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * + * @return the exportRoutePolicy value. + */ + public ExportRoutePolicy exportRoutePolicy() { + return this.exportRoutePolicy; + } + + /** + * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * + * @param exportRoutePolicy the exportRoutePolicy value to set. + * @return the ExternalNetworkProperties object itself. + */ + public ExternalNetworkProperties withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; + return this; + } + /** {@inheritDoc} */ @Override public ExternalNetworkProperties withAnnotation(String annotation) { @@ -241,6 +298,12 @@ public void validate() { if (optionAProperties() != null) { optionAProperties().validate(); } + if (importRoutePolicy() != null) { + importRoutePolicy().validate(); + } + if (exportRoutePolicy() != null) { + exportRoutePolicy().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(ExternalNetworkProperties.class); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/GetDeviceStatusPropertiesInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/GetDeviceStatusPropertiesInner.java deleted file mode 100644 index f6d01e5983845..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/GetDeviceStatusPropertiesInner.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.managednetworkfabric.models.OperationalStatus; -import com.azure.resourcemanager.managednetworkfabric.models.PowerCycleState; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Get Device status response properties. */ -@Fluent -public final class GetDeviceStatusPropertiesInner { - /* - * Primary or Secondary power end. - */ - @JsonProperty(value = "operationalStatus", required = true) - private OperationalStatus operationalStatus; - - /* - * On or Off power cycle state. - */ - @JsonProperty(value = "powerCycleState", required = true) - private PowerCycleState powerCycleState; - - /* - * The serial number of the device - */ - @JsonProperty(value = "serialNumber", required = true) - private String serialNumber; - - /** Creates an instance of GetDeviceStatusPropertiesInner class. */ - public GetDeviceStatusPropertiesInner() { - } - - /** - * Get the operationalStatus property: Primary or Secondary power end. - * - * @return the operationalStatus value. - */ - public OperationalStatus operationalStatus() { - return this.operationalStatus; - } - - /** - * Set the operationalStatus property: Primary or Secondary power end. - * - * @param operationalStatus the operationalStatus value to set. - * @return the GetDeviceStatusPropertiesInner object itself. - */ - public GetDeviceStatusPropertiesInner withOperationalStatus(OperationalStatus operationalStatus) { - this.operationalStatus = operationalStatus; - return this; - } - - /** - * Get the powerCycleState property: On or Off power cycle state. - * - * @return the powerCycleState value. - */ - public PowerCycleState powerCycleState() { - return this.powerCycleState; - } - - /** - * Set the powerCycleState property: On or Off power cycle state. - * - * @param powerCycleState the powerCycleState value to set. - * @return the GetDeviceStatusPropertiesInner object itself. - */ - public GetDeviceStatusPropertiesInner withPowerCycleState(PowerCycleState powerCycleState) { - this.powerCycleState = powerCycleState; - return this; - } - - /** - * Get the serialNumber property: The serial number of the device. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.serialNumber; - } - - /** - * Set the serialNumber property: The serial number of the device. - * - * @param serialNumber the serialNumber value to set. - * @return the GetDeviceStatusPropertiesInner object itself. - */ - public GetDeviceStatusPropertiesInner withSerialNumber(String serialNumber) { - this.serialNumber = serialNumber; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (operationalStatus() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property operationalStatus in model GetDeviceStatusPropertiesInner")); - } - if (powerCycleState() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property powerCycleState in model GetDeviceStatusPropertiesInner")); - } - if (serialNumber() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property serialNumber in model GetDeviceStatusPropertiesInner")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(GetDeviceStatusPropertiesInner.class); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/GetDynamicInterfaceMapsPropertiesItemInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/GetDynamicInterfaceMapsPropertiesItemInner.java deleted file mode 100644 index 4a0356ea20c76..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/GetDynamicInterfaceMapsPropertiesItemInner.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Get Device static interface maps as per topology. */ -@Fluent -public final class GetDynamicInterfaceMapsPropertiesItemInner extends InterfaceStatusInner { - /* - * The interface name. - */ - @JsonProperty(value = "name") - private String name; - - /** Creates an instance of GetDynamicInterfaceMapsPropertiesItemInner class. */ - public GetDynamicInterfaceMapsPropertiesItemInner() { - } - - /** - * Get the name property: The interface name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The interface name. - * - * @param name the name value to set. - * @return the GetDynamicInterfaceMapsPropertiesItemInner object itself. - */ - public GetDynamicInterfaceMapsPropertiesItemInner withName(String name) { - this.name = name; - return this; - } - - /** {@inheritDoc} */ - @Override - public GetDynamicInterfaceMapsPropertiesItemInner withOperationalStatus(String operationalStatus) { - super.withOperationalStatus(operationalStatus); - return this; - } - - /** {@inheritDoc} */ - @Override - public GetDynamicInterfaceMapsPropertiesItemInner withPhyStatus(String phyStatus) { - super.withPhyStatus(phyStatus); - return this; - } - - /** {@inheritDoc} */ - @Override - public GetDynamicInterfaceMapsPropertiesItemInner withTransceiverStatus(String transceiverStatus) { - super.withTransceiverStatus(transceiverStatus); - return this; - } - - /** {@inheritDoc} */ - @Override - public GetDynamicInterfaceMapsPropertiesItemInner withConnectedTo(String connectedTo) { - super.withConnectedTo(connectedTo); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/GetStaticInterfaceMapsPropertiesItemInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/GetStaticInterfaceMapsPropertiesItemInner.java deleted file mode 100644 index c744fd2a0b614..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/GetStaticInterfaceMapsPropertiesItemInner.java +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Get Device static interface maps as per topology. */ -@Fluent -public final class GetStaticInterfaceMapsPropertiesItemInner { - /* - * The interface name. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The interface description. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The interface identifier. - */ - @JsonProperty(value = "identifier") - private String identifier; - - /* - * The interface type. Example: Ethernet - */ - @JsonProperty(value = "interfaceType") - private String interfaceType; - - /* - * The physical cable connector type. Example: Optical - */ - @JsonProperty(value = "connectorType") - private String connectorType; - - /* - * Connected to ARM resource or external interface - */ - @JsonProperty(value = "connectedTo") - private String connectedTo; - - /* - * The interface speed. Example: 100 - */ - @JsonProperty(value = "speed") - private Float speed; - - /* - * The port channel group id. - */ - @JsonProperty(value = "channelGroupId") - private Float channelGroupId; - - /** Creates an instance of GetStaticInterfaceMapsPropertiesItemInner class. */ - public GetStaticInterfaceMapsPropertiesItemInner() { - } - - /** - * Get the name property: The interface name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The interface name. - * - * @param name the name value to set. - * @return the GetStaticInterfaceMapsPropertiesItemInner object itself. - */ - public GetStaticInterfaceMapsPropertiesItemInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: The interface description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The interface description. - * - * @param description the description value to set. - * @return the GetStaticInterfaceMapsPropertiesItemInner object itself. - */ - public GetStaticInterfaceMapsPropertiesItemInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the identifier property: The interface identifier. - * - * @return the identifier value. - */ - public String identifier() { - return this.identifier; - } - - /** - * Set the identifier property: The interface identifier. - * - * @param identifier the identifier value to set. - * @return the GetStaticInterfaceMapsPropertiesItemInner object itself. - */ - public GetStaticInterfaceMapsPropertiesItemInner withIdentifier(String identifier) { - this.identifier = identifier; - return this; - } - - /** - * Get the interfaceType property: The interface type. Example: Ethernet. - * - * @return the interfaceType value. - */ - public String interfaceType() { - return this.interfaceType; - } - - /** - * Set the interfaceType property: The interface type. Example: Ethernet. - * - * @param interfaceType the interfaceType value to set. - * @return the GetStaticInterfaceMapsPropertiesItemInner object itself. - */ - public GetStaticInterfaceMapsPropertiesItemInner withInterfaceType(String interfaceType) { - this.interfaceType = interfaceType; - return this; - } - - /** - * Get the connectorType property: The physical cable connector type. Example: Optical. - * - * @return the connectorType value. - */ - public String connectorType() { - return this.connectorType; - } - - /** - * Set the connectorType property: The physical cable connector type. Example: Optical. - * - * @param connectorType the connectorType value to set. - * @return the GetStaticInterfaceMapsPropertiesItemInner object itself. - */ - public GetStaticInterfaceMapsPropertiesItemInner withConnectorType(String connectorType) { - this.connectorType = connectorType; - return this; - } - - /** - * Get the connectedTo property: Connected to ARM resource or external interface. - * - * @return the connectedTo value. - */ - public String connectedTo() { - return this.connectedTo; - } - - /** - * Set the connectedTo property: Connected to ARM resource or external interface. - * - * @param connectedTo the connectedTo value to set. - * @return the GetStaticInterfaceMapsPropertiesItemInner object itself. - */ - public GetStaticInterfaceMapsPropertiesItemInner withConnectedTo(String connectedTo) { - this.connectedTo = connectedTo; - return this; - } - - /** - * Get the speed property: The interface speed. Example: 100. - * - * @return the speed value. - */ - public Float speed() { - return this.speed; - } - - /** - * Set the speed property: The interface speed. Example: 100. - * - * @param speed the speed value to set. - * @return the GetStaticInterfaceMapsPropertiesItemInner object itself. - */ - public GetStaticInterfaceMapsPropertiesItemInner withSpeed(Float speed) { - this.speed = speed; - return this; - } - - /** - * Get the channelGroupId property: The port channel group id. - * - * @return the channelGroupId value. - */ - public Float channelGroupId() { - return this.channelGroupId; - } - - /** - * Set the channelGroupId property: The port channel group id. - * - * @param channelGroupId the channelGroupId value to set. - * @return the GetStaticInterfaceMapsPropertiesItemInner object itself. - */ - public GetStaticInterfaceMapsPropertiesItemInner withChannelGroupId(Float channelGroupId) { - this.channelGroupId = channelGroupId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InterfaceStatusInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InterfaceStatusInner.java deleted file mode 100644 index ed336589dd7ff..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InterfaceStatusInner.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Interface running status properties. */ -@Fluent -public class InterfaceStatusInner { - /* - * The interface administrative state. - */ - @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) - private EnabledDisabledState administrativeState; - - /* - * The interface operational status. - */ - @JsonProperty(value = "operationalStatus") - private String operationalStatus; - - /* - * The physical status. - */ - @JsonProperty(value = "phyStatus") - private String phyStatus; - - /* - * The interface transceiver type. Example: up or down - */ - @JsonProperty(value = "transceiverStatus") - private String transceiverStatus; - - /* - * Connected to ARM resource or external interface - */ - @JsonProperty(value = "connectedTo") - private String connectedTo; - - /** Creates an instance of InterfaceStatusInner class. */ - public InterfaceStatusInner() { - } - - /** - * Get the administrativeState property: The interface administrative state. - * - * @return the administrativeState value. - */ - public EnabledDisabledState administrativeState() { - return this.administrativeState; - } - - /** - * Get the operationalStatus property: The interface operational status. - * - * @return the operationalStatus value. - */ - public String operationalStatus() { - return this.operationalStatus; - } - - /** - * Set the operationalStatus property: The interface operational status. - * - * @param operationalStatus the operationalStatus value to set. - * @return the InterfaceStatusInner object itself. - */ - public InterfaceStatusInner withOperationalStatus(String operationalStatus) { - this.operationalStatus = operationalStatus; - return this; - } - - /** - * Get the phyStatus property: The physical status. - * - * @return the phyStatus value. - */ - public String phyStatus() { - return this.phyStatus; - } - - /** - * Set the phyStatus property: The physical status. - * - * @param phyStatus the phyStatus value to set. - * @return the InterfaceStatusInner object itself. - */ - public InterfaceStatusInner withPhyStatus(String phyStatus) { - this.phyStatus = phyStatus; - return this; - } - - /** - * Get the transceiverStatus property: The interface transceiver type. Example: up or down. - * - * @return the transceiverStatus value. - */ - public String transceiverStatus() { - return this.transceiverStatus; - } - - /** - * Set the transceiverStatus property: The interface transceiver type. Example: up or down. - * - * @param transceiverStatus the transceiverStatus value to set. - * @return the InterfaceStatusInner object itself. - */ - public InterfaceStatusInner withTransceiverStatus(String transceiverStatus) { - this.transceiverStatus = transceiverStatus; - return this; - } - - /** - * Get the connectedTo property: Connected to ARM resource or external interface. - * - * @return the connectedTo value. - */ - public String connectedTo() { - return this.connectedTo; - } - - /** - * Set the connectedTo property: Connected to ARM resource or external interface. - * - * @param connectedTo the connectedTo value to set. - * @return the InterfaceStatusInner object itself. - */ - public InterfaceStatusInner withConnectedTo(String connectedTo) { - this.connectedTo = connectedTo; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkInner.java index 07f4f26f71004..8be0da3312c24 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkInner.java @@ -8,15 +8,20 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.Extension; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Defines the InternalNetwork item. */ +/** Defines the Internal Network resource. */ @Fluent public final class InternalNetworkInner extends ProxyResource { /* @@ -54,84 +59,100 @@ public SystemData systemData() { } /** - * Get the disabledOnResources property: List of resources the InternalNetwork is disabled on. Can be either entire - * NetworkFabric or NetworkRack. + * Get the vlanId property: Vlan identifier. Example: 1001. * - * @return the disabledOnResources value. + * @return the vlanId value. */ - public List disabledOnResources() { - return this.innerProperties() == null ? null : this.innerProperties().disabledOnResources(); + public int vlanId() { + return this.innerProperties() == null ? 0 : this.innerProperties().vlanId(); } /** - * Get the administrativeState property: Administrative state of the InternalNetwork. Example: Enabled | Disabled. + * Set the vlanId property: Vlan identifier. Example: 1001. * - * @return the administrativeState value. + * @param vlanId the vlanId value to set. + * @return the InternalNetworkInner object itself. */ - public EnabledDisabledState administrativeState() { - return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + public InternalNetworkInner withVlanId(int vlanId) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkProperties(); + } + this.innerProperties().withVlanId(vlanId); + return this; } /** - * Get the bgpDisabledOnResources property: List of resources the BGP is disabled on. Can be either entire - * NetworkFabric or NetworkRack. + * Get the bgpConfiguration property: BGP configuration properties. * - * @return the bgpDisabledOnResources value. + * @return the bgpConfiguration value. */ - public List bgpDisabledOnResources() { - return this.innerProperties() == null ? null : this.innerProperties().bgpDisabledOnResources(); + public InternalNetworkPropertiesBgpConfiguration bgpConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().bgpConfiguration(); } /** - * Get the bfdDisabledOnResources property: List of resources the BFD for BGP is disabled on. Can be either entire - * NetworkFabric or NetworkRack. + * Set the bgpConfiguration property: BGP configuration properties. * - * @return the bfdDisabledOnResources value. + * @param bgpConfiguration the bgpConfiguration value to set. + * @return the InternalNetworkInner object itself. */ - public List bfdDisabledOnResources() { - return this.innerProperties() == null ? null : this.innerProperties().bfdDisabledOnResources(); + public InternalNetworkInner withBgpConfiguration(InternalNetworkPropertiesBgpConfiguration bgpConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkProperties(); + } + this.innerProperties().withBgpConfiguration(bgpConfiguration); + return this; } /** - * Get the bfdForStaticRoutesDisabledOnResources property: List of resources the BFD of StaticRoutes is disabled on. - * Can be either entire NetworkFabric or NetworkRack. + * Get the staticRouteConfiguration property: Static Route Configuration properties. * - * @return the bfdForStaticRoutesDisabledOnResources value. + * @return the staticRouteConfiguration value. */ - public List bfdForStaticRoutesDisabledOnResources() { - return this.innerProperties() == null ? null : this.innerProperties().bfdForStaticRoutesDisabledOnResources(); + public InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().staticRouteConfiguration(); } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Set the staticRouteConfiguration property: Static Route Configuration properties. * - * @return the provisioningState value. + * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @return the InternalNetworkInner object itself. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public InternalNetworkInner withStaticRouteConfiguration( + InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkProperties(); + } + this.innerProperties().withStaticRouteConfiguration(staticRouteConfiguration); + return this; } /** - * Get the vlanId property: Vlan identifier. Example: 1001. + * Get the configurationState property: Configuration state of the resource. * - * @return the vlanId value. + * @return the configurationState value. */ - public int vlanId() { - return this.innerProperties() == null ? 0 : this.innerProperties().vlanId(); + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); } /** - * Set the vlanId property: Vlan identifier. Example: 1001. + * Get the provisioningState property: Provisioning state of the resource. * - * @param vlanId the vlanId value to set. - * @return the InternalNetworkInner object itself. + * @return the provisioningState value. */ - public InternalNetworkInner withVlanId(int vlanId) { - if (this.innerProperties() == null) { - this.innerProperties = new InternalNetworkProperties(); - } - this.innerProperties().withVlanId(vlanId); - return this; + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); } /** @@ -158,7 +179,7 @@ public InternalNetworkInner withMtu(Integer mtu) { } /** - * Get the connectedIPv4Subnets property: List with object connected IPv4 Subnets. + * Get the connectedIPv4Subnets property: List of Connected IPv4 Subnets. * * @return the connectedIPv4Subnets value. */ @@ -167,7 +188,7 @@ public List connectedIPv4Subnets() { } /** - * Set the connectedIPv4Subnets property: List with object connected IPv4 Subnets. + * Set the connectedIPv4Subnets property: List of Connected IPv4 Subnets. * * @param connectedIPv4Subnets the connectedIPv4Subnets value to set. * @return the InternalNetworkInner object itself. @@ -181,7 +202,7 @@ public InternalNetworkInner withConnectedIPv4Subnets(List conne } /** - * Get the connectedIPv6Subnets property: List with object connected IPv6 Subnets. + * Get the connectedIPv6Subnets property: List of connected IPv6 Subnets. * * @return the connectedIPv6Subnets value. */ @@ -190,7 +211,7 @@ public List connectedIPv6Subnets() { } /** - * Set the connectedIPv6Subnets property: List with object connected IPv6 Subnets. + * Set the connectedIPv6Subnets property: List of connected IPv6 Subnets. * * @param connectedIPv6Subnets the connectedIPv6Subnets value to set. * @return the InternalNetworkInner object itself. @@ -204,94 +225,190 @@ public InternalNetworkInner withConnectedIPv6Subnets(List conne } /** - * Get the staticRouteConfiguration property: Static Route Configuration properties. + * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @return the staticRouteConfiguration value. + * @return the importRoutePolicyId value. */ - public StaticRouteConfiguration staticRouteConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().staticRouteConfiguration(); + public String importRoutePolicyId() { + return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicyId(); } /** - * Set the staticRouteConfiguration property: Static Route Configuration properties. + * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @param importRoutePolicyId the importRoutePolicyId value to set. * @return the InternalNetworkInner object itself. */ - public InternalNetworkInner withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration) { + public InternalNetworkInner withImportRoutePolicyId(String importRoutePolicyId) { if (this.innerProperties() == null) { this.innerProperties = new InternalNetworkProperties(); } - this.innerProperties().withStaticRouteConfiguration(staticRouteConfiguration); + this.innerProperties().withImportRoutePolicyId(importRoutePolicyId); return this; } /** - * Get the bgpConfiguration property: BGP configuration properties. + * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @return the bgpConfiguration value. + * @return the exportRoutePolicyId value. */ - public BgpConfiguration bgpConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().bgpConfiguration(); + public String exportRoutePolicyId() { + return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicyId(); } /** - * Set the bgpConfiguration property: BGP configuration properties. + * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @param bgpConfiguration the bgpConfiguration value to set. + * @param exportRoutePolicyId the exportRoutePolicyId value to set. * @return the InternalNetworkInner object itself. */ - public InternalNetworkInner withBgpConfiguration(BgpConfiguration bgpConfiguration) { + public InternalNetworkInner withExportRoutePolicyId(String exportRoutePolicyId) { if (this.innerProperties() == null) { this.innerProperties = new InternalNetworkProperties(); } - this.innerProperties().withBgpConfiguration(bgpConfiguration); + this.innerProperties().withExportRoutePolicyId(exportRoutePolicyId); return this; } /** - * Get the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @return the importRoutePolicyId value. + * @return the importRoutePolicy value. */ - public String importRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicyId(); + public ImportRoutePolicy importRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicy(); } /** - * Set the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @param importRoutePolicyId the importRoutePolicyId value to set. + * @param importRoutePolicy the importRoutePolicy value to set. * @return the InternalNetworkInner object itself. */ - public InternalNetworkInner withImportRoutePolicyId(String importRoutePolicyId) { + public InternalNetworkInner withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { if (this.innerProperties() == null) { this.innerProperties = new InternalNetworkProperties(); } - this.innerProperties().withImportRoutePolicyId(importRoutePolicyId); + this.innerProperties().withImportRoutePolicy(importRoutePolicy); return this; } /** - * Get the exportRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @return the exportRoutePolicyId value. + * @return the exportRoutePolicy value. */ - public String exportRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicyId(); + public ExportRoutePolicy exportRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicy(); } /** - * Set the exportRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. + * @param exportRoutePolicy the exportRoutePolicy value to set. * @return the InternalNetworkInner object itself. */ - public InternalNetworkInner withExportRoutePolicyId(String exportRoutePolicyId) { + public InternalNetworkInner withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { if (this.innerProperties() == null) { this.innerProperties = new InternalNetworkProperties(); } - this.innerProperties().withExportRoutePolicyId(exportRoutePolicyId); + this.innerProperties().withExportRoutePolicy(exportRoutePolicy); + return this; + } + + /** + * Get the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @return the ingressAclId value. + */ + public String ingressAclId() { + return this.innerProperties() == null ? null : this.innerProperties().ingressAclId(); + } + + /** + * Set the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @param ingressAclId the ingressAclId value to set. + * @return the InternalNetworkInner object itself. + */ + public InternalNetworkInner withIngressAclId(String ingressAclId) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkProperties(); + } + this.innerProperties().withIngressAclId(ingressAclId); + return this; + } + + /** + * Get the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @return the egressAclId value. + */ + public String egressAclId() { + return this.innerProperties() == null ? null : this.innerProperties().egressAclId(); + } + + /** + * Set the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @param egressAclId the egressAclId value to set. + * @return the InternalNetworkInner object itself. + */ + public InternalNetworkInner withEgressAclId(String egressAclId) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkProperties(); + } + this.innerProperties().withEgressAclId(egressAclId); + return this; + } + + /** + * Get the isMonitoringEnabled property: To check whether monitoring of internal network is enabled or not. + * + * @return the isMonitoringEnabled value. + */ + public IsMonitoringEnabled isMonitoringEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().isMonitoringEnabled(); + } + + /** + * Set the isMonitoringEnabled property: To check whether monitoring of internal network is enabled or not. + * + * @param isMonitoringEnabled the isMonitoringEnabled value to set. + * @return the InternalNetworkInner object itself. + */ + public InternalNetworkInner withIsMonitoringEnabled(IsMonitoringEnabled isMonitoringEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkProperties(); + } + this.innerProperties().withIsMonitoringEnabled(isMonitoringEnabled); + return this; + } + + /** + * Get the extension property: Extension. Example: NoExtension | NPB. + * + * @return the extension value. + */ + public Extension extension() { + return this.innerProperties() == null ? null : this.innerProperties().extension(); + } + + /** + * Set the extension property: Extension. Example: NoExtension | NPB. + * + * @param extension the extension value to set. + * @return the InternalNetworkInner object itself. + */ + public InternalNetworkInner withExtension(Extension extension) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkProperties(); + } + this.innerProperties().withExtension(extension); return this; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkPatchProperties.java index fe154190ec4c9..f77b2ddf4905a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkPatchProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkPatchProperties.java @@ -8,6 +8,9 @@ import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -15,6 +18,18 @@ /** InternalNetwork Patch properties. */ @Fluent public final class InternalNetworkPatchProperties extends AnnotationResource { + /* + * BGP configuration properties. + */ + @JsonProperty(value = "bgpConfiguration") + private BgpConfiguration bgpConfiguration; + + /* + * Static Route Configuration properties. + */ + @JsonProperty(value = "staticRouteConfiguration") + private StaticRouteConfiguration staticRouteConfiguration; + /* * Maximum transmission unit. Default value is 1500. */ @@ -22,45 +37,104 @@ public final class InternalNetworkPatchProperties extends AnnotationResource { private Integer mtu; /* - * List with object connected IPv4 Subnets. + * List of Connected IPv4 Subnets. */ @JsonProperty(value = "connectedIPv4Subnets") private List connectedIPv4Subnets; /* - * List with object connected IPv6 Subnets. + * List of connected IPv6 Subnets. */ @JsonProperty(value = "connectedIPv6Subnets") private List connectedIPv6Subnets; /* - * Static Route Configuration properties. + * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. */ - @JsonProperty(value = "staticRouteConfiguration") - private StaticRouteConfiguration staticRouteConfiguration; + @JsonProperty(value = "importRoutePolicyId") + private String importRoutePolicyId; /* - * BGP configuration properties + * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. */ - @JsonProperty(value = "bgpConfiguration") - private BgpConfiguration bgpConfiguration; + @JsonProperty(value = "exportRoutePolicyId") + private String exportRoutePolicyId; /* - * ARM resource ID of importRoutePolicy. + * Import Route Policy either IPv4 or IPv6. */ - @JsonProperty(value = "importRoutePolicyId") - private String importRoutePolicyId; + @JsonProperty(value = "importRoutePolicy") + private ImportRoutePolicy importRoutePolicy; /* - * ARM resource ID of importRoutePolicy. + * Export Route Policy either IPv4 or IPv6. */ - @JsonProperty(value = "exportRoutePolicyId") - private String exportRoutePolicyId; + @JsonProperty(value = "exportRoutePolicy") + private ExportRoutePolicy exportRoutePolicy; + + /* + * Ingress Acl. ARM resource ID of Access Control Lists. + */ + @JsonProperty(value = "ingressAclId") + private String ingressAclId; + + /* + * Egress Acl. ARM resource ID of Access Control Lists. + */ + @JsonProperty(value = "egressAclId") + private String egressAclId; + + /* + * To check whether monitoring of internal network is enabled or not. + */ + @JsonProperty(value = "isMonitoringEnabled") + private IsMonitoringEnabled isMonitoringEnabled; /** Creates an instance of InternalNetworkPatchProperties class. */ public InternalNetworkPatchProperties() { } + /** + * Get the bgpConfiguration property: BGP configuration properties. + * + * @return the bgpConfiguration value. + */ + public BgpConfiguration bgpConfiguration() { + return this.bgpConfiguration; + } + + /** + * Set the bgpConfiguration property: BGP configuration properties. + * + * @param bgpConfiguration the bgpConfiguration value to set. + * @return the InternalNetworkPatchProperties object itself. + */ + public InternalNetworkPatchProperties withBgpConfiguration(BgpConfiguration bgpConfiguration) { + this.bgpConfiguration = bgpConfiguration; + return this; + } + + /** + * Get the staticRouteConfiguration property: Static Route Configuration properties. + * + * @return the staticRouteConfiguration value. + */ + public StaticRouteConfiguration staticRouteConfiguration() { + return this.staticRouteConfiguration; + } + + /** + * Set the staticRouteConfiguration property: Static Route Configuration properties. + * + * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @return the InternalNetworkPatchProperties object itself. + */ + public InternalNetworkPatchProperties withStaticRouteConfiguration( + StaticRouteConfiguration staticRouteConfiguration) { + this.staticRouteConfiguration = staticRouteConfiguration; + return this; + } + /** * Get the mtu property: Maximum transmission unit. Default value is 1500. * @@ -82,7 +156,7 @@ public InternalNetworkPatchProperties withMtu(Integer mtu) { } /** - * Get the connectedIPv4Subnets property: List with object connected IPv4 Subnets. + * Get the connectedIPv4Subnets property: List of Connected IPv4 Subnets. * * @return the connectedIPv4Subnets value. */ @@ -91,7 +165,7 @@ public List connectedIPv4Subnets() { } /** - * Set the connectedIPv4Subnets property: List with object connected IPv4 Subnets. + * Set the connectedIPv4Subnets property: List of Connected IPv4 Subnets. * * @param connectedIPv4Subnets the connectedIPv4Subnets value to set. * @return the InternalNetworkPatchProperties object itself. @@ -102,7 +176,7 @@ public InternalNetworkPatchProperties withConnectedIPv4Subnets(List connectedIPv6Subnets() { } /** - * Set the connectedIPv6Subnets property: List with object connected IPv6 Subnets. + * Set the connectedIPv6Subnets property: List of connected IPv6 Subnets. * * @param connectedIPv6Subnets the connectedIPv6Subnets value to set. * @return the InternalNetworkPatchProperties object itself. @@ -122,83 +196,146 @@ public InternalNetworkPatchProperties withConnectedIPv6Subnets(List e.validate()); } if (connectedIPv6Subnets() != null) { connectedIPv6Subnets().forEach(e -> e.validate()); } - if (staticRouteConfiguration() != null) { - staticRouteConfiguration().validate(); + if (importRoutePolicy() != null) { + importRoutePolicy().validate(); } - if (bgpConfiguration() != null) { - bgpConfiguration().validate(); + if (exportRoutePolicy() != null) { + exportRoutePolicy().validate(); } } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkProperties.java index 1e245516f9afe..538b0a410824e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternalNetworkProperties.java @@ -5,59 +5,58 @@ package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.Extension; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Internal Network Properties. */ +/** Internal Network Properties defines the properties of the resource. */ @Fluent public final class InternalNetworkProperties extends AnnotationResource { /* - * List of resources the InternalNetwork is disabled on. Can be either entire NetworkFabric or NetworkRack. - */ - @JsonProperty(value = "disabledOnResources", access = JsonProperty.Access.WRITE_ONLY) - private List disabledOnResources; - - /* - * Administrative state of the InternalNetwork. Example: Enabled | Disabled. + * Vlan identifier. Example: 1001. */ - @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) - private EnabledDisabledState administrativeState; + @JsonProperty(value = "vlanId", required = true) + private int vlanId; /* - * List of resources the BGP is disabled on. Can be either entire NetworkFabric or NetworkRack. + * BGP configuration properties. */ - @JsonProperty(value = "bgpDisabledOnResources", access = JsonProperty.Access.WRITE_ONLY) - private List bgpDisabledOnResources; + @JsonProperty(value = "bgpConfiguration") + private InternalNetworkPropertiesBgpConfiguration bgpConfiguration; /* - * List of resources the BFD for BGP is disabled on. Can be either entire NetworkFabric or NetworkRack. + * Static Route Configuration properties. */ - @JsonProperty(value = "bfdDisabledOnResources", access = JsonProperty.Access.WRITE_ONLY) - private List bfdDisabledOnResources; + @JsonProperty(value = "staticRouteConfiguration") + private InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration; /* - * List of resources the BFD of StaticRoutes is disabled on. Can be either entire NetworkFabric or NetworkRack. + * Configuration state of the resource. */ - @JsonProperty(value = "bfdForStaticRoutesDisabledOnResources", access = JsonProperty.Access.WRITE_ONLY) - private List bfdForStaticRoutesDisabledOnResources; + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; /* - * Gets the provisioning state of the resource. + * Provisioning state of the resource. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; /* - * Vlan identifier. Example: 1001. + * Administrative state of the resource. */ - @JsonProperty(value = "vlanId", required = true) - private int vlanId; + @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) + private AdministrativeState administrativeState; /* * Maximum transmission unit. Default value is 1500. @@ -66,121 +65,155 @@ public final class InternalNetworkProperties extends AnnotationResource { private Integer mtu; /* - * List with object connected IPv4 Subnets. + * List of Connected IPv4 Subnets. */ @JsonProperty(value = "connectedIPv4Subnets") private List connectedIPv4Subnets; /* - * List with object connected IPv6 Subnets. + * List of connected IPv6 Subnets. */ @JsonProperty(value = "connectedIPv6Subnets") private List connectedIPv6Subnets; /* - * Static Route Configuration properties. + * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. */ - @JsonProperty(value = "staticRouteConfiguration") - private StaticRouteConfiguration staticRouteConfiguration; + @JsonProperty(value = "importRoutePolicyId") + private String importRoutePolicyId; /* - * BGP configuration properties + * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. */ - @JsonProperty(value = "bgpConfiguration") - private BgpConfiguration bgpConfiguration; + @JsonProperty(value = "exportRoutePolicyId") + private String exportRoutePolicyId; /* - * ARM resource ID of importRoutePolicy. + * Import Route Policy either IPv4 or IPv6. */ - @JsonProperty(value = "importRoutePolicyId") - private String importRoutePolicyId; + @JsonProperty(value = "importRoutePolicy") + private ImportRoutePolicy importRoutePolicy; /* - * ARM resource ID of importRoutePolicy. + * Export Route Policy either IPv4 or IPv6. */ - @JsonProperty(value = "exportRoutePolicyId") - private String exportRoutePolicyId; + @JsonProperty(value = "exportRoutePolicy") + private ExportRoutePolicy exportRoutePolicy; + + /* + * Ingress Acl. ARM resource ID of Access Control Lists. + */ + @JsonProperty(value = "ingressAclId") + private String ingressAclId; + + /* + * Egress Acl. ARM resource ID of Access Control Lists. + */ + @JsonProperty(value = "egressAclId") + private String egressAclId; + + /* + * To check whether monitoring of internal network is enabled or not. + */ + @JsonProperty(value = "isMonitoringEnabled") + private IsMonitoringEnabled isMonitoringEnabled; + + /* + * Extension. Example: NoExtension | NPB. + */ + @JsonProperty(value = "extension") + private Extension extension; /** Creates an instance of InternalNetworkProperties class. */ public InternalNetworkProperties() { } /** - * Get the disabledOnResources property: List of resources the InternalNetwork is disabled on. Can be either entire - * NetworkFabric or NetworkRack. + * Get the vlanId property: Vlan identifier. Example: 1001. * - * @return the disabledOnResources value. + * @return the vlanId value. */ - public List disabledOnResources() { - return this.disabledOnResources; + public int vlanId() { + return this.vlanId; } /** - * Get the administrativeState property: Administrative state of the InternalNetwork. Example: Enabled | Disabled. + * Set the vlanId property: Vlan identifier. Example: 1001. * - * @return the administrativeState value. + * @param vlanId the vlanId value to set. + * @return the InternalNetworkProperties object itself. */ - public EnabledDisabledState administrativeState() { - return this.administrativeState; + public InternalNetworkProperties withVlanId(int vlanId) { + this.vlanId = vlanId; + return this; } /** - * Get the bgpDisabledOnResources property: List of resources the BGP is disabled on. Can be either entire - * NetworkFabric or NetworkRack. + * Get the bgpConfiguration property: BGP configuration properties. * - * @return the bgpDisabledOnResources value. + * @return the bgpConfiguration value. */ - public List bgpDisabledOnResources() { - return this.bgpDisabledOnResources; + public InternalNetworkPropertiesBgpConfiguration bgpConfiguration() { + return this.bgpConfiguration; } /** - * Get the bfdDisabledOnResources property: List of resources the BFD for BGP is disabled on. Can be either entire - * NetworkFabric or NetworkRack. + * Set the bgpConfiguration property: BGP configuration properties. * - * @return the bfdDisabledOnResources value. + * @param bgpConfiguration the bgpConfiguration value to set. + * @return the InternalNetworkProperties object itself. */ - public List bfdDisabledOnResources() { - return this.bfdDisabledOnResources; + public InternalNetworkProperties withBgpConfiguration(InternalNetworkPropertiesBgpConfiguration bgpConfiguration) { + this.bgpConfiguration = bgpConfiguration; + return this; } /** - * Get the bfdForStaticRoutesDisabledOnResources property: List of resources the BFD of StaticRoutes is disabled on. - * Can be either entire NetworkFabric or NetworkRack. + * Get the staticRouteConfiguration property: Static Route Configuration properties. * - * @return the bfdForStaticRoutesDisabledOnResources value. + * @return the staticRouteConfiguration value. */ - public List bfdForStaticRoutesDisabledOnResources() { - return this.bfdForStaticRoutesDisabledOnResources; + public InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration() { + return this.staticRouteConfiguration; } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Set the staticRouteConfiguration property: Static Route Configuration properties. * - * @return the provisioningState value. + * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @return the InternalNetworkProperties object itself. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public InternalNetworkProperties withStaticRouteConfiguration( + InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration) { + this.staticRouteConfiguration = staticRouteConfiguration; + return this; } /** - * Get the vlanId property: Vlan identifier. Example: 1001. + * Get the configurationState property: Configuration state of the resource. * - * @return the vlanId value. + * @return the configurationState value. */ - public int vlanId() { - return this.vlanId; + public ConfigurationState configurationState() { + return this.configurationState; } /** - * Set the vlanId property: Vlan identifier. Example: 1001. + * Get the provisioningState property: Provisioning state of the resource. * - * @param vlanId the vlanId value to set. - * @return the InternalNetworkProperties object itself. + * @return the provisioningState value. */ - public InternalNetworkProperties withVlanId(int vlanId) { - this.vlanId = vlanId; - return this; + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; } /** @@ -204,7 +237,7 @@ public InternalNetworkProperties withMtu(Integer mtu) { } /** - * Get the connectedIPv4Subnets property: List with object connected IPv4 Subnets. + * Get the connectedIPv4Subnets property: List of Connected IPv4 Subnets. * * @return the connectedIPv4Subnets value. */ @@ -213,7 +246,7 @@ public List connectedIPv4Subnets() { } /** - * Set the connectedIPv4Subnets property: List with object connected IPv4 Subnets. + * Set the connectedIPv4Subnets property: List of Connected IPv4 Subnets. * * @param connectedIPv4Subnets the connectedIPv4Subnets value to set. * @return the InternalNetworkProperties object itself. @@ -224,7 +257,7 @@ public InternalNetworkProperties withConnectedIPv4Subnets(List } /** - * Get the connectedIPv6Subnets property: List with object connected IPv6 Subnets. + * Get the connectedIPv6Subnets property: List of connected IPv6 Subnets. * * @return the connectedIPv6Subnets value. */ @@ -233,7 +266,7 @@ public List connectedIPv6Subnets() { } /** - * Set the connectedIPv6Subnets property: List with object connected IPv6 Subnets. + * Set the connectedIPv6Subnets property: List of connected IPv6 Subnets. * * @param connectedIPv6Subnets the connectedIPv6Subnets value to set. * @return the InternalNetworkProperties object itself. @@ -244,82 +277,166 @@ public InternalNetworkProperties withConnectedIPv6Subnets(List } /** - * Get the staticRouteConfiguration property: Static Route Configuration properties. + * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @return the staticRouteConfiguration value. + * @return the importRoutePolicyId value. */ - public StaticRouteConfiguration staticRouteConfiguration() { - return this.staticRouteConfiguration; + public String importRoutePolicyId() { + return this.importRoutePolicyId; } /** - * Set the staticRouteConfiguration property: Static Route Configuration properties. + * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @param importRoutePolicyId the importRoutePolicyId value to set. * @return the InternalNetworkProperties object itself. */ - public InternalNetworkProperties withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration) { - this.staticRouteConfiguration = staticRouteConfiguration; + public InternalNetworkProperties withImportRoutePolicyId(String importRoutePolicyId) { + this.importRoutePolicyId = importRoutePolicyId; return this; } /** - * Get the bgpConfiguration property: BGP configuration properties. + * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @return the bgpConfiguration value. + * @return the exportRoutePolicyId value. */ - public BgpConfiguration bgpConfiguration() { - return this.bgpConfiguration; + public String exportRoutePolicyId() { + return this.exportRoutePolicyId; } /** - * Set the bgpConfiguration property: BGP configuration properties. + * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @param bgpConfiguration the bgpConfiguration value to set. + * @param exportRoutePolicyId the exportRoutePolicyId value to set. * @return the InternalNetworkProperties object itself. */ - public InternalNetworkProperties withBgpConfiguration(BgpConfiguration bgpConfiguration) { - this.bgpConfiguration = bgpConfiguration; + public InternalNetworkProperties withExportRoutePolicyId(String exportRoutePolicyId) { + this.exportRoutePolicyId = exportRoutePolicyId; return this; } /** - * Get the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @return the importRoutePolicyId value. + * @return the importRoutePolicy value. */ - public String importRoutePolicyId() { - return this.importRoutePolicyId; + public ImportRoutePolicy importRoutePolicy() { + return this.importRoutePolicy; } /** - * Set the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @param importRoutePolicyId the importRoutePolicyId value to set. + * @param importRoutePolicy the importRoutePolicy value to set. * @return the InternalNetworkProperties object itself. */ - public InternalNetworkProperties withImportRoutePolicyId(String importRoutePolicyId) { - this.importRoutePolicyId = importRoutePolicyId; + public InternalNetworkProperties withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { + this.importRoutePolicy = importRoutePolicy; return this; } /** - * Get the exportRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @return the exportRoutePolicyId value. + * @return the exportRoutePolicy value. */ - public String exportRoutePolicyId() { - return this.exportRoutePolicyId; + public ExportRoutePolicy exportRoutePolicy() { + return this.exportRoutePolicy; } /** - * Set the exportRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. + * @param exportRoutePolicy the exportRoutePolicy value to set. * @return the InternalNetworkProperties object itself. */ - public InternalNetworkProperties withExportRoutePolicyId(String exportRoutePolicyId) { - this.exportRoutePolicyId = exportRoutePolicyId; + public InternalNetworkProperties withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; + return this; + } + + /** + * Get the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @return the ingressAclId value. + */ + public String ingressAclId() { + return this.ingressAclId; + } + + /** + * Set the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @param ingressAclId the ingressAclId value to set. + * @return the InternalNetworkProperties object itself. + */ + public InternalNetworkProperties withIngressAclId(String ingressAclId) { + this.ingressAclId = ingressAclId; + return this; + } + + /** + * Get the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @return the egressAclId value. + */ + public String egressAclId() { + return this.egressAclId; + } + + /** + * Set the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @param egressAclId the egressAclId value to set. + * @return the InternalNetworkProperties object itself. + */ + public InternalNetworkProperties withEgressAclId(String egressAclId) { + this.egressAclId = egressAclId; + return this; + } + + /** + * Get the isMonitoringEnabled property: To check whether monitoring of internal network is enabled or not. + * + * @return the isMonitoringEnabled value. + */ + public IsMonitoringEnabled isMonitoringEnabled() { + return this.isMonitoringEnabled; + } + + /** + * Set the isMonitoringEnabled property: To check whether monitoring of internal network is enabled or not. + * + * @param isMonitoringEnabled the isMonitoringEnabled value to set. + * @return the InternalNetworkProperties object itself. + */ + public InternalNetworkProperties withIsMonitoringEnabled(IsMonitoringEnabled isMonitoringEnabled) { + this.isMonitoringEnabled = isMonitoringEnabled; + return this; + } + + /** + * Get the extension property: Extension. Example: NoExtension | NPB. + * + * @return the extension value. + */ + public Extension extension() { + return this.extension; + } + + /** + * Set the extension property: Extension. Example: NoExtension | NPB. + * + * @param extension the extension value to set. + * @return the InternalNetworkProperties object itself. + */ + public InternalNetworkProperties withExtension(Extension extension) { + this.extension = extension; return this; } @@ -338,17 +455,23 @@ public InternalNetworkProperties withAnnotation(String annotation) { @Override public void validate() { super.validate(); + if (bgpConfiguration() != null) { + bgpConfiguration().validate(); + } + if (staticRouteConfiguration() != null) { + staticRouteConfiguration().validate(); + } if (connectedIPv4Subnets() != null) { connectedIPv4Subnets().forEach(e -> e.validate()); } if (connectedIPv6Subnets() != null) { connectedIPv6Subnets().forEach(e -> e.validate()); } - if (staticRouteConfiguration() != null) { - staticRouteConfiguration().validate(); + if (importRoutePolicy() != null) { + importRoutePolicy().validate(); } - if (bgpConfiguration() != null) { - bgpConfiguration().validate(); + if (exportRoutePolicy() != null) { + exportRoutePolicy().validate(); } } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayInner.java new file mode 100644 index 0000000000000..d356d55ea8131 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayInner.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The Internet Gateway resource definition. */ +@Fluent +public final class InternetGatewayInner extends Resource { + /* + * Resource properties. + */ + @JsonProperty(value = "properties", required = true) + private InternetGatewayProperties innerProperties = new InternetGatewayProperties(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of InternetGatewayInner class. */ + public InternetGatewayInner() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private InternetGatewayProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public InternetGatewayInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public InternetGatewayInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the ipv4Address property: IPv4 Address of Internet Gateway. + * + * @return the ipv4Address value. + */ + public String ipv4Address() { + return this.innerProperties() == null ? null : this.innerProperties().ipv4Address(); + } + + /** + * Get the port property: Port number of Internet Gateway. + * + * @return the port value. + */ + public Integer port() { + return this.innerProperties() == null ? null : this.innerProperties().port(); + } + + /** + * Get the type property: Gateway Type of the resource. + * + * @return the type value. + */ + public GatewayType typePropertiesType() { + return this.innerProperties() == null ? null : this.innerProperties().type(); + } + + /** + * Set the type property: Gateway Type of the resource. + * + * @param type the type value to set. + * @return the InternetGatewayInner object itself. + */ + public InternetGatewayInner withTypePropertiesType(GatewayType type) { + if (this.innerProperties() == null) { + this.innerProperties = new InternetGatewayProperties(); + } + this.innerProperties().withType(type); + return this; + } + + /** + * Get the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. + * + * @return the networkFabricControllerId value. + */ + public String networkFabricControllerId() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricControllerId(); + } + + /** + * Set the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. + * + * @param networkFabricControllerId the networkFabricControllerId value to set. + * @return the InternetGatewayInner object itself. + */ + public InternetGatewayInner withNetworkFabricControllerId(String networkFabricControllerId) { + if (this.innerProperties() == null) { + this.innerProperties = new InternetGatewayProperties(); + } + this.innerProperties().withNetworkFabricControllerId(networkFabricControllerId); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * + * @return the internetGatewayRuleId value. + */ + public String internetGatewayRuleId() { + return this.innerProperties() == null ? null : this.innerProperties().internetGatewayRuleId(); + } + + /** + * Set the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * + * @param internetGatewayRuleId the internetGatewayRuleId value to set. + * @return the InternetGatewayInner object itself. + */ + public InternetGatewayInner withInternetGatewayRuleId(String internetGatewayRuleId) { + if (this.innerProperties() == null) { + this.innerProperties = new InternetGatewayProperties(); + } + this.innerProperties().withInternetGatewayRuleId(internetGatewayRuleId); + return this; + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the InternetGatewayInner object itself. + */ + public InternetGatewayInner withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new InternetGatewayProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model InternetGatewayInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(InternetGatewayInner.class); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayPatchableProperties.java new file mode 100644 index 0000000000000..28973a3c968a1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayPatchableProperties.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Internet Gateway Patchable Properties defines the patchable properties of the resource. */ +@Fluent +public class InternetGatewayPatchableProperties { + /* + * ARM Resource ID of the Internet Gateway Rule. + */ + @JsonProperty(value = "internetGatewayRuleId") + private String internetGatewayRuleId; + + /** Creates an instance of InternetGatewayPatchableProperties class. */ + public InternetGatewayPatchableProperties() { + } + + /** + * Get the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * + * @return the internetGatewayRuleId value. + */ + public String internetGatewayRuleId() { + return this.internetGatewayRuleId; + } + + /** + * Set the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * + * @param internetGatewayRuleId the internetGatewayRuleId value to set. + * @return the InternetGatewayPatchableProperties object itself. + */ + public InternetGatewayPatchableProperties withInternetGatewayRuleId(String internetGatewayRuleId) { + this.internetGatewayRuleId = internetGatewayRuleId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayProperties.java new file mode 100644 index 0000000000000..eb7b36adce8c6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayProperties.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Internet Gateway Properties defines the properties of the resource. */ +@Fluent +public final class InternetGatewayProperties extends AnnotationResource { + /* + * IPv4 Address of Internet Gateway. + */ + @JsonProperty(value = "ipv4Address", access = JsonProperty.Access.WRITE_ONLY) + private String ipv4Address; + + /* + * Port number of Internet Gateway. + */ + @JsonProperty(value = "port", access = JsonProperty.Access.WRITE_ONLY) + private Integer port; + + /* + * Gateway Type of the resource. + */ + @JsonProperty(value = "type", required = true) + private GatewayType type; + + /* + * ARM Resource ID of the Network Fabric Controller. + */ + @JsonProperty(value = "networkFabricControllerId", required = true) + private String networkFabricControllerId; + + /* + * Provisioning state of resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * ARM Resource ID of the Internet Gateway Rule. + */ + @JsonProperty(value = "internetGatewayRuleId") + private String internetGatewayRuleId; + + /** Creates an instance of InternetGatewayProperties class. */ + public InternetGatewayProperties() { + } + + /** + * Get the ipv4Address property: IPv4 Address of Internet Gateway. + * + * @return the ipv4Address value. + */ + public String ipv4Address() { + return this.ipv4Address; + } + + /** + * Get the port property: Port number of Internet Gateway. + * + * @return the port value. + */ + public Integer port() { + return this.port; + } + + /** + * Get the type property: Gateway Type of the resource. + * + * @return the type value. + */ + public GatewayType type() { + return this.type; + } + + /** + * Set the type property: Gateway Type of the resource. + * + * @param type the type value to set. + * @return the InternetGatewayProperties object itself. + */ + public InternetGatewayProperties withType(GatewayType type) { + this.type = type; + return this; + } + + /** + * Get the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. + * + * @return the networkFabricControllerId value. + */ + public String networkFabricControllerId() { + return this.networkFabricControllerId; + } + + /** + * Set the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. + * + * @param networkFabricControllerId the networkFabricControllerId value to set. + * @return the InternetGatewayProperties object itself. + */ + public InternetGatewayProperties withNetworkFabricControllerId(String networkFabricControllerId) { + this.networkFabricControllerId = networkFabricControllerId; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * + * @return the internetGatewayRuleId value. + */ + public String internetGatewayRuleId() { + return this.internetGatewayRuleId; + } + + /** + * Set the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * + * @param internetGatewayRuleId the internetGatewayRuleId value to set. + * @return the InternetGatewayProperties object itself. + */ + public InternetGatewayProperties withInternetGatewayRuleId(String internetGatewayRuleId) { + this.internetGatewayRuleId = internetGatewayRuleId; + return this; + } + + /** {@inheritDoc} */ + @Override + public InternetGatewayProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (type() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property type in model InternetGatewayProperties")); + } + if (networkFabricControllerId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property networkFabricControllerId in model InternetGatewayProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(InternetGatewayProperties.class); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleInner.java new file mode 100644 index 0000000000000..bb61b41488f94 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleInner.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** The Internet Gateway Rule resource definition. */ +@Fluent +public final class InternetGatewayRuleInner extends Resource { + /* + * Resource properties. + */ + @JsonProperty(value = "properties", required = true) + private InternetGatewayRuleProperties innerProperties = new InternetGatewayRuleProperties(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of InternetGatewayRuleInner class. */ + public InternetGatewayRuleInner() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private InternetGatewayRuleProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public InternetGatewayRuleInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public InternetGatewayRuleInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the ruleProperties property: Rules for the InternetGateways. + * + * @return the ruleProperties value. + */ + public RuleProperties ruleProperties() { + return this.innerProperties() == null ? null : this.innerProperties().ruleProperties(); + } + + /** + * Set the ruleProperties property: Rules for the InternetGateways. + * + * @param ruleProperties the ruleProperties value to set. + * @return the InternetGatewayRuleInner object itself. + */ + public InternetGatewayRuleInner withRuleProperties(RuleProperties ruleProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new InternetGatewayRuleProperties(); + } + this.innerProperties().withRuleProperties(ruleProperties); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the internetGatewayIds property: List of Internet Gateway resource Id. + * + * @return the internetGatewayIds value. + */ + public List internetGatewayIds() { + return this.innerProperties() == null ? null : this.innerProperties().internetGatewayIds(); + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the InternetGatewayRuleInner object itself. + */ + public InternetGatewayRuleInner withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new InternetGatewayRuleProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model InternetGatewayRuleInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(InternetGatewayRuleInner.class); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleProperties.java new file mode 100644 index 0000000000000..31b2e86931a79 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/InternetGatewayRuleProperties.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Internet Gateway Rule Properties defines the resource properties. */ +@Fluent +public final class InternetGatewayRuleProperties extends AnnotationResource { + /* + * Rules for the InternetGateways + */ + @JsonProperty(value = "ruleProperties", required = true) + private RuleProperties ruleProperties; + + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * List of Internet Gateway resource Id. + */ + @JsonProperty(value = "internetGatewayIds", access = JsonProperty.Access.WRITE_ONLY) + private List internetGatewayIds; + + /** Creates an instance of InternetGatewayRuleProperties class. */ + public InternetGatewayRuleProperties() { + } + + /** + * Get the ruleProperties property: Rules for the InternetGateways. + * + * @return the ruleProperties value. + */ + public RuleProperties ruleProperties() { + return this.ruleProperties; + } + + /** + * Set the ruleProperties property: Rules for the InternetGateways. + * + * @param ruleProperties the ruleProperties value to set. + * @return the InternetGatewayRuleProperties object itself. + */ + public InternetGatewayRuleProperties withRuleProperties(RuleProperties ruleProperties) { + this.ruleProperties = ruleProperties; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the internetGatewayIds property: List of Internet Gateway resource Id. + * + * @return the internetGatewayIds value. + */ + public List internetGatewayIds() { + return this.internetGatewayIds; + } + + /** {@inheritDoc} */ + @Override + public InternetGatewayRuleProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (ruleProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property ruleProperties in model InternetGatewayRuleProperties")); + } else { + ruleProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(InternetGatewayRuleProperties.class); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityInner.java index c5fcedef86e77..dc9c23e48c11a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityInner.java @@ -7,21 +7,23 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; -/** The IpCommunity resource definition. */ +/** The IP Community resource definition. */ @Fluent public final class IpCommunityInner extends Resource { /* * Resource properties. */ - @JsonProperty(value = "properties") - private IpCommunityProperties innerProperties; + @JsonProperty(value = "properties", required = true) + private IpCommunityProperties innerProperties = new IpCommunityProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -66,83 +68,55 @@ public IpCommunityInner withTags(Map tags) { } /** - * Get the action property: Action to be taken on the configuration. Example: Permit | Deny. + * Get the configurationState property: Configuration state of the resource. * - * @return the action value. + * @return the configurationState value. */ - public CommunityActionTypes action() { - return this.innerProperties() == null ? null : this.innerProperties().action(); + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); } /** - * Set the action property: Action to be taken on the configuration. Example: Permit | Deny. + * Get the provisioningState property: Provisioning state of the resource. * - * @param action the action value to set. - * @return the IpCommunityInner object itself. + * @return the provisioningState value. */ - public IpCommunityInner withAction(CommunityActionTypes action) { - if (this.innerProperties() == null) { - this.innerProperties = new IpCommunityProperties(); - } - this.innerProperties().withAction(action); - return this; + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** - * Get the wellKnownCommunities property: Supported well known Community List. + * Get the administrativeState property: Administrative state of the resource. * - * @return the wellKnownCommunities value. + * @return the administrativeState value. */ - public List wellKnownCommunities() { - return this.innerProperties() == null ? null : this.innerProperties().wellKnownCommunities(); + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); } /** - * Set the wellKnownCommunities property: Supported well known Community List. + * Get the ipCommunityRules property: List of IP Community Rules. * - * @param wellKnownCommunities the wellKnownCommunities value to set. - * @return the IpCommunityInner object itself. + * @return the ipCommunityRules value. */ - public IpCommunityInner withWellKnownCommunities(List wellKnownCommunities) { - if (this.innerProperties() == null) { - this.innerProperties = new IpCommunityProperties(); - } - this.innerProperties().withWellKnownCommunities(wellKnownCommunities); - return this; + public List ipCommunityRules() { + return this.innerProperties() == null ? null : this.innerProperties().ipCommunityRules(); } /** - * Get the communityMembers property: List the communityMembers of IP Community . + * Set the ipCommunityRules property: List of IP Community Rules. * - * @return the communityMembers value. - */ - public List communityMembers() { - return this.innerProperties() == null ? null : this.innerProperties().communityMembers(); - } - - /** - * Set the communityMembers property: List the communityMembers of IP Community . - * - * @param communityMembers the communityMembers value to set. + * @param ipCommunityRules the ipCommunityRules value to set. * @return the IpCommunityInner object itself. */ - public IpCommunityInner withCommunityMembers(List communityMembers) { + public IpCommunityInner withIpCommunityRules(List ipCommunityRules) { if (this.innerProperties() == null) { this.innerProperties = new IpCommunityProperties(); } - this.innerProperties().withCommunityMembers(communityMembers); + this.innerProperties().withIpCommunityRules(ipCommunityRules); return this; } - /** - * Get the provisioningState property: Gets the provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - /** * Get the annotation property: Switch configuration description. * @@ -172,8 +146,15 @@ public IpCommunityInner withAnnotation(String annotation) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model IpCommunityInner")); + } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(IpCommunityInner.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityPatchableProperties.java new file mode 100644 index 0000000000000..c9bc1e268a7e5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityPatchableProperties.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** IP Community patchable properties. */ +@Fluent +public class IpCommunityPatchableProperties { + /* + * List of IP Community Rules. + */ + @JsonProperty(value = "ipCommunityRules") + private List ipCommunityRules; + + /** Creates an instance of IpCommunityPatchableProperties class. */ + public IpCommunityPatchableProperties() { + } + + /** + * Get the ipCommunityRules property: List of IP Community Rules. + * + * @return the ipCommunityRules value. + */ + public List ipCommunityRules() { + return this.ipCommunityRules; + } + + /** + * Set the ipCommunityRules property: List of IP Community Rules. + * + * @param ipCommunityRules the ipCommunityRules value to set. + * @return the IpCommunityPatchableProperties object itself. + */ + public IpCommunityPatchableProperties withIpCommunityRules(List ipCommunityRules) { + this.ipCommunityRules = ipCommunityRules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ipCommunityRules() != null) { + ipCommunityRules().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityProperties.java index 83a00d4972a15..ef58708335642 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpCommunityProperties.java @@ -5,114 +5,92 @@ package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** IpCommunityProperties define the resource properties. */ +/** IP Community Properties defines the resource properties. */ @Fluent public final class IpCommunityProperties extends AnnotationResource { /* - * Action to be taken on the configuration. Example: Permit | Deny. + * Configuration state of the resource. */ - @JsonProperty(value = "action", required = true) - private CommunityActionTypes action; + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; /* - * Supported well known Community List. + * Provisioning state of the resource. */ - @JsonProperty(value = "wellKnownCommunities") - private List wellKnownCommunities; + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; /* - * List the communityMembers of IP Community . + * Administrative state of the resource. */ - @JsonProperty(value = "communityMembers", required = true) - private List communityMembers; + @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) + private AdministrativeState administrativeState; /* - * Gets the provisioning state of the resource. + * List of IP Community Rules. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; + @JsonProperty(value = "ipCommunityRules") + private List ipCommunityRules; /** Creates an instance of IpCommunityProperties class. */ public IpCommunityProperties() { } /** - * Get the action property: Action to be taken on the configuration. Example: Permit | Deny. + * Get the configurationState property: Configuration state of the resource. * - * @return the action value. + * @return the configurationState value. */ - public CommunityActionTypes action() { - return this.action; + public ConfigurationState configurationState() { + return this.configurationState; } /** - * Set the action property: Action to be taken on the configuration. Example: Permit | Deny. + * Get the provisioningState property: Provisioning state of the resource. * - * @param action the action value to set. - * @return the IpCommunityProperties object itself. - */ - public IpCommunityProperties withAction(CommunityActionTypes action) { - this.action = action; - return this; - } - - /** - * Get the wellKnownCommunities property: Supported well known Community List. - * - * @return the wellKnownCommunities value. + * @return the provisioningState value. */ - public List wellKnownCommunities() { - return this.wellKnownCommunities; + public ProvisioningState provisioningState() { + return this.provisioningState; } /** - * Set the wellKnownCommunities property: Supported well known Community List. + * Get the administrativeState property: Administrative state of the resource. * - * @param wellKnownCommunities the wellKnownCommunities value to set. - * @return the IpCommunityProperties object itself. + * @return the administrativeState value. */ - public IpCommunityProperties withWellKnownCommunities(List wellKnownCommunities) { - this.wellKnownCommunities = wellKnownCommunities; - return this; + public AdministrativeState administrativeState() { + return this.administrativeState; } /** - * Get the communityMembers property: List the communityMembers of IP Community . + * Get the ipCommunityRules property: List of IP Community Rules. * - * @return the communityMembers value. + * @return the ipCommunityRules value. */ - public List communityMembers() { - return this.communityMembers; + public List ipCommunityRules() { + return this.ipCommunityRules; } /** - * Set the communityMembers property: List the communityMembers of IP Community . + * Set the ipCommunityRules property: List of IP Community Rules. * - * @param communityMembers the communityMembers value to set. + * @param ipCommunityRules the ipCommunityRules value to set. * @return the IpCommunityProperties object itself. */ - public IpCommunityProperties withCommunityMembers(List communityMembers) { - this.communityMembers = communityMembers; + public IpCommunityProperties withIpCommunityRules(List ipCommunityRules) { + this.ipCommunityRules = ipCommunityRules; return this; } - /** - * Get the provisioningState property: Gets the provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - /** {@inheritDoc} */ @Override public IpCommunityProperties withAnnotation(String annotation) { @@ -128,18 +106,8 @@ public IpCommunityProperties withAnnotation(String annotation) { @Override public void validate() { super.validate(); - if (action() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property action in model IpCommunityProperties")); - } - if (communityMembers() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property communityMembers in model IpCommunityProperties")); + if (ipCommunityRules() != null) { + ipCommunityRules().forEach(e -> e.validate()); } } - - private static final ClientLogger LOGGER = new ClientLogger(IpCommunityProperties.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityInner.java index 20949e62a1d5c..824627e953cd4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityInner.java @@ -7,20 +7,23 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; -/** The IpExtendedCommunity resource definition. */ +/** The IP Extended Community resource definition. */ @Fluent public final class IpExtendedCommunityInner extends Resource { /* * Resource properties. */ - @JsonProperty(value = "properties") - private IpExtendedCommunityProperties innerProperties; + @JsonProperty(value = "properties", required = true) + private IpExtendedCommunityProperties innerProperties = new IpExtendedCommunityProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -65,62 +68,54 @@ public IpExtendedCommunityInner withTags(Map tags) { } /** - * Get the action property: Action to be taken on the configuration. Example: Permit | Deny. + * Get the configurationState property: Configuration state of the resource. * - * @return the action value. + * @return the configurationState value. */ - public CommunityActionTypes action() { - return this.innerProperties() == null ? null : this.innerProperties().action(); + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); } /** - * Set the action property: Action to be taken on the configuration. Example: Permit | Deny. + * Get the provisioningState property: Provisioning state of the resource. * - * @param action the action value to set. - * @return the IpExtendedCommunityInner object itself. + * @return the provisioningState value. */ - public IpExtendedCommunityInner withAction(CommunityActionTypes action) { - if (this.innerProperties() == null) { - this.innerProperties = new IpExtendedCommunityProperties(); - } - this.innerProperties().withAction(action); - return this; + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** - * Get the routeTargets property: 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. + * Get the administrativeState property: Administrative state of the resource. * - * @return the routeTargets value. + * @return the administrativeState value. */ - public List routeTargets() { - return this.innerProperties() == null ? null : this.innerProperties().routeTargets(); + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); } /** - * Set the routeTargets property: 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. + * Get the ipExtendedCommunityRules property: List of IP Extended Community Rules. * - * @param routeTargets the routeTargets value to set. - * @return the IpExtendedCommunityInner object itself. + * @return the ipExtendedCommunityRules value. */ - public IpExtendedCommunityInner withRouteTargets(List routeTargets) { - if (this.innerProperties() == null) { - this.innerProperties = new IpExtendedCommunityProperties(); - } - this.innerProperties().withRouteTargets(routeTargets); - return this; + public List ipExtendedCommunityRules() { + return this.innerProperties() == null ? null : this.innerProperties().ipExtendedCommunityRules(); } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Set the ipExtendedCommunityRules property: List of IP Extended Community Rules. * - * @return the provisioningState value. + * @param ipExtendedCommunityRules the ipExtendedCommunityRules value to set. + * @return the IpExtendedCommunityInner object itself. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public IpExtendedCommunityInner withIpExtendedCommunityRules( + List ipExtendedCommunityRules) { + if (this.innerProperties() == null) { + this.innerProperties = new IpExtendedCommunityProperties(); + } + this.innerProperties().withIpExtendedCommunityRules(ipExtendedCommunityRules); + return this; } /** @@ -152,8 +147,15 @@ public IpExtendedCommunityInner withAnnotation(String annotation) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model IpExtendedCommunityInner")); + } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(IpExtendedCommunityInner.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityPatchProperties.java new file mode 100644 index 0000000000000..b0ce8d903da42 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityPatchProperties.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** IP Extended Community patchable properties. */ +@Fluent +public final class IpExtendedCommunityPatchProperties extends IpExtendedCommunityPatchableProperties { + /* + * Switch configuration description. + */ + @JsonProperty(value = "annotation") + private String annotation; + + /** Creates an instance of IpExtendedCommunityPatchProperties class. */ + public IpExtendedCommunityPatchProperties() { + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.annotation; + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the IpExtendedCommunityPatchProperties object itself. + */ + public IpExtendedCommunityPatchProperties withAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + /** {@inheritDoc} */ + @Override + public IpExtendedCommunityPatchProperties withIpExtendedCommunityRules( + List ipExtendedCommunityRules) { + super.withIpExtendedCommunityRules(ipExtendedCommunityRules); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityProperties.java index 04aca5b164ac3..6b8f2ccbee2f8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpExtendedCommunityProperties.java @@ -6,90 +6,91 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** IpExtendedCommunityProperties define the resource properties. */ +/** IP Extended Community Properties defines the resource properties. */ @Fluent public final class IpExtendedCommunityProperties extends AnnotationResource { /* - * Action to be taken on the configuration. Example: Permit | Deny. + * Configuration state of the resource. */ - @JsonProperty(value = "action", required = true) - private CommunityActionTypes action; + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; /* - * 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. + * Provisioning state of the resource. */ - @JsonProperty(value = "routeTargets", required = true) - private List routeTargets; + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; /* - * Gets the provisioning state of the resource. + * Administrative state of the resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; + @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) + private AdministrativeState administrativeState; + + /* + * List of IP Extended Community Rules. + */ + @JsonProperty(value = "ipExtendedCommunityRules", required = true) + private List ipExtendedCommunityRules; /** Creates an instance of IpExtendedCommunityProperties class. */ public IpExtendedCommunityProperties() { } /** - * Get the action property: Action to be taken on the configuration. Example: Permit | Deny. + * Get the configurationState property: Configuration state of the resource. * - * @return the action value. + * @return the configurationState value. */ - public CommunityActionTypes action() { - return this.action; + public ConfigurationState configurationState() { + return this.configurationState; } /** - * Set the action property: Action to be taken on the configuration. Example: Permit | Deny. + * Get the provisioningState property: Provisioning state of the resource. * - * @param action the action value to set. - * @return the IpExtendedCommunityProperties object itself. + * @return the provisioningState value. */ - public IpExtendedCommunityProperties withAction(CommunityActionTypes action) { - this.action = action; - return this; + public ProvisioningState provisioningState() { + return this.provisioningState; } /** - * Get the routeTargets property: 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. + * Get the administrativeState property: Administrative state of the resource. * - * @return the routeTargets value. + * @return the administrativeState value. */ - public List routeTargets() { - return this.routeTargets; + public AdministrativeState administrativeState() { + return this.administrativeState; } /** - * Set the routeTargets property: 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. + * Get the ipExtendedCommunityRules property: List of IP Extended Community Rules. * - * @param routeTargets the routeTargets value to set. - * @return the IpExtendedCommunityProperties object itself. + * @return the ipExtendedCommunityRules value. */ - public IpExtendedCommunityProperties withRouteTargets(List routeTargets) { - this.routeTargets = routeTargets; - return this; + public List ipExtendedCommunityRules() { + return this.ipExtendedCommunityRules; } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Set the ipExtendedCommunityRules property: List of IP Extended Community Rules. * - * @return the provisioningState value. + * @param ipExtendedCommunityRules the ipExtendedCommunityRules value to set. + * @return the IpExtendedCommunityProperties object itself. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public IpExtendedCommunityProperties withIpExtendedCommunityRules( + List ipExtendedCommunityRules) { + this.ipExtendedCommunityRules = ipExtendedCommunityRules; + return this; } /** {@inheritDoc} */ @@ -107,17 +108,13 @@ public IpExtendedCommunityProperties withAnnotation(String annotation) { @Override public void validate() { super.validate(); - if (action() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property action in model IpExtendedCommunityProperties")); - } - if (routeTargets() == null) { + if (ipExtendedCommunityRules() == null) { throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property routeTargets in model IpExtendedCommunityProperties")); + "Missing required property ipExtendedCommunityRules in model IpExtendedCommunityProperties")); + } else { + ipExtendedCommunityRules().forEach(e -> e.validate()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixInner.java index 6ea115ecf52ba..8309df4eb16aa 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixInner.java @@ -8,13 +8,15 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPropertiesIpPrefixRulesItem; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; -/** The IPPrefix resource definition. */ +/** The IP Prefix resource definition. */ @Fluent public final class IpPrefixInner extends Resource { /* @@ -66,21 +68,48 @@ public IpPrefixInner withTags(Map tags) { } /** - * Get the ipPrefixRules property: IpPrefix contains the list of IP PrefixRules objects. + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } + + /** + * Get the ipPrefixRules property: The list of IP Prefix Rules. * * @return the ipPrefixRules value. */ - public List ipPrefixRules() { + public List ipPrefixRules() { return this.innerProperties() == null ? null : this.innerProperties().ipPrefixRules(); } /** - * Set the ipPrefixRules property: IpPrefix contains the list of IP PrefixRules objects. + * Set the ipPrefixRules property: The list of IP Prefix Rules. * * @param ipPrefixRules the ipPrefixRules value to set. * @return the IpPrefixInner object itself. */ - public IpPrefixInner withIpPrefixRules(List ipPrefixRules) { + public IpPrefixInner withIpPrefixRules(List ipPrefixRules) { if (this.innerProperties() == null) { this.innerProperties = new IpPrefixProperties(); } @@ -88,15 +117,6 @@ public IpPrefixInner withIpPrefixRules(List return this; } - /** - * Get the provisioningState property: Gets the provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - /** * Get the annotation property: Switch configuration description. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixPatchProperties.java new file mode 100644 index 0000000000000..751b11c03e8f0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixPatchProperties.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** IP Prefix patchable properties. */ +@Fluent +public final class IpPrefixPatchProperties extends AnnotationResource { + /* + * The list of IP Prefix Rules. + */ + @JsonProperty(value = "ipPrefixRules") + private List ipPrefixRules; + + /** Creates an instance of IpPrefixPatchProperties class. */ + public IpPrefixPatchProperties() { + } + + /** + * Get the ipPrefixRules property: The list of IP Prefix Rules. + * + * @return the ipPrefixRules value. + */ + public List ipPrefixRules() { + return this.ipPrefixRules; + } + + /** + * Set the ipPrefixRules property: The list of IP Prefix Rules. + * + * @param ipPrefixRules the ipPrefixRules value to set. + * @return the IpPrefixPatchProperties object itself. + */ + public IpPrefixPatchProperties withIpPrefixRules(List ipPrefixRules) { + this.ipPrefixRules = ipPrefixRules; + return this; + } + + /** {@inheritDoc} */ + @Override + public IpPrefixPatchProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (ipPrefixRules() != null) { + ipPrefixRules().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixProperties.java index ba92a0d1a7622..71ef950dc4575 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/IpPrefixProperties.java @@ -5,61 +5,92 @@ package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPropertiesIpPrefixRulesItem; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** IpPrefixProperties define the resource properties. */ +/** IP Prefix Properties defines the properties of the resource. */ @Fluent public final class IpPrefixProperties extends AnnotationResource { /* - * IpPrefix contains the list of IP PrefixRules objects. + * Configuration state of the resource. */ - @JsonProperty(value = "ipPrefixRules", required = true) - private List ipPrefixRules; + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; /* - * Gets the provisioning state of the resource. + * Provisioning state of the resource. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; + /* + * Administrative state of the resource. + */ + @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) + private AdministrativeState administrativeState; + + /* + * The list of IP Prefix Rules. + */ + @JsonProperty(value = "ipPrefixRules") + private List ipPrefixRules; + /** Creates an instance of IpPrefixProperties class. */ public IpPrefixProperties() { } /** - * Get the ipPrefixRules property: IpPrefix contains the list of IP PrefixRules objects. + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Get the ipPrefixRules property: The list of IP Prefix Rules. * * @return the ipPrefixRules value. */ - public List ipPrefixRules() { + public List ipPrefixRules() { return this.ipPrefixRules; } /** - * Set the ipPrefixRules property: IpPrefix contains the list of IP PrefixRules objects. + * Set the ipPrefixRules property: The list of IP Prefix Rules. * * @param ipPrefixRules the ipPrefixRules value to set. * @return the IpPrefixProperties object itself. */ - public IpPrefixProperties withIpPrefixRules(List ipPrefixRules) { + public IpPrefixProperties withIpPrefixRules(List ipPrefixRules) { this.ipPrefixRules = ipPrefixRules; return this; } - /** - * Get the provisioningState property: Gets the provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - /** {@inheritDoc} */ @Override public IpPrefixProperties withAnnotation(String annotation) { @@ -75,15 +106,8 @@ public IpPrefixProperties withAnnotation(String annotation) { @Override public void validate() { super.validate(); - if (ipPrefixRules() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property ipPrefixRules in model IpPrefixProperties")); - } else { + if (ipPrefixRules() != null) { ipPrefixRules().forEach(e -> e.validate()); } } - - private static final ClientLogger LOGGER = new ClientLogger(IpPrefixProperties.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainInner.java index f971807ec1e0c..5ba0ac10f98fc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainInner.java @@ -7,20 +7,21 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; import java.util.Map; -/** The L2IsolationDomain resource definition. */ +/** The L2 Isolation Domain resource definition. */ @Fluent public final class L2IsolationDomainInner extends Resource { /* * Resource properties. */ - @JsonProperty(value = "properties") - private L2IsolationDomainProperties innerProperties; + @JsonProperty(value = "properties", required = true) + private L2IsolationDomainProperties innerProperties = new L2IsolationDomainProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -65,7 +66,7 @@ public L2IsolationDomainInner withTags(Map tags) { } /** - * Get the networkFabricId property: Network Fabric ARM resource id. + * Get the networkFabricId property: ARM Resource ID of the Network Fabric. * * @return the networkFabricId value. */ @@ -74,7 +75,7 @@ public String networkFabricId() { } /** - * Set the networkFabricId property: Network Fabric ARM resource id. + * Set the networkFabricId property: ARM Resource ID of the Network Fabric. * * @param networkFabricId the networkFabricId value to set. * @return the L2IsolationDomainInner object itself. @@ -88,21 +89,21 @@ public L2IsolationDomainInner withNetworkFabricId(String networkFabricId) { } /** - * Get the vlanId property: vlanId. Example: 501. + * Get the vlanId property: Vlan Identifier of the Network Fabric. Example: 501. * * @return the vlanId value. */ - public Integer vlanId() { - return this.innerProperties() == null ? null : this.innerProperties().vlanId(); + public int vlanId() { + return this.innerProperties() == null ? 0 : this.innerProperties().vlanId(); } /** - * Set the vlanId property: vlanId. Example: 501. + * Set the vlanId property: Vlan Identifier of the Network Fabric. Example: 501. * * @param vlanId the vlanId value to set. * @return the L2IsolationDomainInner object itself. */ - public L2IsolationDomainInner withVlanId(Integer vlanId) { + public L2IsolationDomainInner withVlanId(int vlanId) { if (this.innerProperties() == null) { this.innerProperties = new L2IsolationDomainProperties(); } @@ -111,7 +112,7 @@ public L2IsolationDomainInner withVlanId(Integer vlanId) { } /** - * Get the mtu property: maximum transmission unit. Default value is 1500. + * Get the mtu property: Maximum transmission unit. Default value is 1500. * * @return the mtu value. */ @@ -120,7 +121,7 @@ public Integer mtu() { } /** - * Set the mtu property: maximum transmission unit. Default value is 1500. + * Set the mtu property: Maximum transmission unit. Default value is 1500. * * @param mtu the mtu value to set. * @return the L2IsolationDomainInner object itself. @@ -134,33 +135,30 @@ public L2IsolationDomainInner withMtu(Integer mtu) { } /** - * Get the disabledOnResources property: List of resources the L2 Isolation Domain is disabled on. Can be either - * entire NetworkFabric or NetworkRack. + * Get the configurationState property: Configuration state of the resource. * - * @return the disabledOnResources value. + * @return the configurationState value. */ - public List disabledOnResources() { - return this.innerProperties() == null ? null : this.innerProperties().disabledOnResources(); + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); } /** - * Get the administrativeState property: 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. + * Get the provisioningState property: Provisioning state of the resource. * - * @return the administrativeState value. + * @return the provisioningState value. */ - public EnabledDisabledState administrativeState() { - return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the administrativeState property: Administrative state of the resource. * - * @return the provisioningState value. + * @return the administrativeState value. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); } /** @@ -192,8 +190,15 @@ public L2IsolationDomainInner withAnnotation(String annotation) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model L2IsolationDomainInner")); + } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(L2IsolationDomainInner.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainPatchProperties.java index 420d1daab2646..88296dfb45378 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainPatchProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainPatchProperties.java @@ -8,11 +8,11 @@ import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; import com.fasterxml.jackson.annotation.JsonProperty; -/** L2IsolationDomainPatchProperties define the patchable resource properties. */ +/** L2 Isolation Domain Patch Properties defines the patchable properties of the resource. */ @Fluent public final class L2IsolationDomainPatchProperties extends AnnotationResource { /* - * maximum transmission unit. Default value is 1500. + * Maximum transmission unit. Default value is 1500. */ @JsonProperty(value = "mtu") private Integer mtu; @@ -22,7 +22,7 @@ public L2IsolationDomainPatchProperties() { } /** - * Get the mtu property: maximum transmission unit. Default value is 1500. + * Get the mtu property: Maximum transmission unit. Default value is 1500. * * @return the mtu value. */ @@ -31,7 +31,7 @@ public Integer mtu() { } /** - * Set the mtu property: maximum transmission unit. Default value is 1500. + * Set the mtu property: Maximum transmission unit. Default value is 1500. * * @param mtu the mtu value to set. * @return the L2IsolationDomainPatchProperties object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainProperties.java index 02f0e2089c731..11e7850faecbd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L2IsolationDomainProperties.java @@ -6,59 +6,57 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -/** L2IsolationDomainProperties define the resource properties. */ +/** L2Isolation Domain Properties defines the properties of the resource. */ @Fluent public final class L2IsolationDomainProperties extends AnnotationResource { /* - * Network Fabric ARM resource id. + * ARM Resource ID of the Network Fabric. */ @JsonProperty(value = "networkFabricId", required = true) private String networkFabricId; /* - * vlanId. Example: 501. + * Vlan Identifier of the Network Fabric. Example: 501. */ @JsonProperty(value = "vlanId", required = true) private int vlanId; /* - * maximum transmission unit. Default value is 1500. + * Maximum transmission unit. Default value is 1500. */ @JsonProperty(value = "mtu") private Integer mtu; /* - * List of resources the L2 Isolation Domain is disabled on. Can be either entire NetworkFabric or NetworkRack. + * Configuration state of the resource. */ - @JsonProperty(value = "disabledOnResources", access = JsonProperty.Access.WRITE_ONLY) - private List disabledOnResources; + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; /* - * 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 + * Provisioning state of the resource. */ - @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) - private EnabledDisabledState administrativeState; + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; /* - * Gets the provisioning state of the resource. + * Administrative state of the resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; + @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) + private AdministrativeState administrativeState; /** Creates an instance of L2IsolationDomainProperties class. */ public L2IsolationDomainProperties() { } /** - * Get the networkFabricId property: Network Fabric ARM resource id. + * Get the networkFabricId property: ARM Resource ID of the Network Fabric. * * @return the networkFabricId value. */ @@ -67,7 +65,7 @@ public String networkFabricId() { } /** - * Set the networkFabricId property: Network Fabric ARM resource id. + * Set the networkFabricId property: ARM Resource ID of the Network Fabric. * * @param networkFabricId the networkFabricId value to set. * @return the L2IsolationDomainProperties object itself. @@ -78,7 +76,7 @@ public L2IsolationDomainProperties withNetworkFabricId(String networkFabricId) { } /** - * Get the vlanId property: vlanId. Example: 501. + * Get the vlanId property: Vlan Identifier of the Network Fabric. Example: 501. * * @return the vlanId value. */ @@ -87,7 +85,7 @@ public int vlanId() { } /** - * Set the vlanId property: vlanId. Example: 501. + * Set the vlanId property: Vlan Identifier of the Network Fabric. Example: 501. * * @param vlanId the vlanId value to set. * @return the L2IsolationDomainProperties object itself. @@ -98,7 +96,7 @@ public L2IsolationDomainProperties withVlanId(int vlanId) { } /** - * Get the mtu property: maximum transmission unit. Default value is 1500. + * Get the mtu property: Maximum transmission unit. Default value is 1500. * * @return the mtu value. */ @@ -107,7 +105,7 @@ public Integer mtu() { } /** - * Set the mtu property: maximum transmission unit. Default value is 1500. + * Set the mtu property: Maximum transmission unit. Default value is 1500. * * @param mtu the mtu value to set. * @return the L2IsolationDomainProperties object itself. @@ -118,33 +116,30 @@ public L2IsolationDomainProperties withMtu(Integer mtu) { } /** - * Get the disabledOnResources property: List of resources the L2 Isolation Domain is disabled on. Can be either - * entire NetworkFabric or NetworkRack. + * Get the configurationState property: Configuration state of the resource. * - * @return the disabledOnResources value. + * @return the configurationState value. */ - public List disabledOnResources() { - return this.disabledOnResources; + public ConfigurationState configurationState() { + return this.configurationState; } /** - * Get the administrativeState property: 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. + * Get the provisioningState property: Provisioning state of the resource. * - * @return the administrativeState value. + * @return the provisioningState value. */ - public EnabledDisabledState administrativeState() { - return this.administrativeState; + public ProvisioningState provisioningState() { + return this.provisioningState; } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the administrativeState property: Administrative state of the resource. * - * @return the provisioningState value. + * @return the administrativeState value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public AdministrativeState administrativeState() { + return this.administrativeState; } /** {@inheritDoc} */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainInner.java index 06497d23c98ab..de64a1dd524f7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainInner.java @@ -7,24 +7,25 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; import java.util.Map; -/** The L3IsolationDomain resource definition. */ +/** The L3 Isolation Domain resource definition. */ @Fluent public final class L3IsolationDomainInner extends Resource { /* * Resource properties. */ - @JsonProperty(value = "properties") - private L3IsolationDomainProperties innerProperties; + @JsonProperty(value = "properties", required = true) + private L3IsolationDomainProperties innerProperties = new L3IsolationDomainProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -69,7 +70,7 @@ public L3IsolationDomainInner withTags(Map tags) { } /** - * Get the networkFabricId property: Network Fabric ARM resource id. + * Get the networkFabricId property: ARM Resource ID of the Network Fabric. * * @return the networkFabricId value. */ @@ -78,7 +79,7 @@ public String networkFabricId() { } /** - * Set the networkFabricId property: Network Fabric ARM resource id. + * Set the networkFabricId property: ARM Resource ID of the Network Fabric. * * @param networkFabricId the networkFabricId value to set. * @return the L3IsolationDomainInner object itself. @@ -92,41 +93,30 @@ public L3IsolationDomainInner withNetworkFabricId(String networkFabricId) { } /** - * Get the disabledOnResources property: List of resources the L3 Isolation Domain is disabled on. Can be either - * entire NetworkFabric or NetworkRack. + * Get the configurationState property: Configuration state of the resource. * - * @return the disabledOnResources value. + * @return the configurationState value. */ - public List disabledOnResources() { - return this.innerProperties() == null ? null : this.innerProperties().disabledOnResources(); + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); } /** - * Get the administrativeState property: Administrative state of the IsolationDomain. Example: Enabled | Disabled. + * Get the provisioningState property: Provisioning state of the resource. * - * @return the administrativeState value. - */ - public EnabledDisabledState administrativeState() { - return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); - } - - /** - * Get the optionBDisabledOnResources property: List of resources the OptionB is disabled on. Can be either entire - * NetworkFabric or NetworkRack. - * - * @return the optionBDisabledOnResources value. + * @return the provisioningState value. */ - public List optionBDisabledOnResources() { - return this.innerProperties() == null ? null : this.innerProperties().optionBDisabledOnResources(); + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the administrativeState property: Administrative state of the resource. * - * @return the provisioningState value. + * @return the administrativeState value. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); } /** @@ -177,7 +167,7 @@ public L3IsolationDomainInner withRedistributeStaticRoutes(RedistributeStaticRou } /** - * Get the aggregateRouteConfiguration property: List of Ipv4 and Ipv6 route configurations. + * Get the aggregateRouteConfiguration property: Aggregate route configurations. * * @return the aggregateRouteConfiguration value. */ @@ -186,7 +176,7 @@ public AggregateRouteConfiguration aggregateRouteConfiguration() { } /** - * Set the aggregateRouteConfiguration property: List of Ipv4 and Ipv6 route configurations. + * Set the aggregateRouteConfiguration property: Aggregate route configurations. * * @param aggregateRouteConfiguration the aggregateRouteConfiguration value to set. * @return the L3IsolationDomainInner object itself. @@ -200,35 +190,12 @@ public L3IsolationDomainInner withAggregateRouteConfiguration( return this; } - /** - * Get the description property: L3 Isolation Domain description. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: L3 Isolation Domain description. - * - * @param description the description value to set. - * @return the L3IsolationDomainInner object itself. - */ - public L3IsolationDomainInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new L3IsolationDomainProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - /** * Get the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. * * @return the connectedSubnetRoutePolicy value. */ - public L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { + public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { return this.innerProperties() == null ? null : this.innerProperties().connectedSubnetRoutePolicy(); } @@ -239,7 +206,7 @@ public L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubne * @return the L3IsolationDomainInner object itself. */ public L3IsolationDomainInner withConnectedSubnetRoutePolicy( - L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { + ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { if (this.innerProperties() == null) { this.innerProperties = new L3IsolationDomainProperties(); } @@ -276,8 +243,15 @@ public L3IsolationDomainInner withAnnotation(String annotation) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model L3IsolationDomainInner")); + } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(L3IsolationDomainInner.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainPatchProperties.java index cba26e4e98f46..33cfd894304bc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainPatchProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainPatchProperties.java @@ -6,14 +6,15 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; import com.fasterxml.jackson.annotation.JsonProperty; -/** L3IsolationDomainPatchProperties define the patch resource properties. */ +/** Resource properties. */ @Fluent -public class L3IsolationDomainPatchProperties { +public final class L3IsolationDomainPatchProperties extends AnnotationResource { /* * Advertise Connected Subnets. Ex: "True" | "False". */ @@ -27,22 +28,16 @@ public class L3IsolationDomainPatchProperties { private RedistributeStaticRoutes redistributeStaticRoutes; /* - * List of Ipv4 and Ipv6 route configurations. + * Aggregate route configurations. */ @JsonProperty(value = "aggregateRouteConfiguration") private AggregateRouteConfiguration aggregateRouteConfiguration; - /* - * L3 Isolation Domain description. - */ - @JsonProperty(value = "description") - private String description; - /* * Connected Subnet RoutePolicy */ @JsonProperty(value = "connectedSubnetRoutePolicy") - private L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy; + private ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy; /** Creates an instance of L3IsolationDomainPatchProperties class. */ public L3IsolationDomainPatchProperties() { @@ -91,7 +86,7 @@ public L3IsolationDomainPatchProperties withRedistributeStaticRoutes( } /** - * Get the aggregateRouteConfiguration property: List of Ipv4 and Ipv6 route configurations. + * Get the aggregateRouteConfiguration property: Aggregate route configurations. * * @return the aggregateRouteConfiguration value. */ @@ -100,7 +95,7 @@ public AggregateRouteConfiguration aggregateRouteConfiguration() { } /** - * Set the aggregateRouteConfiguration property: List of Ipv4 and Ipv6 route configurations. + * Set the aggregateRouteConfiguration property: Aggregate route configurations. * * @param aggregateRouteConfiguration the aggregateRouteConfiguration value to set. * @return the L3IsolationDomainPatchProperties object itself. @@ -111,32 +106,12 @@ public L3IsolationDomainPatchProperties withAggregateRouteConfiguration( return this; } - /** - * Get the description property: L3 Isolation Domain description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: L3 Isolation Domain description. - * - * @param description the description value to set. - * @return the L3IsolationDomainPatchProperties object itself. - */ - public L3IsolationDomainPatchProperties withDescription(String description) { - this.description = description; - return this; - } - /** * Get the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. * * @return the connectedSubnetRoutePolicy value. */ - public L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { + public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { return this.connectedSubnetRoutePolicy; } @@ -147,17 +122,26 @@ public L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubne * @return the L3IsolationDomainPatchProperties object itself. */ public L3IsolationDomainPatchProperties withConnectedSubnetRoutePolicy( - L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { + ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { this.connectedSubnetRoutePolicy = connectedSubnetRoutePolicy; return this; } + /** {@inheritDoc} */ + @Override + public L3IsolationDomainPatchProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { + super.validate(); if (aggregateRouteConfiguration() != null) { aggregateRouteConfiguration().validate(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainProperties.java index d4afcfd120759..05583bc0e23e4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/L3IsolationDomainProperties.java @@ -6,48 +6,42 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -/** L3IsolationDomainProperties define the resource properties. */ +/** L3 Isolation Domain Properties defines the properties of the resource. */ @Fluent public final class L3IsolationDomainProperties extends AnnotationResource { /* - * Network Fabric ARM resource id. + * ARM Resource ID of the Network Fabric. */ @JsonProperty(value = "networkFabricId", required = true) private String networkFabricId; /* - * List of resources the L3 Isolation Domain is disabled on. Can be either entire NetworkFabric or NetworkRack. + * Configuration state of the resource. */ - @JsonProperty(value = "disabledOnResources", access = JsonProperty.Access.WRITE_ONLY) - private List disabledOnResources; + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; /* - * Administrative state of the IsolationDomain. Example: Enabled | Disabled. + * Provisioning state of the resource. */ - @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) - private EnabledDisabledState administrativeState; - - /* - * List of resources the OptionB is disabled on. Can be either entire NetworkFabric or NetworkRack. - */ - @JsonProperty(value = "optionBDisabledOnResources", access = JsonProperty.Access.WRITE_ONLY) - private List optionBDisabledOnResources; + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; /* - * Gets the provisioning state of the resource. + * Administrative state of the resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; + @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) + private AdministrativeState administrativeState; /* * Advertise Connected Subnets. Ex: "True" | "False". @@ -62,29 +56,23 @@ public final class L3IsolationDomainProperties extends AnnotationResource { private RedistributeStaticRoutes redistributeStaticRoutes; /* - * List of Ipv4 and Ipv6 route configurations. + * Aggregate route configurations. */ @JsonProperty(value = "aggregateRouteConfiguration") private AggregateRouteConfiguration aggregateRouteConfiguration; - /* - * L3 Isolation Domain description. - */ - @JsonProperty(value = "description") - private String description; - /* * Connected Subnet RoutePolicy */ @JsonProperty(value = "connectedSubnetRoutePolicy") - private L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy; + private ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy; /** Creates an instance of L3IsolationDomainProperties class. */ public L3IsolationDomainProperties() { } /** - * Get the networkFabricId property: Network Fabric ARM resource id. + * Get the networkFabricId property: ARM Resource ID of the Network Fabric. * * @return the networkFabricId value. */ @@ -93,7 +81,7 @@ public String networkFabricId() { } /** - * Set the networkFabricId property: Network Fabric ARM resource id. + * Set the networkFabricId property: ARM Resource ID of the Network Fabric. * * @param networkFabricId the networkFabricId value to set. * @return the L3IsolationDomainProperties object itself. @@ -104,41 +92,30 @@ public L3IsolationDomainProperties withNetworkFabricId(String networkFabricId) { } /** - * Get the disabledOnResources property: List of resources the L3 Isolation Domain is disabled on. Can be either - * entire NetworkFabric or NetworkRack. - * - * @return the disabledOnResources value. - */ - public List disabledOnResources() { - return this.disabledOnResources; - } - - /** - * Get the administrativeState property: Administrative state of the IsolationDomain. Example: Enabled | Disabled. + * Get the configurationState property: Configuration state of the resource. * - * @return the administrativeState value. + * @return the configurationState value. */ - public EnabledDisabledState administrativeState() { - return this.administrativeState; + public ConfigurationState configurationState() { + return this.configurationState; } /** - * Get the optionBDisabledOnResources property: List of resources the OptionB is disabled on. Can be either entire - * NetworkFabric or NetworkRack. + * Get the provisioningState property: Provisioning state of the resource. * - * @return the optionBDisabledOnResources value. + * @return the provisioningState value. */ - public List optionBDisabledOnResources() { - return this.optionBDisabledOnResources; + public ProvisioningState provisioningState() { + return this.provisioningState; } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the administrativeState property: Administrative state of the resource. * - * @return the provisioningState value. + * @return the administrativeState value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public AdministrativeState administrativeState() { + return this.administrativeState; } /** @@ -183,7 +160,7 @@ public L3IsolationDomainProperties withRedistributeStaticRoutes(RedistributeStat } /** - * Get the aggregateRouteConfiguration property: List of Ipv4 and Ipv6 route configurations. + * Get the aggregateRouteConfiguration property: Aggregate route configurations. * * @return the aggregateRouteConfiguration value. */ @@ -192,7 +169,7 @@ public AggregateRouteConfiguration aggregateRouteConfiguration() { } /** - * Set the aggregateRouteConfiguration property: List of Ipv4 and Ipv6 route configurations. + * Set the aggregateRouteConfiguration property: Aggregate route configurations. * * @param aggregateRouteConfiguration the aggregateRouteConfiguration value to set. * @return the L3IsolationDomainProperties object itself. @@ -203,32 +180,12 @@ public L3IsolationDomainProperties withAggregateRouteConfiguration( return this; } - /** - * Get the description property: L3 Isolation Domain description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: L3 Isolation Domain description. - * - * @param description the description value to set. - * @return the L3IsolationDomainProperties object itself. - */ - public L3IsolationDomainProperties withDescription(String description) { - this.description = description; - return this; - } - /** * Get the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. * * @return the connectedSubnetRoutePolicy value. */ - public L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { + public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { return this.connectedSubnetRoutePolicy; } @@ -239,7 +196,7 @@ public L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubne * @return the L3IsolationDomainProperties object itself. */ public L3IsolationDomainProperties withConnectedSubnetRoutePolicy( - L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { + ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { this.connectedSubnetRoutePolicy = connectedSubnetRoutePolicy; return this; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupInner.java new file mode 100644 index 0000000000000..f7023f18cbffe --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupInner.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Defines the Neighbor Group. */ +@Fluent +public final class NeighborGroupInner extends Resource { + /* + * Resource properties. + */ + @JsonProperty(value = "properties", required = true) + private NeighborGroupProperties innerProperties = new NeighborGroupProperties(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of NeighborGroupInner class. */ + public NeighborGroupInner() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private NeighborGroupProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public NeighborGroupInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public NeighborGroupInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the networkTapIds property: List of NetworkTap IDs where neighbor group is associated. + * + * @return the networkTapIds value. + */ + public List networkTapIds() { + return this.innerProperties() == null ? null : this.innerProperties().networkTapIds(); + } + + /** + * Get the networkTapRuleIds property: List of Network Tap Rule IDs where neighbor group is associated. + * + * @return the networkTapRuleIds value. + */ + public List networkTapRuleIds() { + return this.innerProperties() == null ? null : this.innerProperties().networkTapRuleIds(); + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * + * @return the destination value. + */ + public NeighborGroupDestination destination() { + return this.innerProperties() == null ? null : this.innerProperties().destination(); + } + + /** + * Set the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * + * @param destination the destination value to set. + * @return the NeighborGroupInner object itself. + */ + public NeighborGroupInner withDestination(NeighborGroupDestination destination) { + if (this.innerProperties() == null) { + this.innerProperties = new NeighborGroupProperties(); + } + this.innerProperties().withDestination(destination); + return this; + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NeighborGroupInner object itself. + */ + public NeighborGroupInner withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NeighborGroupProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model NeighborGroupInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NeighborGroupInner.class); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupPatchProperties.java new file mode 100644 index 0000000000000..e4a3b447e9dfe --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupPatchProperties.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Neighbor Group Patch properties. */ +@Fluent +public final class NeighborGroupPatchProperties extends AnnotationResource { + /* + * An array of destination IPv4 Addresses or IPv6 Addresses. + */ + @JsonProperty(value = "destination") + private NeighborGroupDestination destination; + + /** Creates an instance of NeighborGroupPatchProperties class. */ + public NeighborGroupPatchProperties() { + } + + /** + * Get the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * + * @return the destination value. + */ + public NeighborGroupDestination destination() { + return this.destination; + } + + /** + * Set the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * + * @param destination the destination value to set. + * @return the NeighborGroupPatchProperties object itself. + */ + public NeighborGroupPatchProperties withDestination(NeighborGroupDestination destination) { + this.destination = destination; + return this; + } + + /** {@inheritDoc} */ + @Override + public NeighborGroupPatchProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (destination() != null) { + destination().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupProperties.java new file mode 100644 index 0000000000000..754475377066a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NeighborGroupProperties.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Neighbor Group Properties defines the properties of the resource. */ +@Fluent +public final class NeighborGroupProperties extends AnnotationResource { + /* + * List of NetworkTap IDs where neighbor group is associated. + */ + @JsonProperty(value = "networkTapIds", access = JsonProperty.Access.WRITE_ONLY) + private List networkTapIds; + + /* + * List of Network Tap Rule IDs where neighbor group is associated. + */ + @JsonProperty(value = "networkTapRuleIds", access = JsonProperty.Access.WRITE_ONLY) + private List networkTapRuleIds; + + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * An array of destination IPv4 Addresses or IPv6 Addresses. + */ + @JsonProperty(value = "destination") + private NeighborGroupDestination destination; + + /** Creates an instance of NeighborGroupProperties class. */ + public NeighborGroupProperties() { + } + + /** + * Get the networkTapIds property: List of NetworkTap IDs where neighbor group is associated. + * + * @return the networkTapIds value. + */ + public List networkTapIds() { + return this.networkTapIds; + } + + /** + * Get the networkTapRuleIds property: List of Network Tap Rule IDs where neighbor group is associated. + * + * @return the networkTapRuleIds value. + */ + public List networkTapRuleIds() { + return this.networkTapRuleIds; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * + * @return the destination value. + */ + public NeighborGroupDestination destination() { + return this.destination; + } + + /** + * Set the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * + * @param destination the destination value to set. + * @return the NeighborGroupProperties object itself. + */ + public NeighborGroupProperties withDestination(NeighborGroupDestination destination) { + this.destination = destination; + return this; + } + + /** {@inheritDoc} */ + @Override + public NeighborGroupProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (destination() != null) { + destination().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceInner.java index 098dce4844722..30439b3aa59ae 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceInner.java @@ -7,19 +7,22 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleTypes; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRole; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The NetworkDevice resource definition. */ +/** The Network Device resource definition. */ @Fluent public final class NetworkDeviceInner extends Resource { /* * Resource properties. */ - @JsonProperty(value = "properties") - private NetworkDeviceProperties innerProperties; + @JsonProperty(value = "properties", required = true) + private NetworkDeviceProperties innerProperties = new NetworkDeviceProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -96,30 +99,52 @@ public NetworkDeviceInner withNetworkDeviceSku(String networkDeviceSku) { } /** - * Get the networkDeviceRole property: networkDeviceRole is the device role: Example: CE | ToR. + * Get the networkDeviceRole property: NetworkDeviceRole is the device role: Example: CE | ToR. * * @return the networkDeviceRole value. */ - public NetworkDeviceRoleTypes networkDeviceRole() { + public NetworkDeviceRole networkDeviceRole() { return this.innerProperties() == null ? null : this.innerProperties().networkDeviceRole(); } /** - * Set the networkDeviceRole property: networkDeviceRole is the device role: Example: CE | ToR. + * Get the networkRackId property: Reference to network rack resource id. * - * @param networkDeviceRole the networkDeviceRole value to set. - * @return the NetworkDeviceInner object itself. + * @return the networkRackId value. */ - public NetworkDeviceInner withNetworkDeviceRole(NetworkDeviceRoleTypes networkDeviceRole) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkDeviceProperties(); - } - this.innerProperties().withNetworkDeviceRole(networkDeviceRole); - return this; + public String networkRackId() { + return this.innerProperties() == null ? null : this.innerProperties().networkRackId(); } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the managementIpv4Address property: Management IPv4 Address. + * + * @return the managementIpv4Address value. + */ + public String managementIpv4Address() { + return this.innerProperties() == null ? null : this.innerProperties().managementIpv4Address(); + } + + /** + * Get the managementIpv6Address property: Management IPv6 Address. + * + * @return the managementIpv6Address value. + */ + public String managementIpv6Address() { + return this.innerProperties() == null ? null : this.innerProperties().managementIpv6Address(); + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ @@ -128,16 +153,16 @@ public ProvisioningState provisioningState() { } /** - * Get the networkRackId property: Reference to network rack resource id. + * Get the administrativeState property: Administrative state of the resource. * - * @return the networkRackId value. + * @return the administrativeState value. */ - public String networkRackId() { - return this.innerProperties() == null ? null : this.innerProperties().networkRackId(); + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); } /** - * Get the hostname property: The host Name of the device. + * Get the hostname property: The host name of the device. * * @return the hostname value. */ @@ -146,7 +171,7 @@ public String hostname() { } /** - * Set the hostname property: The host Name of the device. + * Set the hostname property: The host name of the device. * * @param hostname the hostname value to set. * @return the NetworkDeviceInner object itself. @@ -160,8 +185,8 @@ public NetworkDeviceInner withHostname(String hostname) { } /** - * Get the serialNumber property: serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: - * Arista;DCS-7280DR3-24;12.05;JPE21116969. + * Get the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. * * @return the serialNumber value. */ @@ -170,8 +195,8 @@ public String serialNumber() { } /** - * Set the serialNumber property: serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: - * Arista;DCS-7280DR3-24;12.05;JPE21116969. + * Set the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. * * @param serialNumber the serialNumber value to set. * @return the NetworkDeviceInner object itself. @@ -213,8 +238,15 @@ public NetworkDeviceInner withAnnotation(String annotation) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model NetworkDeviceInner")); + } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkDeviceInner.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDevicePatchParametersProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDevicePatchParametersProperties.java index 99675999a9bb6..41e5145347e32 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDevicePatchParametersProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDevicePatchParametersProperties.java @@ -12,14 +12,13 @@ @Fluent public final class NetworkDevicePatchParametersProperties extends AnnotationResource { /* - * The host Name of the device. + * The host name of the device. */ @JsonProperty(value = "hostName") private String hostname; /* - * 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. */ @JsonProperty(value = "serialNumber") private String serialNumber; @@ -29,7 +28,7 @@ public NetworkDevicePatchParametersProperties() { } /** - * Get the hostname property: The host Name of the device. + * Get the hostname property: The host name of the device. * * @return the hostname value. */ @@ -38,7 +37,7 @@ public String hostname() { } /** - * Set the hostname property: The host Name of the device. + * Set the hostname property: The host name of the device. * * @param hostname the hostname value to set. * @return the NetworkDevicePatchParametersProperties object itself. @@ -49,8 +48,8 @@ public NetworkDevicePatchParametersProperties withHostname(String hostname) { } /** - * Get the serialNumber property: serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: - * Arista;DCS-7280DR3-24;12.05;JPE21116969. + * Get the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. * * @return the serialNumber value. */ @@ -59,8 +58,8 @@ public String serialNumber() { } /** - * Set the serialNumber property: serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: - * Arista;DCS-7280DR3-24;12.05;JPE21116969. + * Set the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. * * @param serialNumber the serialNumber value to set. * @return the NetworkDevicePatchParametersProperties object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceProperties.java index 86357c3a791fb..0ef866c2a69c3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceProperties.java @@ -5,13 +5,14 @@ package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleTypes; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRole; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** NetworkDeviceProperties define the resource properties. */ +/** Network Device Properties defines the properties of the resource. */ @Fluent public final class NetworkDeviceProperties extends AnnotationResource { /* @@ -23,36 +24,59 @@ public final class NetworkDeviceProperties extends AnnotationResource { /* * Network Device SKU name. */ - @JsonProperty(value = "networkDeviceSku", required = true) + @JsonProperty(value = "networkDeviceSku") private String networkDeviceSku; /* - * networkDeviceRole is the device role: Example: CE | ToR. + * NetworkDeviceRole is the device role: Example: CE | ToR. */ - @JsonProperty(value = "networkDeviceRole", required = true) - private NetworkDeviceRoleTypes networkDeviceRole; + @JsonProperty(value = "networkDeviceRole", access = JsonProperty.Access.WRITE_ONLY) + private NetworkDeviceRole networkDeviceRole; /* - * Gets the provisioning state of the resource. + * Reference to network rack resource id. + */ + @JsonProperty(value = "networkRackId", access = JsonProperty.Access.WRITE_ONLY) + private String networkRackId; + + /* + * Management IPv4 Address. + */ + @JsonProperty(value = "managementIpv4Address", access = JsonProperty.Access.WRITE_ONLY) + private String managementIpv4Address; + + /* + * Management IPv6 Address. + */ + @JsonProperty(value = "managementIpv6Address", access = JsonProperty.Access.WRITE_ONLY) + private String managementIpv6Address; + + /* + * Configuration state of the resource. + */ + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; + + /* + * Provisioning state of the resource. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; /* - * Reference to network rack resource id. + * Administrative state of the resource. */ - @JsonProperty(value = "networkRackId", access = JsonProperty.Access.WRITE_ONLY) - private String networkRackId; + @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) + private AdministrativeState administrativeState; /* - * The host Name of the device. + * The host name of the device. */ @JsonProperty(value = "hostName") private String hostname; /* - * 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. */ @JsonProperty(value = "serialNumber") private String serialNumber; @@ -91,27 +115,52 @@ public NetworkDeviceProperties withNetworkDeviceSku(String networkDeviceSku) { } /** - * Get the networkDeviceRole property: networkDeviceRole is the device role: Example: CE | ToR. + * Get the networkDeviceRole property: NetworkDeviceRole is the device role: Example: CE | ToR. * * @return the networkDeviceRole value. */ - public NetworkDeviceRoleTypes networkDeviceRole() { + public NetworkDeviceRole networkDeviceRole() { return this.networkDeviceRole; } /** - * Set the networkDeviceRole property: networkDeviceRole is the device role: Example: CE | ToR. + * Get the networkRackId property: Reference to network rack resource id. * - * @param networkDeviceRole the networkDeviceRole value to set. - * @return the NetworkDeviceProperties object itself. + * @return the networkRackId value. */ - public NetworkDeviceProperties withNetworkDeviceRole(NetworkDeviceRoleTypes networkDeviceRole) { - this.networkDeviceRole = networkDeviceRole; - return this; + public String networkRackId() { + return this.networkRackId; + } + + /** + * Get the managementIpv4Address property: Management IPv4 Address. + * + * @return the managementIpv4Address value. + */ + public String managementIpv4Address() { + return this.managementIpv4Address; + } + + /** + * Get the managementIpv6Address property: Management IPv6 Address. + * + * @return the managementIpv6Address value. + */ + public String managementIpv6Address() { + return this.managementIpv6Address; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ @@ -120,16 +169,16 @@ public ProvisioningState provisioningState() { } /** - * Get the networkRackId property: Reference to network rack resource id. + * Get the administrativeState property: Administrative state of the resource. * - * @return the networkRackId value. + * @return the administrativeState value. */ - public String networkRackId() { - return this.networkRackId; + public AdministrativeState administrativeState() { + return this.administrativeState; } /** - * Get the hostname property: The host Name of the device. + * Get the hostname property: The host name of the device. * * @return the hostname value. */ @@ -138,7 +187,7 @@ public String hostname() { } /** - * Set the hostname property: The host Name of the device. + * Set the hostname property: The host name of the device. * * @param hostname the hostname value to set. * @return the NetworkDeviceProperties object itself. @@ -149,8 +198,8 @@ public NetworkDeviceProperties withHostname(String hostname) { } /** - * Get the serialNumber property: serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: - * Arista;DCS-7280DR3-24;12.05;JPE21116969. + * Get the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. * * @return the serialNumber value. */ @@ -159,8 +208,8 @@ public String serialNumber() { } /** - * Set the serialNumber property: serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: - * Arista;DCS-7280DR3-24;12.05;JPE21116969. + * Set the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. * * @param serialNumber the serialNumber value to set. * @return the NetworkDeviceProperties object itself. @@ -185,19 +234,5 @@ public NetworkDeviceProperties withAnnotation(String annotation) { @Override public void validate() { super.validate(); - if (networkDeviceSku() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property networkDeviceSku in model NetworkDeviceProperties")); - } - if (networkDeviceRole() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property networkDeviceRole in model NetworkDeviceProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkDeviceProperties.class); + } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuInner.java index bcee56e99d3c2..68912b223be84 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuInner.java @@ -9,7 +9,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceLimits; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.SupportedVersionProperties; @@ -100,7 +99,7 @@ public NetworkDeviceSkuInner withManufacturer(String manufacturer) { } /** - * Get the supportedVersions property: List of network device interfaces. + * Get the supportedVersions property: List of supported version details of network device. * * @return the supportedVersions value. */ @@ -109,7 +108,7 @@ public List supportedVersions() { } /** - * Set the supportedVersions property: List of network device interfaces. + * Set the supportedVersions property: List of supported version details of network device. * * @param supportedVersions the supportedVersions value to set. * @return the NetworkDeviceSkuInner object itself. @@ -122,29 +121,6 @@ public NetworkDeviceSkuInner withSupportedVersions(List inte } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuProperties.java index 84766046331d3..3b759445c50ce 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkDeviceSkuProperties.java @@ -7,14 +7,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceLimits; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.SupportedVersionProperties; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NetworkDeviceSkuProperties define the resource properties. */ +/** Network Device SKU Properties defines the properties of the resource. */ @Fluent public final class NetworkDeviceSkuProperties { /* @@ -30,17 +29,11 @@ public final class NetworkDeviceSkuProperties { private String manufacturer; /* - * List of network device interfaces. + * List of supported version details of network device. */ @JsonProperty(value = "supportedVersions") private List supportedVersions; - /* - * Network device limits. - */ - @JsonProperty(value = "limits") - private DeviceLimits limits; - /* * Available roles for the network device. */ @@ -54,7 +47,7 @@ public final class NetworkDeviceSkuProperties { private List interfaces; /* - * Gets the provisioning state of the resource. + * Provisioning state of the resource. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; @@ -104,7 +97,7 @@ public NetworkDeviceSkuProperties withManufacturer(String manufacturer) { } /** - * Get the supportedVersions property: List of network device interfaces. + * Get the supportedVersions property: List of supported version details of network device. * * @return the supportedVersions value. */ @@ -113,7 +106,7 @@ public List supportedVersions() { } /** - * Set the supportedVersions property: List of network device interfaces. + * Set the supportedVersions property: List of supported version details of network device. * * @param supportedVersions the supportedVersions value to set. * @return the NetworkDeviceSkuProperties object itself. @@ -123,26 +116,6 @@ public NetworkDeviceSkuProperties withSupportedVersions(List } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ @@ -207,9 +180,6 @@ public void validate() { if (supportedVersions() != null) { supportedVersions().forEach(e -> e.validate()); } - if (limits() != null) { - limits().validate(); - } if (interfaces() != null) { interfaces().forEach(e -> e.validate()); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerInner.java index 549f9fb8ae194..9f234b2d17ffc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerInner.java @@ -7,24 +7,25 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.ControllerServices; import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; -import com.azure.resourcemanager.managednetworkfabric.models.InfrastructureServices; +import com.azure.resourcemanager.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled; import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerOperationalState; +import com.azure.resourcemanager.managednetworkfabric.models.NfcSku; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.WorkloadServices; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; -/** The NetworkFabricController resource definition. */ +/** The Network Fabric Controller resource definition. */ @Fluent public final class NetworkFabricControllerInner extends Resource { /* * Resource properties. */ - @JsonProperty(value = "properties") - private NetworkFabricControllerProperties innerProperties; + @JsonProperty(value = "properties", required = true) + private NetworkFabricControllerProperties innerProperties = new NetworkFabricControllerProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -73,7 +74,7 @@ public NetworkFabricControllerInner withTags(Map tags) { * * @return the infrastructureServices value. */ - public InfrastructureServices infrastructureServices() { + public ControllerServices infrastructureServices() { return this.innerProperties() == null ? null : this.innerProperties().infrastructureServices(); } @@ -82,7 +83,7 @@ public InfrastructureServices infrastructureServices() { * * @return the workloadServices value. */ - public WorkloadServices workloadServices() { + public ControllerServices workloadServices() { return this.innerProperties() == null ? null : this.innerProperties().workloadServices(); } @@ -123,7 +124,7 @@ public List networkFabricIds() { /** * Get the workloadManagementNetwork property: 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. + * any other MSFT/Public endpoints. This is used for the backward compatibility. * * @return the workloadManagementNetwork value. */ @@ -131,6 +132,43 @@ public Boolean workloadManagementNetwork() { return this.innerProperties() == null ? null : this.innerProperties().workloadManagementNetwork(); } + /** + * Get the isWorkloadManagementNetworkEnabled property: 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. + * + * @return the isWorkloadManagementNetworkEnabled value. + */ + public IsWorkloadManagementNetworkEnabled isWorkloadManagementNetworkEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().isWorkloadManagementNetworkEnabled(); + } + + /** + * Set the isWorkloadManagementNetworkEnabled property: 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. + * + * @param isWorkloadManagementNetworkEnabled the isWorkloadManagementNetworkEnabled value to set. + * @return the NetworkFabricControllerInner object itself. + */ + public NetworkFabricControllerInner withIsWorkloadManagementNetworkEnabled( + IsWorkloadManagementNetworkEnabled isWorkloadManagementNetworkEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricControllerProperties(); + } + this.innerProperties().withIsWorkloadManagementNetworkEnabled(isWorkloadManagementNetworkEnabled); + return this; + } + + /** + * Get the tenantInternetGatewayIds property: List of tenant InternetGateway resource IDs. + * + * @return the tenantInternetGatewayIds value. + */ + public List tenantInternetGatewayIds() { + return this.innerProperties() == null ? null : this.innerProperties().tenantInternetGatewayIds(); + } + /** * Get the ipv4AddressSpace property: IPv4 Network Fabric Controller Address Space. * @@ -178,13 +216,26 @@ public NetworkFabricControllerInner withIpv6AddressSpace(String ipv6AddressSpace } /** - * Get the operationalState property: The Operational Status would always be NULL. Look only in to the Provisioning - * state for the latest status. + * Get the nfcSku property: Network Fabric Controller SKU. + * + * @return the nfcSku value. + */ + public NfcSku nfcSku() { + return this.innerProperties() == null ? null : this.innerProperties().nfcSku(); + } + + /** + * Set the nfcSku property: Network Fabric Controller SKU. * - * @return the operationalState value. + * @param nfcSku the nfcSku value to set. + * @return the NetworkFabricControllerInner object itself. */ - public NetworkFabricControllerOperationalState operationalState() { - return this.innerProperties() == null ? null : this.innerProperties().operationalState(); + public NetworkFabricControllerInner withNfcSku(NfcSku nfcSku) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricControllerProperties(); + } + this.innerProperties().withNfcSku(nfcSku); + return this; } /** @@ -283,8 +334,15 @@ public NetworkFabricControllerInner withAnnotation(String annotation) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model NetworkFabricControllerInner")); + } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkFabricControllerInner.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerProperties.java index 5d3f32a5bf4cd..e81c8683017bb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricControllerProperties.java @@ -6,29 +6,29 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.ControllerServices; import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; -import com.azure.resourcemanager.managednetworkfabric.models.InfrastructureServices; +import com.azure.resourcemanager.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled; import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerOperationalState; +import com.azure.resourcemanager.managednetworkfabric.models.NfcSku; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.WorkloadServices; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NetworkFabricControllerProperties define the resource properties. */ +/** NetworkFabricControllerProperties defines the resource properties. */ @Fluent public final class NetworkFabricControllerProperties extends AnnotationResource { /* * InfrastructureServices IP ranges. */ @JsonProperty(value = "infrastructureServices", access = JsonProperty.Access.WRITE_ONLY) - private InfrastructureServices infrastructureServices; + private ControllerServices infrastructureServices; /* * WorkloadServices IP ranges. */ @JsonProperty(value = "workloadServices", access = JsonProperty.Access.WRITE_ONLY) - private WorkloadServices workloadServices; + private ControllerServices workloadServices; /* * Managed Resource Group configuration properties. @@ -44,11 +44,25 @@ public final class NetworkFabricControllerProperties extends AnnotationResource /* * 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. + * for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. This is used for + * the backward compatibility. */ @JsonProperty(value = "workloadManagementNetwork", access = JsonProperty.Access.WRITE_ONLY) private Boolean workloadManagementNetwork; + /* + * 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. + */ + @JsonProperty(value = "isWorkloadManagementNetworkEnabled") + private IsWorkloadManagementNetworkEnabled isWorkloadManagementNetworkEnabled; + + /* + * List of tenant InternetGateway resource IDs + */ + @JsonProperty(value = "tenantInternetGatewayIds", access = JsonProperty.Access.WRITE_ONLY) + private List tenantInternetGatewayIds; + /* * IPv4 Network Fabric Controller Address Space. */ @@ -62,10 +76,10 @@ public final class NetworkFabricControllerProperties extends AnnotationResource private String ipv6AddressSpace; /* - * The Operational Status would always be NULL. Look only in to the Provisioning state for the latest status. + * Network Fabric Controller SKU. */ - @JsonProperty(value = "operationalState", access = JsonProperty.Access.WRITE_ONLY) - private NetworkFabricControllerOperationalState operationalState; + @JsonProperty(value = "nfcSku") + private NfcSku nfcSku; /* * Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During @@ -97,7 +111,7 @@ public NetworkFabricControllerProperties() { * * @return the infrastructureServices value. */ - public InfrastructureServices infrastructureServices() { + public ControllerServices infrastructureServices() { return this.infrastructureServices; } @@ -106,7 +120,7 @@ public InfrastructureServices infrastructureServices() { * * @return the workloadServices value. */ - public WorkloadServices workloadServices() { + public ControllerServices workloadServices() { return this.workloadServices; } @@ -144,7 +158,7 @@ public List networkFabricIds() { /** * Get the workloadManagementNetwork property: 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. + * any other MSFT/Public endpoints. This is used for the backward compatibility. * * @return the workloadManagementNetwork value. */ @@ -152,6 +166,40 @@ public Boolean workloadManagementNetwork() { return this.workloadManagementNetwork; } + /** + * Get the isWorkloadManagementNetworkEnabled property: 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. + * + * @return the isWorkloadManagementNetworkEnabled value. + */ + public IsWorkloadManagementNetworkEnabled isWorkloadManagementNetworkEnabled() { + return this.isWorkloadManagementNetworkEnabled; + } + + /** + * Set the isWorkloadManagementNetworkEnabled property: 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. + * + * @param isWorkloadManagementNetworkEnabled the isWorkloadManagementNetworkEnabled value to set. + * @return the NetworkFabricControllerProperties object itself. + */ + public NetworkFabricControllerProperties withIsWorkloadManagementNetworkEnabled( + IsWorkloadManagementNetworkEnabled isWorkloadManagementNetworkEnabled) { + this.isWorkloadManagementNetworkEnabled = isWorkloadManagementNetworkEnabled; + return this; + } + + /** + * Get the tenantInternetGatewayIds property: List of tenant InternetGateway resource IDs. + * + * @return the tenantInternetGatewayIds value. + */ + public List tenantInternetGatewayIds() { + return this.tenantInternetGatewayIds; + } + /** * Get the ipv4AddressSpace property: IPv4 Network Fabric Controller Address Space. * @@ -193,13 +241,23 @@ public NetworkFabricControllerProperties withIpv6AddressSpace(String ipv6Address } /** - * Get the operationalState property: The Operational Status would always be NULL. Look only in to the Provisioning - * state for the latest status. + * Get the nfcSku property: Network Fabric Controller SKU. * - * @return the operationalState value. + * @return the nfcSku value. */ - public NetworkFabricControllerOperationalState operationalState() { - return this.operationalState; + public NfcSku nfcSku() { + return this.nfcSku; + } + + /** + * Set the nfcSku property: Network Fabric Controller SKU. + * + * @param nfcSku the nfcSku value to set. + * @return the NetworkFabricControllerProperties object itself. + */ + public NetworkFabricControllerProperties withNfcSku(NfcSku nfcSku) { + this.nfcSku = nfcSku; + return this; } /** diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricInner.java index dcd5f767fe99b..a8399abd83637 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricInner.java @@ -7,22 +7,24 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricOperationalState; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; -/** The NetworkFabric resource definition. */ +/** The Network Fabric resource definition. */ @Fluent public final class NetworkFabricInner extends Resource { /* * Resource properties. */ - @JsonProperty(value = "properties") - private NetworkFabricProperties innerProperties; + @JsonProperty(value = "properties", required = true) + private NetworkFabricProperties innerProperties = new NetworkFabricProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -94,7 +96,50 @@ public NetworkFabricInner withNetworkFabricSku(String networkFabricSku) { } /** - * Get the rackCount property: Number of racks associated to Network Fabric.Possible values are from 2-8. + * Get the fabricVersion property: The version of Network Fabric. + * + * @return the fabricVersion value. + */ + public String fabricVersion() { + return this.innerProperties() == null ? null : this.innerProperties().fabricVersion(); + } + + /** + * Get the routerIds property: Array of router IDs. + * + * @return the routerIds value. + */ + public List routerIds() { + return this.innerProperties() == null ? null : this.innerProperties().routerIds(); + } + + /** + * Get the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the NetworkFabric + * belongs. + * + * @return the networkFabricControllerId value. + */ + public String networkFabricControllerId() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricControllerId(); + } + + /** + * Set the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the NetworkFabric + * belongs. + * + * @param networkFabricControllerId the networkFabricControllerId value to set. + * @return the NetworkFabricInner object itself. + */ + public NetworkFabricInner withNetworkFabricControllerId(String networkFabricControllerId) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricProperties(); + } + this.innerProperties().withNetworkFabricControllerId(networkFabricControllerId); + return this; + } + + /** + * Get the rackCount property: Number of compute racks associated to Network Fabric. * * @return the rackCount value. */ @@ -103,7 +148,7 @@ public Integer rackCount() { } /** - * Set the rackCount property: Number of racks associated to Network Fabric.Possible values are from 2-8. + * Set the rackCount property: Number of compute racks associated to Network Fabric. * * @param rackCount the rackCount value to set. * @return the NetworkFabricInner object itself. @@ -121,8 +166,8 @@ public NetworkFabricInner withRackCount(Integer rackCount) { * * @return the serverCountPerRack value. */ - public Integer serverCountPerRack() { - return this.innerProperties() == null ? null : this.innerProperties().serverCountPerRack(); + public int serverCountPerRack() { + return this.innerProperties() == null ? 0 : this.innerProperties().serverCountPerRack(); } /** @@ -131,7 +176,7 @@ public Integer serverCountPerRack() { * @param serverCountPerRack the serverCountPerRack value to set. * @return the NetworkFabricInner object itself. */ - public NetworkFabricInner withServerCountPerRack(Integer serverCountPerRack) { + public NetworkFabricInner withServerCountPerRack(int serverCountPerRack) { if (this.innerProperties() == null) { this.innerProperties = new NetworkFabricProperties(); } @@ -185,22 +230,13 @@ public NetworkFabricInner withIpv6Prefix(String ipv6Prefix) { return this; } - /** - * Get the routerId property: Router Id of CE to be used for MP-BGP between PE and CE. - * - * @return the routerId value. - */ - public String routerId() { - return this.innerProperties() == null ? null : this.innerProperties().routerId(); - } - /** * Get the fabricAsn property: ASN of CE devices for CE/PE connectivity. * * @return the fabricAsn value. */ - public Integer fabricAsn() { - return this.innerProperties() == null ? null : this.innerProperties().fabricAsn(); + public long fabricAsn() { + return this.innerProperties() == null ? 0L : this.innerProperties().fabricAsn(); } /** @@ -209,7 +245,7 @@ public Integer fabricAsn() { * @param fabricAsn the fabricAsn value to set. * @return the NetworkFabricInner object itself. */ - public NetworkFabricInner withFabricAsn(Integer fabricAsn) { + public NetworkFabricInner withFabricAsn(long fabricAsn) { if (this.innerProperties() == null) { this.innerProperties = new NetworkFabricProperties(); } @@ -217,31 +253,6 @@ public NetworkFabricInner withFabricAsn(Integer fabricAsn) { return this; } - /** - * Get the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the NetworkFabric - * belongs. - * - * @return the networkFabricControllerId value. - */ - public String networkFabricControllerId() { - return this.innerProperties() == null ? null : this.innerProperties().networkFabricControllerId(); - } - - /** - * Set the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the NetworkFabric - * belongs. - * - * @param networkFabricControllerId the networkFabricControllerId value to set. - * @return the NetworkFabricInner object itself. - */ - public NetworkFabricInner withNetworkFabricControllerId(String networkFabricControllerId) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricProperties(); - } - this.innerProperties().withNetworkFabricControllerId(networkFabricControllerId); - return this; - } - /** * Get the terminalServerConfiguration property: Network and credentials configuration currently applied to terminal * server. @@ -272,7 +283,7 @@ public NetworkFabricInner withTerminalServerConfiguration(TerminalServerConfigur * * @return the managementNetworkConfiguration value. */ - public ManagementNetworkConfiguration managementNetworkConfiguration() { + public ManagementNetworkConfigurationProperties managementNetworkConfiguration() { return this.innerProperties() == null ? null : this.innerProperties().managementNetworkConfiguration(); } @@ -283,7 +294,7 @@ public ManagementNetworkConfiguration managementNetworkConfiguration() { * @return the NetworkFabricInner object itself. */ public NetworkFabricInner withManagementNetworkConfiguration( - ManagementNetworkConfiguration managementNetworkConfiguration) { + ManagementNetworkConfigurationProperties managementNetworkConfiguration) { if (this.innerProperties() == null) { this.innerProperties = new NetworkFabricProperties(); } @@ -291,24 +302,6 @@ public NetworkFabricInner withManagementNetworkConfiguration( return this; } - /** - * Get the operationalState property: Gets the operational state of the resource. - * - * @return the operationalState value. - */ - public NetworkFabricOperationalState operationalState() { - return this.innerProperties() == null ? null : this.innerProperties().operationalState(); - } - - /** - * Get the provisioningState property: Gets the provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - /** * Get the racks property: List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed * depends on the Network Fabric SKU. @@ -320,7 +313,7 @@ public List racks() { } /** - * Get the l2IsolationDomains property: List of L2IsolationDomain resource IDs under the Network Fabric. + * Get the l2IsolationDomains property: List of L2 Isolation Domain resource IDs under the Network Fabric. * * @return the l2IsolationDomains value. */ @@ -329,7 +322,7 @@ public List l2IsolationDomains() { } /** - * Get the l3IsolationDomains property: List of L3IsolationDomain resource IDs under the Network Fabric. + * Get the l3IsolationDomains property: List of L3 Isolation Domain resource IDs under the Network Fabric. * * @return the l3IsolationDomains value. */ @@ -337,6 +330,35 @@ public List l3IsolationDomains() { return this.innerProperties() == null ? null : this.innerProperties().l3IsolationDomains(); } + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * Get the provisioningState property: 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. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } + /** * Get the annotation property: Switch configuration description. * @@ -366,8 +388,15 @@ public NetworkFabricInner withAnnotation(String annotation) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model NetworkFabricInner")); + } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkFabricInner.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricPatchParametersProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricPatchParametersProperties.java deleted file mode 100644 index 853c922672619..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricPatchParametersProperties.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerPatchableProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Network Fabric Patch properties. */ -@Fluent -public final class NetworkFabricPatchParametersProperties extends AnnotationResource { - /* - * Network and credentials configuration already applied to terminal server. - */ - @JsonProperty(value = "terminalServerConfiguration") - private TerminalServerPatchableProperties terminalServerConfiguration; - - /* - * List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed depends on the Network - * Fabric SKU. - */ - @JsonProperty(value = "racks", access = JsonProperty.Access.WRITE_ONLY) - private List racks; - - /* - * List of L2IsolationDomain resource IDs under the Network Fabric. - */ - @JsonProperty(value = "l2IsolationDomains", access = JsonProperty.Access.WRITE_ONLY) - private List l2IsolationDomains; - - /* - * List of L3IsolationDomain resource IDs under the Network Fabric. - */ - @JsonProperty(value = "l3IsolationDomains", access = JsonProperty.Access.WRITE_ONLY) - private List l3IsolationDomains; - - /** Creates an instance of NetworkFabricPatchParametersProperties class. */ - public NetworkFabricPatchParametersProperties() { - } - - /** - * Get the terminalServerConfiguration property: Network and credentials configuration already applied to terminal - * server. - * - * @return the terminalServerConfiguration value. - */ - public TerminalServerPatchableProperties terminalServerConfiguration() { - return this.terminalServerConfiguration; - } - - /** - * Set the terminalServerConfiguration property: Network and credentials configuration already applied to terminal - * server. - * - * @param terminalServerConfiguration the terminalServerConfiguration value to set. - * @return the NetworkFabricPatchParametersProperties object itself. - */ - public NetworkFabricPatchParametersProperties withTerminalServerConfiguration( - TerminalServerPatchableProperties terminalServerConfiguration) { - this.terminalServerConfiguration = terminalServerConfiguration; - return this; - } - - /** - * Get the racks property: List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed - * depends on the Network Fabric SKU. - * - * @return the racks value. - */ - public List racks() { - return this.racks; - } - - /** - * Get the l2IsolationDomains property: List of L2IsolationDomain resource IDs under the Network Fabric. - * - * @return the l2IsolationDomains value. - */ - public List l2IsolationDomains() { - return this.l2IsolationDomains; - } - - /** - * Get the l3IsolationDomains property: List of L3IsolationDomain resource IDs under the Network Fabric. - * - * @return the l3IsolationDomains value. - */ - public List l3IsolationDomains() { - return this.l3IsolationDomains; - } - - /** {@inheritDoc} */ - @Override - public NetworkFabricPatchParametersProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (terminalServerConfiguration() != null) { - terminalServerConfiguration().validate(); - } - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricPatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricPatchProperties.java new file mode 100644 index 0000000000000..d736bcefe44fd --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricPatchProperties.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Network Fabric Patch properties. */ +@Fluent +public final class NetworkFabricPatchProperties extends AnnotationResource { + /* + * Number of compute racks associated to Network Fabric. + */ + @JsonProperty(value = "rackCount") + private Integer rackCount; + + /* + * Number of servers.Possible values are from 1-16. + */ + @JsonProperty(value = "serverCountPerRack") + private Integer serverCountPerRack; + + /* + * IPv4Prefix for Management Network. Example: 10.1.0.0/19. + */ + @JsonProperty(value = "ipv4Prefix") + private String ipv4Prefix; + + /* + * IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. + */ + @JsonProperty(value = "ipv6Prefix") + private String ipv6Prefix; + + /* + * ASN of CE devices for CE/PE connectivity. + */ + @JsonProperty(value = "fabricASN") + private Long fabricAsn; + + /* + * Network and credentials configuration already applied to terminal server. + */ + @JsonProperty(value = "terminalServerConfiguration") + private NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration; + + /* + * Configuration to be used to setup the management network. + */ + @JsonProperty(value = "managementNetworkConfiguration") + private ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration; + + /** Creates an instance of NetworkFabricPatchProperties class. */ + public NetworkFabricPatchProperties() { + } + + /** + * Get the rackCount property: Number of compute racks associated to Network Fabric. + * + * @return the rackCount value. + */ + public Integer rackCount() { + return this.rackCount; + } + + /** + * Set the rackCount property: Number of compute racks associated to Network Fabric. + * + * @param rackCount the rackCount value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withRackCount(Integer rackCount) { + this.rackCount = rackCount; + return this; + } + + /** + * Get the serverCountPerRack property: Number of servers.Possible values are from 1-16. + * + * @return the serverCountPerRack value. + */ + public Integer serverCountPerRack() { + return this.serverCountPerRack; + } + + /** + * Set the serverCountPerRack property: Number of servers.Possible values are from 1-16. + * + * @param serverCountPerRack the serverCountPerRack value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withServerCountPerRack(Integer serverCountPerRack) { + this.serverCountPerRack = serverCountPerRack; + return this; + } + + /** + * Get the ipv4Prefix property: IPv4Prefix for Management Network. Example: 10.1.0.0/19. + * + * @return the ipv4Prefix value. + */ + public String ipv4Prefix() { + return this.ipv4Prefix; + } + + /** + * Set the ipv4Prefix property: IPv4Prefix for Management Network. Example: 10.1.0.0/19. + * + * @param ipv4Prefix the ipv4Prefix value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withIpv4Prefix(String ipv4Prefix) { + this.ipv4Prefix = ipv4Prefix; + return this; + } + + /** + * Get the ipv6Prefix property: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. + * + * @return the ipv6Prefix value. + */ + public String ipv6Prefix() { + return this.ipv6Prefix; + } + + /** + * Set the ipv6Prefix property: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. + * + * @param ipv6Prefix the ipv6Prefix value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withIpv6Prefix(String ipv6Prefix) { + this.ipv6Prefix = ipv6Prefix; + return this; + } + + /** + * Get the fabricAsn property: ASN of CE devices for CE/PE connectivity. + * + * @return the fabricAsn value. + */ + public Long fabricAsn() { + return this.fabricAsn; + } + + /** + * Set the fabricAsn property: ASN of CE devices for CE/PE connectivity. + * + * @param fabricAsn the fabricAsn value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withFabricAsn(Long fabricAsn) { + this.fabricAsn = fabricAsn; + return this; + } + + /** + * Get the terminalServerConfiguration property: Network and credentials configuration already applied to terminal + * server. + * + * @return the terminalServerConfiguration value. + */ + public NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration() { + return this.terminalServerConfiguration; + } + + /** + * Set the terminalServerConfiguration property: Network and credentials configuration already applied to terminal + * server. + * + * @param terminalServerConfiguration the terminalServerConfiguration value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withTerminalServerConfiguration( + NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration) { + this.terminalServerConfiguration = terminalServerConfiguration; + return this; + } + + /** + * Get the managementNetworkConfiguration property: Configuration to be used to setup the management network. + * + * @return the managementNetworkConfiguration value. + */ + public ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration() { + return this.managementNetworkConfiguration; + } + + /** + * Set the managementNetworkConfiguration property: Configuration to be used to setup the management network. + * + * @param managementNetworkConfiguration the managementNetworkConfiguration value to set. + * @return the NetworkFabricPatchProperties object itself. + */ + public NetworkFabricPatchProperties withManagementNetworkConfiguration( + ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration) { + this.managementNetworkConfiguration = managementNetworkConfiguration; + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkFabricPatchProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (terminalServerConfiguration() != null) { + terminalServerConfiguration().validate(); + } + if (managementNetworkConfiguration() != null) { + managementNetworkConfiguration().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricProperties.java index 5d55b9e8c8db2..74be32174bec9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricProperties.java @@ -6,15 +6,16 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricOperationalState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NetworkFabricProperties - define the resource properties. */ +/** Network Fabric Properties defines the properties of the resource. */ @Fluent public final class NetworkFabricProperties extends AnnotationResource { /* @@ -26,10 +27,28 @@ public final class NetworkFabricProperties extends AnnotationResource { private String networkFabricSku; /* - * Number of racks associated to Network Fabric.Possible values are from 2-8. + * The version of Network Fabric. */ - @JsonProperty(value = "rackCount", required = true) - private int rackCount; + @JsonProperty(value = "fabricVersion", access = JsonProperty.Access.WRITE_ONLY) + private String fabricVersion; + + /* + * Array of router IDs. + */ + @JsonProperty(value = "routerIds", access = JsonProperty.Access.WRITE_ONLY) + private List routerIds; + + /* + * Azure resource ID for the NetworkFabricController the NetworkFabric belongs. + */ + @JsonProperty(value = "networkFabricControllerId", required = true) + private String networkFabricControllerId; + + /* + * Number of compute racks associated to Network Fabric. + */ + @JsonProperty(value = "rackCount") + private Integer rackCount; /* * Number of servers.Possible values are from 1-16. @@ -40,32 +59,20 @@ public final class NetworkFabricProperties extends AnnotationResource { /* * IPv4Prefix for Management Network. Example: 10.1.0.0/19. */ - @JsonProperty(value = "ipv4Prefix") + @JsonProperty(value = "ipv4Prefix", required = true) private String ipv4Prefix; /* - * IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. + * IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59 */ @JsonProperty(value = "ipv6Prefix") private String ipv6Prefix; - /* - * Router Id of CE to be used for MP-BGP between PE and CE - */ - @JsonProperty(value = "routerId", access = JsonProperty.Access.WRITE_ONLY) - private String routerId; - /* * ASN of CE devices for CE/PE connectivity. */ @JsonProperty(value = "fabricASN", required = true) - private int fabricAsn; - - /* - * Azure resource ID for the NetworkFabricController the NetworkFabric belongs. - */ - @JsonProperty(value = "networkFabricControllerId", required = true) - private String networkFabricControllerId; + private long fabricAsn; /* * Network and credentials configuration currently applied to terminal server. @@ -77,19 +84,7 @@ public final class NetworkFabricProperties extends AnnotationResource { * Configuration to be used to setup the management network. */ @JsonProperty(value = "managementNetworkConfiguration", required = true) - private ManagementNetworkConfiguration managementNetworkConfiguration; - - /* - * Gets the operational state of the resource. - */ - @JsonProperty(value = "operationalState", access = JsonProperty.Access.WRITE_ONLY) - private NetworkFabricOperationalState operationalState; - - /* - * Gets the provisioning state of the resource. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; + private ManagementNetworkConfigurationProperties managementNetworkConfiguration; /* * List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed depends on the Network @@ -99,17 +94,36 @@ public final class NetworkFabricProperties extends AnnotationResource { private List racks; /* - * List of L2IsolationDomain resource IDs under the Network Fabric. + * List of L2 Isolation Domain resource IDs under the Network Fabric. */ @JsonProperty(value = "l2IsolationDomains", access = JsonProperty.Access.WRITE_ONLY) private List l2IsolationDomains; /* - * List of L3IsolationDomain resource IDs under the Network Fabric. + * List of L3 Isolation Domain resource IDs under the Network Fabric. */ @JsonProperty(value = "l3IsolationDomains", access = JsonProperty.Access.WRITE_ONLY) private List l3IsolationDomains; + /* + * Configuration state of the resource. + */ + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; + + /* + * 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. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Administrative state of the resource. + */ + @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) + private AdministrativeState administrativeState; + /** Creates an instance of NetworkFabricProperties class. */ public NetworkFabricProperties() { } @@ -139,21 +153,61 @@ public NetworkFabricProperties withNetworkFabricSku(String networkFabricSku) { } /** - * Get the rackCount property: Number of racks associated to Network Fabric.Possible values are from 2-8. + * Get the fabricVersion property: The version of Network Fabric. + * + * @return the fabricVersion value. + */ + public String fabricVersion() { + return this.fabricVersion; + } + + /** + * Get the routerIds property: Array of router IDs. + * + * @return the routerIds value. + */ + public List routerIds() { + return this.routerIds; + } + + /** + * Get the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the NetworkFabric + * belongs. + * + * @return the networkFabricControllerId value. + */ + public String networkFabricControllerId() { + return this.networkFabricControllerId; + } + + /** + * Set the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the NetworkFabric + * belongs. + * + * @param networkFabricControllerId the networkFabricControllerId value to set. + * @return the NetworkFabricProperties object itself. + */ + public NetworkFabricProperties withNetworkFabricControllerId(String networkFabricControllerId) { + this.networkFabricControllerId = networkFabricControllerId; + return this; + } + + /** + * Get the rackCount property: Number of compute racks associated to Network Fabric. * * @return the rackCount value. */ - public int rackCount() { + public Integer rackCount() { return this.rackCount; } /** - * Set the rackCount property: Number of racks associated to Network Fabric.Possible values are from 2-8. + * Set the rackCount property: Number of compute racks associated to Network Fabric. * * @param rackCount the rackCount value to set. * @return the NetworkFabricProperties object itself. */ - public NetworkFabricProperties withRackCount(int rackCount) { + public NetworkFabricProperties withRackCount(Integer rackCount) { this.rackCount = rackCount; return this; } @@ -218,21 +272,12 @@ public NetworkFabricProperties withIpv6Prefix(String ipv6Prefix) { return this; } - /** - * Get the routerId property: Router Id of CE to be used for MP-BGP between PE and CE. - * - * @return the routerId value. - */ - public String routerId() { - return this.routerId; - } - /** * Get the fabricAsn property: ASN of CE devices for CE/PE connectivity. * * @return the fabricAsn value. */ - public int fabricAsn() { + public long fabricAsn() { return this.fabricAsn; } @@ -242,33 +287,11 @@ public int fabricAsn() { * @param fabricAsn the fabricAsn value to set. * @return the NetworkFabricProperties object itself. */ - public NetworkFabricProperties withFabricAsn(int fabricAsn) { + public NetworkFabricProperties withFabricAsn(long fabricAsn) { this.fabricAsn = fabricAsn; return this; } - /** - * Get the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the NetworkFabric - * belongs. - * - * @return the networkFabricControllerId value. - */ - public String networkFabricControllerId() { - return this.networkFabricControllerId; - } - - /** - * Set the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the NetworkFabric - * belongs. - * - * @param networkFabricControllerId the networkFabricControllerId value to set. - * @return the NetworkFabricProperties object itself. - */ - public NetworkFabricProperties withNetworkFabricControllerId(String networkFabricControllerId) { - this.networkFabricControllerId = networkFabricControllerId; - return this; - } - /** * Get the terminalServerConfiguration property: Network and credentials configuration currently applied to terminal * server. @@ -297,7 +320,7 @@ public NetworkFabricProperties withTerminalServerConfiguration( * * @return the managementNetworkConfiguration value. */ - public ManagementNetworkConfiguration managementNetworkConfiguration() { + public ManagementNetworkConfigurationProperties managementNetworkConfiguration() { return this.managementNetworkConfiguration; } @@ -308,29 +331,11 @@ public ManagementNetworkConfiguration managementNetworkConfiguration() { * @return the NetworkFabricProperties object itself. */ public NetworkFabricProperties withManagementNetworkConfiguration( - ManagementNetworkConfiguration managementNetworkConfiguration) { + ManagementNetworkConfigurationProperties managementNetworkConfiguration) { this.managementNetworkConfiguration = managementNetworkConfiguration; return this; } - /** - * Get the operationalState property: Gets the operational state of the resource. - * - * @return the operationalState value. - */ - public NetworkFabricOperationalState operationalState() { - return this.operationalState; - } - - /** - * Get the provisioningState property: Gets the provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - /** * Get the racks property: List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed * depends on the Network Fabric SKU. @@ -342,7 +347,7 @@ public List racks() { } /** - * Get the l2IsolationDomains property: List of L2IsolationDomain resource IDs under the Network Fabric. + * Get the l2IsolationDomains property: List of L2 Isolation Domain resource IDs under the Network Fabric. * * @return the l2IsolationDomains value. */ @@ -351,7 +356,7 @@ public List l2IsolationDomains() { } /** - * Get the l3IsolationDomains property: List of L3IsolationDomain resource IDs under the Network Fabric. + * Get the l3IsolationDomains property: List of L3 Isolation Domain resource IDs under the Network Fabric. * * @return the l3IsolationDomains value. */ @@ -359,6 +364,35 @@ public List l3IsolationDomains() { return this.l3IsolationDomains; } + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the provisioningState property: 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. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; + } + /** {@inheritDoc} */ @Override public NetworkFabricProperties withAnnotation(String annotation) { @@ -386,6 +420,12 @@ public void validate() { new IllegalArgumentException( "Missing required property networkFabricControllerId in model NetworkFabricProperties")); } + if (ipv4Prefix() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property ipv4Prefix in model NetworkFabricProperties")); + } if (terminalServerConfiguration() == null) { throw LOGGER .logExceptionAsError( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuInner.java index c08fce376e9a3..7357e7544fb7d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuInner.java @@ -8,10 +8,12 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.FabricSkuType; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; -/** The NetworkFabricSku resource definition. */ +/** The Network Fabric SKU resource definition. */ @Fluent public final class NetworkFabricSkuInner extends ProxyResource { /* @@ -49,16 +51,17 @@ public SystemData systemData() { } /** - * Get the type property: Type of Network Fabric Sku. + * Get the type property: Type of Network Fabric SKU. * * @return the type value. */ - public String typePropertiesType() { + public FabricSkuType typePropertiesType() { return this.innerProperties() == null ? null : this.innerProperties().type(); } /** - * Get the maxComputeRacks property: Maximum number of compute racks available for this Network Fabric SKU. + * Get the maxComputeRacks property: 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. * * @return the maxComputeRacks value. */ @@ -67,7 +70,8 @@ public Integer maxComputeRacks() { } /** - * Set the maxComputeRacks property: Maximum number of compute racks available for this Network Fabric SKU. + * Set the maxComputeRacks property: 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. * * @param maxComputeRacks the maxComputeRacks value to set. * @return the NetworkFabricSkuInner object itself. @@ -81,34 +85,48 @@ public NetworkFabricSkuInner withMaxComputeRacks(Integer maxComputeRacks) { } /** - * Get the minSupportedVer property: Minimum supported version. + * Get the maximumServerCount property: Maximum number of servers available for this Network Fabric SKU. * - * @return the minSupportedVer value. + * @return the maximumServerCount value. */ - public String minSupportedVer() { - return this.innerProperties() == null ? null : this.innerProperties().minSupportedVer(); + public Integer maximumServerCount() { + return this.innerProperties() == null ? null : this.innerProperties().maximumServerCount(); } /** - * Get the maxSupportedVer property: Maximum supported version. + * Set the maximumServerCount property: Maximum number of servers available for this Network Fabric SKU. * - * @return the maxSupportedVer value. + * @param maximumServerCount the maximumServerCount value to set. + * @return the NetworkFabricSkuInner object itself. + */ + public NetworkFabricSkuInner withMaximumServerCount(Integer maximumServerCount) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricSkuProperties(); + } + this.innerProperties().withMaximumServerCount(maximumServerCount); + return this; + } + + /** + * Get the supportedVersions property: List of supported Network Fabric SKU versions. + * + * @return the supportedVersions value. */ - public String maxSupportedVer() { - return this.innerProperties() == null ? null : this.innerProperties().maxSupportedVer(); + public List supportedVersions() { + return this.innerProperties() == null ? null : this.innerProperties().supportedVersions(); } /** - * Get the detailsUri property: The URI gives full details of sku. + * Get the details property: URL providing detailed configuration of the fabric SKU. * - * @return the detailsUri value. + * @return the details value. */ - public String detailsUri() { - return this.innerProperties() == null ? null : this.innerProperties().detailsUri(); + public String details() { + return this.innerProperties() == null ? null : this.innerProperties().details(); } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuProperties.java index e7eb14029de3d..5e967baa16618 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkFabricSkuProperties.java @@ -5,44 +5,47 @@ package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.models.FabricSkuType; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; -/** NetworkFabricSkuProperties define the resource properties. */ +/** Network Fabric SKU Properties define properties of the resource. */ @Fluent public final class NetworkFabricSkuProperties { /* - * Type of Network Fabric Sku. + * Type of Network Fabric SKU. */ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; + private FabricSkuType type; /* - * Maximum number of compute racks available for this 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. */ @JsonProperty(value = "maxComputeRacks") private Integer maxComputeRacks; /* - * Minimum supported version. + * Maximum number of servers available for this Network Fabric SKU. */ - @JsonProperty(value = "minSupportedVer", access = JsonProperty.Access.WRITE_ONLY) - private String minSupportedVer; + @JsonProperty(value = "maximumServerCount") + private Integer maximumServerCount; /* - * Maximum supported version. + * List of supported Network Fabric SKU versions. */ - @JsonProperty(value = "maxSupportedVer", access = JsonProperty.Access.WRITE_ONLY) - private String maxSupportedVer; + @JsonProperty(value = "supportedVersions", access = JsonProperty.Access.WRITE_ONLY) + private List supportedVersions; /* - * The URI gives full details of sku. + * URL providing detailed configuration of the fabric SKU. */ - @JsonProperty(value = "detailsUri", access = JsonProperty.Access.WRITE_ONLY) - private String detailsUri; + @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) + private String details; /* - * Gets the provisioning state of the resource. + * Provisioning state of the resource. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; @@ -52,16 +55,17 @@ public NetworkFabricSkuProperties() { } /** - * Get the type property: Type of Network Fabric Sku. + * Get the type property: Type of Network Fabric SKU. * * @return the type value. */ - public String type() { + public FabricSkuType type() { return this.type; } /** - * Get the maxComputeRacks property: Maximum number of compute racks available for this Network Fabric SKU. + * Get the maxComputeRacks property: 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. * * @return the maxComputeRacks value. */ @@ -70,7 +74,8 @@ public Integer maxComputeRacks() { } /** - * Set the maxComputeRacks property: Maximum number of compute racks available for this Network Fabric SKU. + * Set the maxComputeRacks property: 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. * * @param maxComputeRacks the maxComputeRacks value to set. * @return the NetworkFabricSkuProperties object itself. @@ -81,34 +86,45 @@ public NetworkFabricSkuProperties withMaxComputeRacks(Integer maxComputeRacks) { } /** - * Get the minSupportedVer property: Minimum supported version. + * Get the maximumServerCount property: Maximum number of servers available for this Network Fabric SKU. * - * @return the minSupportedVer value. + * @return the maximumServerCount value. */ - public String minSupportedVer() { - return this.minSupportedVer; + public Integer maximumServerCount() { + return this.maximumServerCount; } /** - * Get the maxSupportedVer property: Maximum supported version. + * Set the maximumServerCount property: Maximum number of servers available for this Network Fabric SKU. * - * @return the maxSupportedVer value. + * @param maximumServerCount the maximumServerCount value to set. + * @return the NetworkFabricSkuProperties object itself. + */ + public NetworkFabricSkuProperties withMaximumServerCount(Integer maximumServerCount) { + this.maximumServerCount = maximumServerCount; + return this; + } + + /** + * Get the supportedVersions property: List of supported Network Fabric SKU versions. + * + * @return the supportedVersions value. */ - public String maxSupportedVer() { - return this.maxSupportedVer; + public List supportedVersions() { + return this.supportedVersions; } /** - * Get the detailsUri property: The URI gives full details of sku. + * Get the details property: URL providing detailed configuration of the fabric SKU. * - * @return the detailsUri value. + * @return the details value. */ - public String detailsUri() { - return this.detailsUri; + public String details() { + return this.details; } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfaceInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfaceInner.java index ae23193f61060..7501e32037a86 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfaceInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfaceInner.java @@ -8,7 +8,7 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.InterfaceType; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; @@ -51,7 +51,7 @@ public SystemData systemData() { } /** - * Get the physicalIdentifier property: physicalIdentifier of the network interface. + * Get the physicalIdentifier property: Physical Identifier of the network interface. * * @return the physicalIdentifier value. */ @@ -60,25 +60,7 @@ public String physicalIdentifier() { } /** - * Get the administrativeState property: administrativeState of the network interface. Example: Enabled | Disabled. - * - * @return the administrativeState value. - */ - public EnabledDisabledState administrativeState() { - return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); - } - - /** - * Get the provisioningState property: Gets the provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the connectedTo property: The arm resource id of the interface or compute server its connected to. + * Get the connectedTo property: The ARM resource id of the interface or compute server its connected to. * * @return the connectedTo value. */ @@ -96,7 +78,7 @@ public InterfaceType interfaceType() { } /** - * Get the ipv4Address property: ipv4Address. + * Get the ipv4Address property: IPv4Address of the interface. * * @return the ipv4Address value. */ @@ -105,7 +87,7 @@ public String ipv4Address() { } /** - * Get the ipv6Address property: ipv6Address. + * Get the ipv6Address property: IPv6Address of the interface. * * @return the ipv6Address value. */ @@ -113,6 +95,24 @@ public String ipv6Address() { return this.innerProperties() == null ? null : this.innerProperties().ipv6Address(); } + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } + /** * Get the annotation property: Switch configuration description. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfaceProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfaceProperties.java index eeb1c5ecc2a2c..a9657ae29bd3c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfaceProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkInterfaceProperties.java @@ -5,35 +5,23 @@ package com.azure.resourcemanager.managednetworkfabric.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; import com.azure.resourcemanager.managednetworkfabric.models.InterfaceType; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** NetworkInterfaceProperties define the resource properties. */ +/** Network Interface Properties defines the properties of the resource. */ @Fluent public final class NetworkInterfaceProperties extends AnnotationResource { /* - * physicalIdentifier of the network interface. + * Physical Identifier of the network interface. */ @JsonProperty(value = "physicalIdentifier", access = JsonProperty.Access.WRITE_ONLY) private String physicalIdentifier; /* - * administrativeState of the network interface. Example: Enabled | Disabled. - */ - @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) - private EnabledDisabledState administrativeState; - - /* - * Gets the provisioning state of the resource. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * The arm resource id of the interface or compute server its connected to. + * The ARM resource id of the interface or compute server its connected to. */ @JsonProperty(value = "connectedTo", access = JsonProperty.Access.WRITE_ONLY) private String connectedTo; @@ -45,23 +33,35 @@ public final class NetworkInterfaceProperties extends AnnotationResource { private InterfaceType interfaceType; /* - * ipv4Address. + * IPv4Address of the interface. */ @JsonProperty(value = "ipv4Address", access = JsonProperty.Access.WRITE_ONLY) private String ipv4Address; /* - * ipv6Address. + * IPv6Address of the interface. */ @JsonProperty(value = "ipv6Address", access = JsonProperty.Access.WRITE_ONLY) private String ipv6Address; + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Administrative state of the resource. + */ + @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) + private AdministrativeState administrativeState; + /** Creates an instance of NetworkInterfaceProperties class. */ public NetworkInterfaceProperties() { } /** - * Get the physicalIdentifier property: physicalIdentifier of the network interface. + * Get the physicalIdentifier property: Physical Identifier of the network interface. * * @return the physicalIdentifier value. */ @@ -70,25 +70,7 @@ public String physicalIdentifier() { } /** - * Get the administrativeState property: administrativeState of the network interface. Example: Enabled | Disabled. - * - * @return the administrativeState value. - */ - public EnabledDisabledState administrativeState() { - return this.administrativeState; - } - - /** - * Get the provisioningState property: Gets the provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the connectedTo property: The arm resource id of the interface or compute server its connected to. + * Get the connectedTo property: The ARM resource id of the interface or compute server its connected to. * * @return the connectedTo value. */ @@ -106,7 +88,7 @@ public InterfaceType interfaceType() { } /** - * Get the ipv4Address property: ipv4Address. + * Get the ipv4Address property: IPv4Address of the interface. * * @return the ipv4Address value. */ @@ -115,7 +97,7 @@ public String ipv4Address() { } /** - * Get the ipv6Address property: ipv6Address. + * Get the ipv6Address property: IPv6Address of the interface. * * @return the ipv6Address value. */ @@ -123,6 +105,24 @@ public String ipv6Address() { return this.ipv6Address; } + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; + } + /** {@inheritDoc} */ @Override public NetworkInterfaceProperties withAnnotation(String annotation) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerInner.java new file mode 100644 index 0000000000000..e6a3151937072 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerInner.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** The NetworkPacketBroker resource definition. */ +@Fluent +public final class NetworkPacketBrokerInner extends Resource { + /* + * Resource properties. + */ + @JsonProperty(value = "properties", required = true) + private NetworkPacketBrokerProperties innerProperties = new NetworkPacketBrokerProperties(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of NetworkPacketBrokerInner class. */ + public NetworkPacketBrokerInner() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private NetworkPacketBrokerProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public NetworkPacketBrokerInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkPacketBrokerInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the networkFabricId property: ARM resource ID of the Network Fabric. + * + * @return the networkFabricId value. + */ + public String networkFabricId() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricId(); + } + + /** + * Set the networkFabricId property: ARM resource ID of the Network Fabric. + * + * @param networkFabricId the networkFabricId value to set. + * @return the NetworkPacketBrokerInner object itself. + */ + public NetworkPacketBrokerInner withNetworkFabricId(String networkFabricId) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkPacketBrokerProperties(); + } + this.innerProperties().withNetworkFabricId(networkFabricId); + return this; + } + + /** + * Get the networkDeviceIds property: List of ARM resource IDs of Network Devices [NPB]. + * + * @return the networkDeviceIds value. + */ + public List networkDeviceIds() { + return this.innerProperties() == null ? null : this.innerProperties().networkDeviceIds(); + } + + /** + * Get the sourceInterfaceIds property: List of network interfaces across NPB devices that are used to mirror source + * traffic. + * + * @return the sourceInterfaceIds value. + */ + public List sourceInterfaceIds() { + return this.innerProperties() == null ? null : this.innerProperties().sourceInterfaceIds(); + } + + /** + * Get the networkTapIds property: List of network Tap IDs configured on NPB. + * + * @return the networkTapIds value. + */ + public List networkTapIds() { + return this.innerProperties() == null ? null : this.innerProperties().networkTapIds(); + } + + /** + * Get the neighborGroupIds property: List of neighbor group IDs configured on NPB. + * + * @return the neighborGroupIds value. + */ + public List neighborGroupIds() { + return this.innerProperties() == null ? null : this.innerProperties().neighborGroupIds(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model NetworkPacketBrokerInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkPacketBrokerInner.class); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerProperties.java new file mode 100644 index 0000000000000..c443491a07107 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkPacketBrokerProperties.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Network Packet Broker Properties defines the properties of the resource. */ +@Fluent +public final class NetworkPacketBrokerProperties { + /* + * ARM resource ID of the Network Fabric. + */ + @JsonProperty(value = "networkFabricId", required = true) + private String networkFabricId; + + /* + * List of ARM resource IDs of Network Devices [NPB]. + */ + @JsonProperty(value = "networkDeviceIds", access = JsonProperty.Access.WRITE_ONLY) + private List networkDeviceIds; + + /* + * List of network interfaces across NPB devices that are used to mirror source traffic. + */ + @JsonProperty(value = "sourceInterfaceIds", access = JsonProperty.Access.WRITE_ONLY) + private List sourceInterfaceIds; + + /* + * List of network Tap IDs configured on NPB. + */ + @JsonProperty(value = "networkTapIds", access = JsonProperty.Access.WRITE_ONLY) + private List networkTapIds; + + /* + * List of neighbor group IDs configured on NPB. + */ + @JsonProperty(value = "neighborGroupIds", access = JsonProperty.Access.WRITE_ONLY) + private List neighborGroupIds; + + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** Creates an instance of NetworkPacketBrokerProperties class. */ + public NetworkPacketBrokerProperties() { + } + + /** + * Get the networkFabricId property: ARM resource ID of the Network Fabric. + * + * @return the networkFabricId value. + */ + public String networkFabricId() { + return this.networkFabricId; + } + + /** + * Set the networkFabricId property: ARM resource ID of the Network Fabric. + * + * @param networkFabricId the networkFabricId value to set. + * @return the NetworkPacketBrokerProperties object itself. + */ + public NetworkPacketBrokerProperties withNetworkFabricId(String networkFabricId) { + this.networkFabricId = networkFabricId; + return this; + } + + /** + * Get the networkDeviceIds property: List of ARM resource IDs of Network Devices [NPB]. + * + * @return the networkDeviceIds value. + */ + public List networkDeviceIds() { + return this.networkDeviceIds; + } + + /** + * Get the sourceInterfaceIds property: List of network interfaces across NPB devices that are used to mirror source + * traffic. + * + * @return the sourceInterfaceIds value. + */ + public List sourceInterfaceIds() { + return this.sourceInterfaceIds; + } + + /** + * Get the networkTapIds property: List of network Tap IDs configured on NPB. + * + * @return the networkTapIds value. + */ + public List networkTapIds() { + return this.networkTapIds; + } + + /** + * Get the neighborGroupIds property: List of neighbor group IDs configured on NPB. + * + * @return the neighborGroupIds value. + */ + public List neighborGroupIds() { + return this.neighborGroupIds; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (networkFabricId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property networkFabricId in model NetworkPacketBrokerProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkPacketBrokerProperties.class); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackInner.java index 474a09dcf33c8..71da69b1f2774 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackInner.java @@ -8,12 +8,13 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; -/** The NetworkRack resource definition. */ +/** The Network Rack resource definition. */ @Fluent public final class NetworkRackInner extends Resource { /* @@ -65,30 +66,30 @@ public NetworkRackInner withTags(Map tags) { } /** - * Get the networkRackSku property: Network Rack SKU name. + * Get the networkRackType property: Network Rack SKU name. * - * @return the networkRackSku value. + * @return the networkRackType value. */ - public String networkRackSku() { - return this.innerProperties() == null ? null : this.innerProperties().networkRackSku(); + public NetworkRackType networkRackType() { + return this.innerProperties() == null ? null : this.innerProperties().networkRackType(); } /** - * Set the networkRackSku property: Network Rack SKU name. + * Set the networkRackType property: Network Rack SKU name. * - * @param networkRackSku the networkRackSku value to set. + * @param networkRackType the networkRackType value to set. * @return the NetworkRackInner object itself. */ - public NetworkRackInner withNetworkRackSku(String networkRackSku) { + public NetworkRackInner withNetworkRackType(NetworkRackType networkRackType) { if (this.innerProperties() == null) { this.innerProperties = new NetworkRackProperties(); } - this.innerProperties().withNetworkRackSku(networkRackSku); + this.innerProperties().withNetworkRackType(networkRackType); return this; } /** - * Get the networkFabricId property: Network Fabric ARM resource id. + * Get the networkFabricId property: ARM resource ID of the Network Fabric. * * @return the networkFabricId value. */ @@ -97,7 +98,7 @@ public String networkFabricId() { } /** - * Set the networkFabricId property: Network Fabric ARM resource id. + * Set the networkFabricId property: ARM resource ID of the Network Fabric. * * @param networkFabricId the networkFabricId value to set. * @return the NetworkRackInner object itself. @@ -111,7 +112,7 @@ public NetworkRackInner withNetworkFabricId(String networkFabricId) { } /** - * Get the networkDevices property: List of network device ARM resource ids. + * Get the networkDevices property: List of network device ARM resource IDs. * * @return the networkDevices value. */ @@ -120,7 +121,7 @@ public List networkDevices() { } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackProperties.java index d7fb339fb4c02..9156b91caa60a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackProperties.java @@ -7,33 +7,34 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NetworkRackProperties define the resource properties. */ +/** Network Rack Properties defines the properties of the resource. */ @Fluent public final class NetworkRackProperties extends AnnotationResource { /* * Network Rack SKU name. */ - @JsonProperty(value = "networkRackSku", required = true) - private String networkRackSku; + @JsonProperty(value = "networkRackType") + private NetworkRackType networkRackType; /* - * Network Fabric ARM resource id. + * ARM resource ID of the Network Fabric. */ @JsonProperty(value = "networkFabricId", required = true) private String networkFabricId; /* - * List of network device ARM resource ids. + * List of network device ARM resource IDs. */ @JsonProperty(value = "networkDevices", access = JsonProperty.Access.WRITE_ONLY) private List networkDevices; /* - * Gets the provisioning state of the resource. + * Provisioning state of the resource. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; @@ -43,27 +44,27 @@ public NetworkRackProperties() { } /** - * Get the networkRackSku property: Network Rack SKU name. + * Get the networkRackType property: Network Rack SKU name. * - * @return the networkRackSku value. + * @return the networkRackType value. */ - public String networkRackSku() { - return this.networkRackSku; + public NetworkRackType networkRackType() { + return this.networkRackType; } /** - * Set the networkRackSku property: Network Rack SKU name. + * Set the networkRackType property: Network Rack SKU name. * - * @param networkRackSku the networkRackSku value to set. + * @param networkRackType the networkRackType value to set. * @return the NetworkRackProperties object itself. */ - public NetworkRackProperties withNetworkRackSku(String networkRackSku) { - this.networkRackSku = networkRackSku; + public NetworkRackProperties withNetworkRackType(NetworkRackType networkRackType) { + this.networkRackType = networkRackType; return this; } /** - * Get the networkFabricId property: Network Fabric ARM resource id. + * Get the networkFabricId property: ARM resource ID of the Network Fabric. * * @return the networkFabricId value. */ @@ -72,7 +73,7 @@ public String networkFabricId() { } /** - * Set the networkFabricId property: Network Fabric ARM resource id. + * Set the networkFabricId property: ARM resource ID of the Network Fabric. * * @param networkFabricId the networkFabricId value to set. * @return the NetworkRackProperties object itself. @@ -83,7 +84,7 @@ public NetworkRackProperties withNetworkFabricId(String networkFabricId) { } /** - * Get the networkDevices property: List of network device ARM resource ids. + * Get the networkDevices property: List of network device ARM resource IDs. * * @return the networkDevices value. */ @@ -92,7 +93,7 @@ public List networkDevices() { } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ @@ -115,12 +116,6 @@ public NetworkRackProperties withAnnotation(String annotation) { @Override public void validate() { super.validate(); - if (networkRackSku() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property networkRackSku in model NetworkRackProperties")); - } if (networkFabricId() == null) { throw LOGGER .logExceptionAsError( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackSkuInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackSkuInner.java deleted file mode 100644 index c30ff7f8539b5..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackSkuInner.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The NetworkRackSku resource definition. */ -@Fluent -public final class NetworkRackSkuInner extends ProxyResource { - /* - * Resource properties. - */ - @JsonProperty(value = "properties", required = true) - private NetworkRackSkuProperties innerProperties = new NetworkRackSkuProperties(); - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of NetworkRackSkuInner class. */ - public NetworkRackSkuInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private NetworkRackSkuProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the roleName property: The role of the Network Rack: Aggregate or Compute. - * - * @return the roleName value. - */ - public NetworkRackRoleName roleName() { - return this.innerProperties() == null ? null : this.innerProperties().roleName(); - } - - /** - * Set the roleName property: The role of the Network Rack: Aggregate or Compute. - * - * @param roleName the roleName value to set. - * @return the NetworkRackSkuInner object itself. - */ - public NetworkRackSkuInner withRoleName(NetworkRackRoleName roleName) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkRackSkuProperties(); - } - this.innerProperties().withRoleName(roleName); - return this; - } - - /** - * Get the maximumServerCount property: Maximum number of servers available for this SKU. - * - * @return the maximumServerCount value. - */ - public Integer maximumServerCount() { - return this.innerProperties() == null ? null : this.innerProperties().maximumServerCount(); - } - - /** - * Set the maximumServerCount property: Maximum number of servers available for this SKU. - * - * @param maximumServerCount the maximumServerCount value to set. - * @return the NetworkRackSkuInner object itself. - */ - public NetworkRackSkuInner withMaximumServerCount(Integer maximumServerCount) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkRackSkuProperties(); - } - this.innerProperties().withMaximumServerCount(maximumServerCount); - return this; - } - - /** - * Get the maximumStorageCount property: Maximum number of storage devices available for this SKU. - * - * @return the maximumStorageCount value. - */ - public Integer maximumStorageCount() { - return this.innerProperties() == null ? null : this.innerProperties().maximumStorageCount(); - } - - /** - * Set the maximumStorageCount property: Maximum number of storage devices available for this SKU. - * - * @param maximumStorageCount the maximumStorageCount value to set. - * @return the NetworkRackSkuInner object itself. - */ - public NetworkRackSkuInner withMaximumStorageCount(Integer maximumStorageCount) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkRackSkuProperties(); - } - this.innerProperties().withMaximumStorageCount(maximumStorageCount); - return this; - } - - /** - * Get the maximumUplinks property: Maximum number of network uplinks available for this SKU. - * - * @return the maximumUplinks value. - */ - public Integer maximumUplinks() { - return this.innerProperties() == null ? null : this.innerProperties().maximumUplinks(); - } - - /** - * Set the maximumUplinks property: Maximum number of network uplinks available for this SKU. - * - * @param maximumUplinks the maximumUplinks value to set. - * @return the NetworkRackSkuInner object itself. - */ - public NetworkRackSkuInner withMaximumUplinks(Integer maximumUplinks) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkRackSkuProperties(); - } - this.innerProperties().withMaximumUplinks(maximumUplinks); - return this; - } - - /** - * Get the networkDevices property: List of network device properties / role for the Network Rack. - * - * @return the networkDevices value. - */ - public List networkDevices() { - return this.innerProperties() == null ? null : this.innerProperties().networkDevices(); - } - - /** - * Set the networkDevices property: List of network device properties / role for the Network Rack. - * - * @param networkDevices the networkDevices value to set. - * @return the NetworkRackSkuInner object itself. - */ - public NetworkRackSkuInner withNetworkDevices(List networkDevices) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkRackSkuProperties(); - } - this.innerProperties().withNetworkDevices(networkDevices); - return this; - } - - /** - * Get the provisioningState property: Gets the provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerProperties in model NetworkRackSkuInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkRackSkuInner.class); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackSkuProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackSkuProperties.java deleted file mode 100644 index c7c3cc6ac62fc..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkRackSkuProperties.java +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** NetworkRackSkuProperties define the resource properties. */ -@Fluent -public final class NetworkRackSkuProperties { - /* - * The role of the Network Rack: Aggregate or Compute. - */ - @JsonProperty(value = "roleName", required = true) - private NetworkRackRoleName roleName; - - /* - * Maximum number of servers available for this SKU. - */ - @JsonProperty(value = "maximumServerCount") - private Integer maximumServerCount; - - /* - * Maximum number of storage devices available for this SKU. - */ - @JsonProperty(value = "maximumStorageCount") - private Integer maximumStorageCount; - - /* - * Maximum number of network uplinks available for this SKU. - */ - @JsonProperty(value = "maximumUplinks") - private Integer maximumUplinks; - - /* - * List of network device properties / role for the Network Rack. - */ - @JsonProperty(value = "networkDevices") - private List networkDevices; - - /* - * Gets the provisioning state of the resource. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /** Creates an instance of NetworkRackSkuProperties class. */ - public NetworkRackSkuProperties() { - } - - /** - * Get the roleName property: The role of the Network Rack: Aggregate or Compute. - * - * @return the roleName value. - */ - public NetworkRackRoleName roleName() { - return this.roleName; - } - - /** - * Set the roleName property: The role of the Network Rack: Aggregate or Compute. - * - * @param roleName the roleName value to set. - * @return the NetworkRackSkuProperties object itself. - */ - public NetworkRackSkuProperties withRoleName(NetworkRackRoleName roleName) { - this.roleName = roleName; - return this; - } - - /** - * Get the maximumServerCount property: Maximum number of servers available for this SKU. - * - * @return the maximumServerCount value. - */ - public Integer maximumServerCount() { - return this.maximumServerCount; - } - - /** - * Set the maximumServerCount property: Maximum number of servers available for this SKU. - * - * @param maximumServerCount the maximumServerCount value to set. - * @return the NetworkRackSkuProperties object itself. - */ - public NetworkRackSkuProperties withMaximumServerCount(Integer maximumServerCount) { - this.maximumServerCount = maximumServerCount; - return this; - } - - /** - * Get the maximumStorageCount property: Maximum number of storage devices available for this SKU. - * - * @return the maximumStorageCount value. - */ - public Integer maximumStorageCount() { - return this.maximumStorageCount; - } - - /** - * Set the maximumStorageCount property: Maximum number of storage devices available for this SKU. - * - * @param maximumStorageCount the maximumStorageCount value to set. - * @return the NetworkRackSkuProperties object itself. - */ - public NetworkRackSkuProperties withMaximumStorageCount(Integer maximumStorageCount) { - this.maximumStorageCount = maximumStorageCount; - return this; - } - - /** - * Get the maximumUplinks property: Maximum number of network uplinks available for this SKU. - * - * @return the maximumUplinks value. - */ - public Integer maximumUplinks() { - return this.maximumUplinks; - } - - /** - * Set the maximumUplinks property: Maximum number of network uplinks available for this SKU. - * - * @param maximumUplinks the maximumUplinks value to set. - * @return the NetworkRackSkuProperties object itself. - */ - public NetworkRackSkuProperties withMaximumUplinks(Integer maximumUplinks) { - this.maximumUplinks = maximumUplinks; - return this; - } - - /** - * Get the networkDevices property: List of network device properties / role for the Network Rack. - * - * @return the networkDevices value. - */ - public List networkDevices() { - return this.networkDevices; - } - - /** - * Set the networkDevices property: List of network device properties / role for the Network Rack. - * - * @param networkDevices the networkDevices value to set. - * @return the NetworkRackSkuProperties object itself. - */ - public NetworkRackSkuProperties withNetworkDevices(List networkDevices) { - this.networkDevices = networkDevices; - return this; - } - - /** - * Get the provisioningState property: Gets the provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (roleName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property roleName in model NetworkRackSkuProperties")); - } - if (networkDevices() != null) { - networkDevices().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NetworkRackSkuProperties.class); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapInner.java new file mode 100644 index 0000000000000..b9baf5a7ecb91 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapInner.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** The Network Tap resource definition. */ +@Fluent +public final class NetworkTapInner extends Resource { + /* + * Resource properties. + */ + @JsonProperty(value = "properties", required = true) + private NetworkTapProperties innerProperties = new NetworkTapProperties(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of NetworkTapInner class. */ + public NetworkTapInner() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private NetworkTapProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the networkPacketBrokerId property: ARM resource ID of the Network Packet Broker. + * + * @return the networkPacketBrokerId value. + */ + public String networkPacketBrokerId() { + return this.innerProperties() == null ? null : this.innerProperties().networkPacketBrokerId(); + } + + /** + * Set the networkPacketBrokerId property: ARM resource ID of the Network Packet Broker. + * + * @param networkPacketBrokerId the networkPacketBrokerId value to set. + * @return the NetworkTapInner object itself. + */ + public NetworkTapInner withNetworkPacketBrokerId(String networkPacketBrokerId) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapProperties(); + } + this.innerProperties().withNetworkPacketBrokerId(networkPacketBrokerId); + return this; + } + + /** + * Get the sourceTapRuleId property: Source Tap Rule Id. ARM Resource ID of the Network Tap Rule. + * + * @return the sourceTapRuleId value. + */ + public String sourceTapRuleId() { + return this.innerProperties() == null ? null : this.innerProperties().sourceTapRuleId(); + } + + /** + * Get the destinations property: List of destinations to send the filter traffic. + * + * @return the destinations value. + */ + public List destinations() { + return this.innerProperties() == null ? null : this.innerProperties().destinations(); + } + + /** + * Set the destinations property: List of destinations to send the filter traffic. + * + * @param destinations the destinations value to set. + * @return the NetworkTapInner object itself. + */ + public NetworkTapInner withDestinations(List destinations) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapProperties(); + } + this.innerProperties().withDestinations(destinations); + return this; + } + + /** + * Get the pollingType property: Polling type. + * + * @return the pollingType value. + */ + public PollingType pollingType() { + return this.innerProperties() == null ? null : this.innerProperties().pollingType(); + } + + /** + * Set the pollingType property: Polling type. + * + * @param pollingType the pollingType value to set. + * @return the NetworkTapInner object itself. + */ + public NetworkTapInner withPollingType(PollingType pollingType) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapProperties(); + } + this.innerProperties().withPollingType(pollingType); + return this; + } + + /** + * Get the configurationState property: Gets the configurations state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * Get the provisioningState property: 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. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the administrativeState property: Administrative state of the resource. Example -Enabled/Disabled. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkTapInner object itself. + */ + public NetworkTapInner withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model NetworkTapInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkTapInner.class); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapPatchableParameters.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapPatchableParameters.java new file mode 100644 index 0000000000000..51c494a53f1f8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapPatchableParameters.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The Network Tap resource patch definition. */ +@Fluent +public final class NetworkTapPatchableParameters extends AnnotationResource { + /* + * Polling type. + */ + @JsonProperty(value = "pollingType") + private PollingType pollingType; + + /* + * List of destination properties to send the filter traffic. + */ + @JsonProperty(value = "destinations") + private List destinations; + + /** Creates an instance of NetworkTapPatchableParameters class. */ + public NetworkTapPatchableParameters() { + } + + /** + * Get the pollingType property: Polling type. + * + * @return the pollingType value. + */ + public PollingType pollingType() { + return this.pollingType; + } + + /** + * Set the pollingType property: Polling type. + * + * @param pollingType the pollingType value to set. + * @return the NetworkTapPatchableParameters object itself. + */ + public NetworkTapPatchableParameters withPollingType(PollingType pollingType) { + this.pollingType = pollingType; + return this; + } + + /** + * Get the destinations property: List of destination properties to send the filter traffic. + * + * @return the destinations value. + */ + public List destinations() { + return this.destinations; + } + + /** + * Set the destinations property: List of destination properties to send the filter traffic. + * + * @param destinations the destinations value to set. + * @return the NetworkTapPatchableParameters object itself. + */ + public NetworkTapPatchableParameters withDestinations( + List destinations) { + this.destinations = destinations; + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapPatchableParameters withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (destinations() != null) { + destinations().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapProperties.java new file mode 100644 index 0000000000000..15b0c9d8ad0c5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapProperties.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Network Tap Properties defines the properties of the resource. */ +@Fluent +public final class NetworkTapProperties extends AnnotationResource { + /* + * ARM resource ID of the Network Packet Broker. + */ + @JsonProperty(value = "networkPacketBrokerId", required = true) + private String networkPacketBrokerId; + + /* + * Source Tap Rule Id. ARM Resource ID of the Network Tap Rule. + */ + @JsonProperty(value = "sourceTapRuleId", access = JsonProperty.Access.WRITE_ONLY) + private String sourceTapRuleId; + + /* + * List of destinations to send the filter traffic. + */ + @JsonProperty(value = "destinations", required = true) + private List destinations; + + /* + * Polling type. + */ + @JsonProperty(value = "pollingType") + private PollingType pollingType; + + /* + * Gets the configurations state of the resource. + */ + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; + + /* + * 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. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Administrative state of the resource. Example -Enabled/Disabled + */ + @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) + private AdministrativeState administrativeState; + + /** Creates an instance of NetworkTapProperties class. */ + public NetworkTapProperties() { + } + + /** + * Get the networkPacketBrokerId property: ARM resource ID of the Network Packet Broker. + * + * @return the networkPacketBrokerId value. + */ + public String networkPacketBrokerId() { + return this.networkPacketBrokerId; + } + + /** + * Set the networkPacketBrokerId property: ARM resource ID of the Network Packet Broker. + * + * @param networkPacketBrokerId the networkPacketBrokerId value to set. + * @return the NetworkTapProperties object itself. + */ + public NetworkTapProperties withNetworkPacketBrokerId(String networkPacketBrokerId) { + this.networkPacketBrokerId = networkPacketBrokerId; + return this; + } + + /** + * Get the sourceTapRuleId property: Source Tap Rule Id. ARM Resource ID of the Network Tap Rule. + * + * @return the sourceTapRuleId value. + */ + public String sourceTapRuleId() { + return this.sourceTapRuleId; + } + + /** + * Get the destinations property: List of destinations to send the filter traffic. + * + * @return the destinations value. + */ + public List destinations() { + return this.destinations; + } + + /** + * Set the destinations property: List of destinations to send the filter traffic. + * + * @param destinations the destinations value to set. + * @return the NetworkTapProperties object itself. + */ + public NetworkTapProperties withDestinations(List destinations) { + this.destinations = destinations; + return this; + } + + /** + * Get the pollingType property: Polling type. + * + * @return the pollingType value. + */ + public PollingType pollingType() { + return this.pollingType; + } + + /** + * Set the pollingType property: Polling type. + * + * @param pollingType the pollingType value to set. + * @return the NetworkTapProperties object itself. + */ + public NetworkTapProperties withPollingType(PollingType pollingType) { + this.pollingType = pollingType; + return this; + } + + /** + * Get the configurationState property: Gets the configurations state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the provisioningState property: 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. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. Example -Enabled/Disabled. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (networkPacketBrokerId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property networkPacketBrokerId in model NetworkTapProperties")); + } + if (destinations() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property destinations in model NetworkTapProperties")); + } else { + destinations().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkTapProperties.class); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleInner.java new file mode 100644 index 0000000000000..dd7b831429fd3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleInner.java @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** The NetworkTapRule resource definition. */ +@Fluent +public final class NetworkTapRuleInner extends Resource { + /* + * Resource properties. + */ + @JsonProperty(value = "properties", required = true) + private NetworkTapRuleProperties innerProperties = new NetworkTapRuleProperties(); + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of NetworkTapRuleInner class. */ + public NetworkTapRuleInner() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private NetworkTapRuleProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapRuleInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapRuleInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the networkTapId property: The ARM resource Id of the NetworkTap. + * + * @return the networkTapId value. + */ + public String networkTapId() { + return this.innerProperties() == null ? null : this.innerProperties().networkTapId(); + } + + /** + * Get the pollingIntervalInSeconds property: Polling interval in seconds. + * + * @return the pollingIntervalInSeconds value. + */ + public PollingIntervalInSeconds pollingIntervalInSeconds() { + return this.innerProperties() == null ? null : this.innerProperties().pollingIntervalInSeconds(); + } + + /** + * Set the pollingIntervalInSeconds property: Polling interval in seconds. + * + * @param pollingIntervalInSeconds the pollingIntervalInSeconds value to set. + * @return the NetworkTapRuleInner object itself. + */ + public NetworkTapRuleInner withPollingIntervalInSeconds(PollingIntervalInSeconds pollingIntervalInSeconds) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapRuleProperties(); + } + this.innerProperties().withPollingIntervalInSeconds(pollingIntervalInSeconds); + return this; + } + + /** + * Get the lastSyncedTime property: The last sync timestamp. + * + * @return the lastSyncedTime value. + */ + public OffsetDateTime lastSyncedTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastSyncedTime(); + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } + + /** + * Get the configurationType property: Input method to configure Network Tap Rule. + * + * @return the configurationType value. + */ + public ConfigurationType configurationType() { + return this.innerProperties() == null ? null : this.innerProperties().configurationType(); + } + + /** + * Set the configurationType property: Input method to configure Network Tap Rule. + * + * @param configurationType the configurationType value to set. + * @return the NetworkTapRuleInner object itself. + */ + public NetworkTapRuleInner withConfigurationType(ConfigurationType configurationType) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapRuleProperties(); + } + this.innerProperties().withConfigurationType(configurationType); + return this; + } + + /** + * Get the tapRulesUrl property: Network Tap Rules file URL. + * + * @return the tapRulesUrl value. + */ + public String tapRulesUrl() { + return this.innerProperties() == null ? null : this.innerProperties().tapRulesUrl(); + } + + /** + * Set the tapRulesUrl property: Network Tap Rules file URL. + * + * @param tapRulesUrl the tapRulesUrl value to set. + * @return the NetworkTapRuleInner object itself. + */ + public NetworkTapRuleInner withTapRulesUrl(String tapRulesUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapRuleProperties(); + } + this.innerProperties().withTapRulesUrl(tapRulesUrl); + return this; + } + + /** + * Get the matchConfigurations property: List of match configurations. + * + * @return the matchConfigurations value. + */ + public List matchConfigurations() { + return this.innerProperties() == null ? null : this.innerProperties().matchConfigurations(); + } + + /** + * Set the matchConfigurations property: List of match configurations. + * + * @param matchConfigurations the matchConfigurations value to set. + * @return the NetworkTapRuleInner object itself. + */ + public NetworkTapRuleInner withMatchConfigurations(List matchConfigurations) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapRuleProperties(); + } + this.innerProperties().withMatchConfigurations(matchConfigurations); + return this; + } + + /** + * Get the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @return the dynamicMatchConfigurations value. + */ + public List dynamicMatchConfigurations() { + return this.innerProperties() == null ? null : this.innerProperties().dynamicMatchConfigurations(); + } + + /** + * Set the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @param dynamicMatchConfigurations the dynamicMatchConfigurations value to set. + * @return the NetworkTapRuleInner object itself. + */ + public NetworkTapRuleInner withDynamicMatchConfigurations( + List dynamicMatchConfigurations) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapRuleProperties(); + } + this.innerProperties().withDynamicMatchConfigurations(dynamicMatchConfigurations); + return this; + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkTapRuleInner object itself. + */ + public NetworkTapRuleInner withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapRuleProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model NetworkTapRuleInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkTapRuleInner.class); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRulePatchProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRulePatchProperties.java new file mode 100644 index 0000000000000..45bcc6eb01424 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRulePatchProperties.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Network Tap Rule Patch properties. */ +@Fluent +public final class NetworkTapRulePatchProperties extends AnnotationResource { + /* + * Input method to configure Network Tap Rule. + */ + @JsonProperty(value = "configurationType") + private ConfigurationType configurationType; + + /* + * Network Tap Rules file URL. + */ + @JsonProperty(value = "tapRulesUrl") + private String tapRulesUrl; + + /* + * List of match configurations. + */ + @JsonProperty(value = "matchConfigurations") + private List matchConfigurations; + + /* + * List of dynamic match configurations. + */ + @JsonProperty(value = "dynamicMatchConfigurations") + private List dynamicMatchConfigurations; + + /** Creates an instance of NetworkTapRulePatchProperties class. */ + public NetworkTapRulePatchProperties() { + } + + /** + * Get the configurationType property: Input method to configure Network Tap Rule. + * + * @return the configurationType value. + */ + public ConfigurationType configurationType() { + return this.configurationType; + } + + /** + * Set the configurationType property: Input method to configure Network Tap Rule. + * + * @param configurationType the configurationType value to set. + * @return the NetworkTapRulePatchProperties object itself. + */ + public NetworkTapRulePatchProperties withConfigurationType(ConfigurationType configurationType) { + this.configurationType = configurationType; + return this; + } + + /** + * Get the tapRulesUrl property: Network Tap Rules file URL. + * + * @return the tapRulesUrl value. + */ + public String tapRulesUrl() { + return this.tapRulesUrl; + } + + /** + * Set the tapRulesUrl property: Network Tap Rules file URL. + * + * @param tapRulesUrl the tapRulesUrl value to set. + * @return the NetworkTapRulePatchProperties object itself. + */ + public NetworkTapRulePatchProperties withTapRulesUrl(String tapRulesUrl) { + this.tapRulesUrl = tapRulesUrl; + return this; + } + + /** + * Get the matchConfigurations property: List of match configurations. + * + * @return the matchConfigurations value. + */ + public List matchConfigurations() { + return this.matchConfigurations; + } + + /** + * Set the matchConfigurations property: List of match configurations. + * + * @param matchConfigurations the matchConfigurations value to set. + * @return the NetworkTapRulePatchProperties object itself. + */ + public NetworkTapRulePatchProperties withMatchConfigurations( + List matchConfigurations) { + this.matchConfigurations = matchConfigurations; + return this; + } + + /** + * Get the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @return the dynamicMatchConfigurations value. + */ + public List dynamicMatchConfigurations() { + return this.dynamicMatchConfigurations; + } + + /** + * Set the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @param dynamicMatchConfigurations the dynamicMatchConfigurations value to set. + * @return the NetworkTapRulePatchProperties object itself. + */ + public NetworkTapRulePatchProperties withDynamicMatchConfigurations( + List dynamicMatchConfigurations) { + this.dynamicMatchConfigurations = dynamicMatchConfigurations; + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapRulePatchProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (matchConfigurations() != null) { + matchConfigurations().forEach(e -> e.validate()); + } + if (dynamicMatchConfigurations() != null) { + dynamicMatchConfigurations().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleProperties.java new file mode 100644 index 0000000000000..242806a2e9c64 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkTapRuleProperties.java @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Network Tap Rule Properties defines the resource properties. */ +@Fluent +public final class NetworkTapRuleProperties extends AnnotationResource { + /* + * The ARM resource Id of the NetworkTap. + */ + @JsonProperty(value = "networkTapId", access = JsonProperty.Access.WRITE_ONLY) + private String networkTapId; + + /* + * Polling interval in seconds. + */ + @JsonProperty(value = "pollingIntervalInSeconds") + private PollingIntervalInSeconds pollingIntervalInSeconds; + + /* + * The last sync timestamp. + */ + @JsonProperty(value = "lastSyncedTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastSyncedTime; + + /* + * Configuration state of the resource. + */ + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; + + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Administrative state of the resource. + */ + @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) + private AdministrativeState administrativeState; + + /* + * Input method to configure Network Tap Rule. + */ + @JsonProperty(value = "configurationType") + private ConfigurationType configurationType; + + /* + * Network Tap Rules file URL. + */ + @JsonProperty(value = "tapRulesUrl") + private String tapRulesUrl; + + /* + * List of match configurations. + */ + @JsonProperty(value = "matchConfigurations") + private List matchConfigurations; + + /* + * List of dynamic match configurations. + */ + @JsonProperty(value = "dynamicMatchConfigurations") + private List dynamicMatchConfigurations; + + /** Creates an instance of NetworkTapRuleProperties class. */ + public NetworkTapRuleProperties() { + } + + /** + * Get the networkTapId property: The ARM resource Id of the NetworkTap. + * + * @return the networkTapId value. + */ + public String networkTapId() { + return this.networkTapId; + } + + /** + * Get the pollingIntervalInSeconds property: Polling interval in seconds. + * + * @return the pollingIntervalInSeconds value. + */ + public PollingIntervalInSeconds pollingIntervalInSeconds() { + return this.pollingIntervalInSeconds; + } + + /** + * Set the pollingIntervalInSeconds property: Polling interval in seconds. + * + * @param pollingIntervalInSeconds the pollingIntervalInSeconds value to set. + * @return the NetworkTapRuleProperties object itself. + */ + public NetworkTapRuleProperties withPollingIntervalInSeconds(PollingIntervalInSeconds pollingIntervalInSeconds) { + this.pollingIntervalInSeconds = pollingIntervalInSeconds; + return this; + } + + /** + * Get the lastSyncedTime property: The last sync timestamp. + * + * @return the lastSyncedTime value. + */ + public OffsetDateTime lastSyncedTime() { + return this.lastSyncedTime; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Get the configurationType property: Input method to configure Network Tap Rule. + * + * @return the configurationType value. + */ + public ConfigurationType configurationType() { + return this.configurationType; + } + + /** + * Set the configurationType property: Input method to configure Network Tap Rule. + * + * @param configurationType the configurationType value to set. + * @return the NetworkTapRuleProperties object itself. + */ + public NetworkTapRuleProperties withConfigurationType(ConfigurationType configurationType) { + this.configurationType = configurationType; + return this; + } + + /** + * Get the tapRulesUrl property: Network Tap Rules file URL. + * + * @return the tapRulesUrl value. + */ + public String tapRulesUrl() { + return this.tapRulesUrl; + } + + /** + * Set the tapRulesUrl property: Network Tap Rules file URL. + * + * @param tapRulesUrl the tapRulesUrl value to set. + * @return the NetworkTapRuleProperties object itself. + */ + public NetworkTapRuleProperties withTapRulesUrl(String tapRulesUrl) { + this.tapRulesUrl = tapRulesUrl; + return this; + } + + /** + * Get the matchConfigurations property: List of match configurations. + * + * @return the matchConfigurations value. + */ + public List matchConfigurations() { + return this.matchConfigurations; + } + + /** + * Set the matchConfigurations property: List of match configurations. + * + * @param matchConfigurations the matchConfigurations value to set. + * @return the NetworkTapRuleProperties object itself. + */ + public NetworkTapRuleProperties withMatchConfigurations( + List matchConfigurations) { + this.matchConfigurations = matchConfigurations; + return this; + } + + /** + * Get the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @return the dynamicMatchConfigurations value. + */ + public List dynamicMatchConfigurations() { + return this.dynamicMatchConfigurations; + } + + /** + * Set the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @param dynamicMatchConfigurations the dynamicMatchConfigurations value to set. + * @return the NetworkTapRuleProperties object itself. + */ + public NetworkTapRuleProperties withDynamicMatchConfigurations( + List dynamicMatchConfigurations) { + this.dynamicMatchConfigurations = dynamicMatchConfigurations; + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapRuleProperties withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (matchConfigurations() != null) { + matchConfigurations().forEach(e -> e.validate()); + } + if (dynamicMatchConfigurations() != null) { + dynamicMatchConfigurations().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectInner.java index e4f449addb4b9..4a8947c98957e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectInner.java @@ -7,22 +7,28 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; import com.azure.resourcemanager.managednetworkfabric.models.NniType; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** The NetworkToNetworkInterconnect resource definition. */ +/** The Network To Network Interconnect resource definition. */ @Fluent public final class NetworkToNetworkInterconnectInner extends ProxyResource { /* * Resource properties. */ - @JsonProperty(value = "properties") - private NetworkToNetworkInterconnectProperties innerProperties; + @JsonProperty(value = "properties", required = true) + private NetworkToNetworkInterconnectProperties innerProperties = new NetworkToNetworkInterconnectProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -75,21 +81,12 @@ public NetworkToNetworkInterconnectInner withNniType(NniType nniType) { return this; } - /** - * Get the administrativeState property: Gets the administrativeState of the resource. Example -Enabled/Disabled. - * - * @return the administrativeState value. - */ - public EnabledDisabledState administrativeState() { - return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); - } - /** * Get the isManagementType property: Configuration to use NNI for Infrastructure Management. Example: True/False. * * @return the isManagementType value. */ - public BooleanEnumProperty isManagementType() { + public IsManagementType isManagementType() { return this.innerProperties() == null ? null : this.innerProperties().isManagementType(); } @@ -99,7 +96,7 @@ public BooleanEnumProperty isManagementType() { * @param isManagementType the isManagementType value to set. * @return the NetworkToNetworkInterconnectInner object itself. */ - public NetworkToNetworkInterconnectInner withIsManagementType(BooleanEnumProperty isManagementType) { + public NetworkToNetworkInterconnectInner withIsManagementType(IsManagementType isManagementType) { if (this.innerProperties() == null) { this.innerProperties = new NetworkToNetworkInterconnectProperties(); } @@ -108,7 +105,7 @@ public NetworkToNetworkInterconnectInner withIsManagementType(BooleanEnumPropert } /** - * Get the useOptionB property: Based on this parameter the layer2/layer3 is made as mandatory. Example: True/False. + * Get the useOptionB property: Based on this option layer3 parameters are mandatory. Example: True/False. * * @return the useOptionB value. */ @@ -117,7 +114,7 @@ public BooleanEnumProperty useOptionB() { } /** - * Set the useOptionB property: Based on this parameter the layer2/layer3 is made as mandatory. Example: True/False. + * Set the useOptionB property: Based on this option layer3 parameters are mandatory. Example: True/False. * * @param useOptionB the useOptionB value to set. * @return the NetworkToNetworkInterconnectInner object itself. @@ -131,7 +128,7 @@ public NetworkToNetworkInterconnectInner withUseOptionB(BooleanEnumProperty useO } /** - * Get the layer2Configuration property: Common properties for Layer2Configuration. + * Get the layer2Configuration property: Common properties for Layer2 Configuration. * * @return the layer2Configuration value. */ @@ -140,7 +137,7 @@ public Layer2Configuration layer2Configuration() { } /** - * Set the layer2Configuration property: Common properties for Layer2Configuration. + * Set the layer2Configuration property: Common properties for Layer2 Configuration. * * @param layer2Configuration the layer2Configuration value to set. * @return the NetworkToNetworkInterconnectInner object itself. @@ -154,30 +151,156 @@ public NetworkToNetworkInterconnectInner withLayer2Configuration(Layer2Configura } /** - * Get the layer3Configuration property: Common properties for Layer3Configuration. + * Get the optionBLayer3Configuration property: Common properties for Layer3Configuration. + * + * @return the optionBLayer3Configuration value. + */ + public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration() { + return this.innerProperties() == null ? null : this.innerProperties().optionBLayer3Configuration(); + } + + /** + * Set the optionBLayer3Configuration property: Common properties for Layer3Configuration. + * + * @param optionBLayer3Configuration the optionBLayer3Configuration value to set. + * @return the NetworkToNetworkInterconnectInner object itself. + */ + public NetworkToNetworkInterconnectInner withOptionBLayer3Configuration( + NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectProperties(); + } + this.innerProperties().withOptionBLayer3Configuration(optionBLayer3Configuration); + return this; + } + + /** + * Get the npbStaticRouteConfiguration property: NPB Static Route Configuration properties. + * + * @return the npbStaticRouteConfiguration value. + */ + public NpbStaticRouteConfiguration npbStaticRouteConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().npbStaticRouteConfiguration(); + } + + /** + * Set the npbStaticRouteConfiguration property: NPB Static Route Configuration properties. + * + * @param npbStaticRouteConfiguration the npbStaticRouteConfiguration value to set. + * @return the NetworkToNetworkInterconnectInner object itself. + */ + public NetworkToNetworkInterconnectInner withNpbStaticRouteConfiguration( + NpbStaticRouteConfiguration npbStaticRouteConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectProperties(); + } + this.innerProperties().withNpbStaticRouteConfiguration(npbStaticRouteConfiguration); + return this; + } + + /** + * Get the importRoutePolicy property: Import Route Policy configuration. * - * @return the layer3Configuration value. + * @return the importRoutePolicy value. */ - public Layer3Configuration layer3Configuration() { - return this.innerProperties() == null ? null : this.innerProperties().layer3Configuration(); + public ImportRoutePolicyInformation importRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicy(); } /** - * Set the layer3Configuration property: Common properties for Layer3Configuration. + * Set the importRoutePolicy property: Import Route Policy configuration. * - * @param layer3Configuration the layer3Configuration value to set. + * @param importRoutePolicy the importRoutePolicy value to set. * @return the NetworkToNetworkInterconnectInner object itself. */ - public NetworkToNetworkInterconnectInner withLayer3Configuration(Layer3Configuration layer3Configuration) { + public NetworkToNetworkInterconnectInner withImportRoutePolicy(ImportRoutePolicyInformation importRoutePolicy) { if (this.innerProperties() == null) { this.innerProperties = new NetworkToNetworkInterconnectProperties(); } - this.innerProperties().withLayer3Configuration(layer3Configuration); + this.innerProperties().withImportRoutePolicy(importRoutePolicy); return this; } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the exportRoutePolicy property: Export Route Policy configuration. + * + * @return the exportRoutePolicy value. + */ + public ExportRoutePolicyInformation exportRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicy(); + } + + /** + * Set the exportRoutePolicy property: Export Route Policy configuration. + * + * @param exportRoutePolicy the exportRoutePolicy value to set. + * @return the NetworkToNetworkInterconnectInner object itself. + */ + public NetworkToNetworkInterconnectInner withExportRoutePolicy(ExportRoutePolicyInformation exportRoutePolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectProperties(); + } + this.innerProperties().withExportRoutePolicy(exportRoutePolicy); + return this; + } + + /** + * Get the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @return the egressAclId value. + */ + public String egressAclId() { + return this.innerProperties() == null ? null : this.innerProperties().egressAclId(); + } + + /** + * Set the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @param egressAclId the egressAclId value to set. + * @return the NetworkToNetworkInterconnectInner object itself. + */ + public NetworkToNetworkInterconnectInner withEgressAclId(String egressAclId) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectProperties(); + } + this.innerProperties().withEgressAclId(egressAclId); + return this; + } + + /** + * Get the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @return the ingressAclId value. + */ + public String ingressAclId() { + return this.innerProperties() == null ? null : this.innerProperties().ingressAclId(); + } + + /** + * Set the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @param ingressAclId the ingressAclId value to set. + * @return the NetworkToNetworkInterconnectInner object itself. + */ + public NetworkToNetworkInterconnectInner withIngressAclId(String ingressAclId) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectProperties(); + } + this.innerProperties().withIngressAclId(ingressAclId); + return this; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ @@ -185,14 +308,30 @@ public ProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model NetworkToNetworkInterconnectInner")); + } else { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkToNetworkInterconnectInner.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectPatchableProperties.java new file mode 100644 index 0000000000000..1a0455f8a3122 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectPatchableProperties.java @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Network to Network Interconnect patchable properties. */ +@Fluent +public final class NetworkToNetworkInterconnectPatchableProperties { + /* + * Common properties for Layer2Configuration. + */ + @JsonProperty(value = "layer2Configuration") + private Layer2Configuration layer2Configuration; + + /* + * Common properties for Layer3Configuration. + */ + @JsonProperty(value = "optionBLayer3Configuration") + private OptionBLayer3Configuration optionBLayer3Configuration; + + /* + * NPB Static Route Configuration properties. + */ + @JsonProperty(value = "npbStaticRouteConfiguration") + private NpbStaticRouteConfiguration npbStaticRouteConfiguration; + + /* + * Import Route Policy information. + */ + @JsonProperty(value = "importRoutePolicy") + private ImportRoutePolicyInformation importRoutePolicy; + + /* + * Export Route Policy information + */ + @JsonProperty(value = "exportRoutePolicy") + private ExportRoutePolicyInformation exportRoutePolicy; + + /* + * Egress Acl. ARM resource ID of Access Control Lists. + */ + @JsonProperty(value = "egressAclId") + private String egressAclId; + + /* + * Ingress Acl. ARM resource ID of Access Control Lists. + */ + @JsonProperty(value = "ingressAclId") + private String ingressAclId; + + /** Creates an instance of NetworkToNetworkInterconnectPatchableProperties class. */ + public NetworkToNetworkInterconnectPatchableProperties() { + } + + /** + * Get the layer2Configuration property: Common properties for Layer2Configuration. + * + * @return the layer2Configuration value. + */ + public Layer2Configuration layer2Configuration() { + return this.layer2Configuration; + } + + /** + * Set the layer2Configuration property: Common properties for Layer2Configuration. + * + * @param layer2Configuration the layer2Configuration value to set. + * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + */ + public NetworkToNetworkInterconnectPatchableProperties withLayer2Configuration( + Layer2Configuration layer2Configuration) { + this.layer2Configuration = layer2Configuration; + return this; + } + + /** + * Get the optionBLayer3Configuration property: Common properties for Layer3Configuration. + * + * @return the optionBLayer3Configuration value. + */ + public OptionBLayer3Configuration optionBLayer3Configuration() { + return this.optionBLayer3Configuration; + } + + /** + * Set the optionBLayer3Configuration property: Common properties for Layer3Configuration. + * + * @param optionBLayer3Configuration the optionBLayer3Configuration value to set. + * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + */ + public NetworkToNetworkInterconnectPatchableProperties withOptionBLayer3Configuration( + OptionBLayer3Configuration optionBLayer3Configuration) { + this.optionBLayer3Configuration = optionBLayer3Configuration; + return this; + } + + /** + * Get the npbStaticRouteConfiguration property: NPB Static Route Configuration properties. + * + * @return the npbStaticRouteConfiguration value. + */ + public NpbStaticRouteConfiguration npbStaticRouteConfiguration() { + return this.npbStaticRouteConfiguration; + } + + /** + * Set the npbStaticRouteConfiguration property: NPB Static Route Configuration properties. + * + * @param npbStaticRouteConfiguration the npbStaticRouteConfiguration value to set. + * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + */ + public NetworkToNetworkInterconnectPatchableProperties withNpbStaticRouteConfiguration( + NpbStaticRouteConfiguration npbStaticRouteConfiguration) { + this.npbStaticRouteConfiguration = npbStaticRouteConfiguration; + return this; + } + + /** + * Get the importRoutePolicy property: Import Route Policy information. + * + * @return the importRoutePolicy value. + */ + public ImportRoutePolicyInformation importRoutePolicy() { + return this.importRoutePolicy; + } + + /** + * Set the importRoutePolicy property: Import Route Policy information. + * + * @param importRoutePolicy the importRoutePolicy value to set. + * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + */ + public NetworkToNetworkInterconnectPatchableProperties withImportRoutePolicy( + ImportRoutePolicyInformation importRoutePolicy) { + this.importRoutePolicy = importRoutePolicy; + return this; + } + + /** + * Get the exportRoutePolicy property: Export Route Policy information. + * + * @return the exportRoutePolicy value. + */ + public ExportRoutePolicyInformation exportRoutePolicy() { + return this.exportRoutePolicy; + } + + /** + * Set the exportRoutePolicy property: Export Route Policy information. + * + * @param exportRoutePolicy the exportRoutePolicy value to set. + * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + */ + public NetworkToNetworkInterconnectPatchableProperties withExportRoutePolicy( + ExportRoutePolicyInformation exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; + return this; + } + + /** + * Get the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @return the egressAclId value. + */ + public String egressAclId() { + return this.egressAclId; + } + + /** + * Set the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @param egressAclId the egressAclId value to set. + * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + */ + public NetworkToNetworkInterconnectPatchableProperties withEgressAclId(String egressAclId) { + this.egressAclId = egressAclId; + return this; + } + + /** + * Get the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @return the ingressAclId value. + */ + public String ingressAclId() { + return this.ingressAclId; + } + + /** + * Set the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @param ingressAclId the ingressAclId value to set. + * @return the NetworkToNetworkInterconnectPatchableProperties object itself. + */ + public NetworkToNetworkInterconnectPatchableProperties withIngressAclId(String ingressAclId) { + this.ingressAclId = ingressAclId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (layer2Configuration() != null) { + layer2Configuration().validate(); + } + if (optionBLayer3Configuration() != null) { + optionBLayer3Configuration().validate(); + } + if (npbStaticRouteConfiguration() != null) { + npbStaticRouteConfiguration().validate(); + } + if (importRoutePolicy() != null) { + importRoutePolicy().validate(); + } + if (exportRoutePolicy() != null) { + exportRoutePolicy().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectProperties.java index 1ed8a512b5d56..8b3a17dfa2965 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/NetworkToNetworkInterconnectProperties.java @@ -6,11 +6,16 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; import com.azure.resourcemanager.managednetworkfabric.models.NniType; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; @@ -23,26 +28,20 @@ public final class NetworkToNetworkInterconnectProperties { @JsonProperty(value = "nniType") private NniType nniType; - /* - * Gets the administrativeState of the resource. Example -Enabled/Disabled - */ - @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) - private EnabledDisabledState administrativeState; - /* * Configuration to use NNI for Infrastructure Management. Example: True/False. */ - @JsonProperty(value = "isManagementType", required = true) - private BooleanEnumProperty isManagementType; + @JsonProperty(value = "isManagementType") + private IsManagementType isManagementType; /* - * Based on this parameter the layer2/layer3 is made as mandatory. Example: True/False + * Based on this option layer3 parameters are mandatory. Example: True/False */ @JsonProperty(value = "useOptionB", required = true) private BooleanEnumProperty useOptionB; /* - * Common properties for Layer2Configuration. + * Common properties for Layer2 Configuration. */ @JsonProperty(value = "layer2Configuration") private Layer2Configuration layer2Configuration; @@ -50,15 +49,57 @@ public final class NetworkToNetworkInterconnectProperties { /* * Common properties for Layer3Configuration. */ - @JsonProperty(value = "layer3Configuration") - private Layer3Configuration layer3Configuration; + @JsonProperty(value = "optionBLayer3Configuration") + private NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration; + + /* + * NPB Static Route Configuration properties. + */ + @JsonProperty(value = "npbStaticRouteConfiguration") + private NpbStaticRouteConfiguration npbStaticRouteConfiguration; + + /* + * Import Route Policy configuration. + */ + @JsonProperty(value = "importRoutePolicy") + private ImportRoutePolicyInformation importRoutePolicy; + + /* + * Export Route Policy configuration. + */ + @JsonProperty(value = "exportRoutePolicy") + private ExportRoutePolicyInformation exportRoutePolicy; + + /* + * Egress Acl. ARM resource ID of Access Control Lists. + */ + @JsonProperty(value = "egressAclId") + private String egressAclId; + + /* + * Ingress Acl. ARM resource ID of Access Control Lists. + */ + @JsonProperty(value = "ingressAclId") + private String ingressAclId; + + /* + * Configuration state of the resource. + */ + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; /* - * Gets the provisioning state of the resource. + * Provisioning state of the resource. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; + /* + * Administrative state of the resource. + */ + @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) + private AdministrativeState administrativeState; + /** Creates an instance of NetworkToNetworkInterconnectProperties class. */ public NetworkToNetworkInterconnectProperties() { } @@ -83,21 +124,12 @@ public NetworkToNetworkInterconnectProperties withNniType(NniType nniType) { return this; } - /** - * Get the administrativeState property: Gets the administrativeState of the resource. Example -Enabled/Disabled. - * - * @return the administrativeState value. - */ - public EnabledDisabledState administrativeState() { - return this.administrativeState; - } - /** * Get the isManagementType property: Configuration to use NNI for Infrastructure Management. Example: True/False. * * @return the isManagementType value. */ - public BooleanEnumProperty isManagementType() { + public IsManagementType isManagementType() { return this.isManagementType; } @@ -107,13 +139,13 @@ public BooleanEnumProperty isManagementType() { * @param isManagementType the isManagementType value to set. * @return the NetworkToNetworkInterconnectProperties object itself. */ - public NetworkToNetworkInterconnectProperties withIsManagementType(BooleanEnumProperty isManagementType) { + public NetworkToNetworkInterconnectProperties withIsManagementType(IsManagementType isManagementType) { this.isManagementType = isManagementType; return this; } /** - * Get the useOptionB property: Based on this parameter the layer2/layer3 is made as mandatory. Example: True/False. + * Get the useOptionB property: Based on this option layer3 parameters are mandatory. Example: True/False. * * @return the useOptionB value. */ @@ -122,7 +154,7 @@ public BooleanEnumProperty useOptionB() { } /** - * Set the useOptionB property: Based on this parameter the layer2/layer3 is made as mandatory. Example: True/False. + * Set the useOptionB property: Based on this option layer3 parameters are mandatory. Example: True/False. * * @param useOptionB the useOptionB value to set. * @return the NetworkToNetworkInterconnectProperties object itself. @@ -133,7 +165,7 @@ public NetworkToNetworkInterconnectProperties withUseOptionB(BooleanEnumProperty } /** - * Get the layer2Configuration property: Common properties for Layer2Configuration. + * Get the layer2Configuration property: Common properties for Layer2 Configuration. * * @return the layer2Configuration value. */ @@ -142,7 +174,7 @@ public Layer2Configuration layer2Configuration() { } /** - * Set the layer2Configuration property: Common properties for Layer2Configuration. + * Set the layer2Configuration property: Common properties for Layer2 Configuration. * * @param layer2Configuration the layer2Configuration value to set. * @return the NetworkToNetworkInterconnectProperties object itself. @@ -153,27 +185,140 @@ public NetworkToNetworkInterconnectProperties withLayer2Configuration(Layer2Conf } /** - * Get the layer3Configuration property: Common properties for Layer3Configuration. + * Get the optionBLayer3Configuration property: Common properties for Layer3Configuration. + * + * @return the optionBLayer3Configuration value. + */ + public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration() { + return this.optionBLayer3Configuration; + } + + /** + * Set the optionBLayer3Configuration property: Common properties for Layer3Configuration. + * + * @param optionBLayer3Configuration the optionBLayer3Configuration value to set. + * @return the NetworkToNetworkInterconnectProperties object itself. + */ + public NetworkToNetworkInterconnectProperties withOptionBLayer3Configuration( + NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration) { + this.optionBLayer3Configuration = optionBLayer3Configuration; + return this; + } + + /** + * Get the npbStaticRouteConfiguration property: NPB Static Route Configuration properties. + * + * @return the npbStaticRouteConfiguration value. + */ + public NpbStaticRouteConfiguration npbStaticRouteConfiguration() { + return this.npbStaticRouteConfiguration; + } + + /** + * Set the npbStaticRouteConfiguration property: NPB Static Route Configuration properties. + * + * @param npbStaticRouteConfiguration the npbStaticRouteConfiguration value to set. + * @return the NetworkToNetworkInterconnectProperties object itself. + */ + public NetworkToNetworkInterconnectProperties withNpbStaticRouteConfiguration( + NpbStaticRouteConfiguration npbStaticRouteConfiguration) { + this.npbStaticRouteConfiguration = npbStaticRouteConfiguration; + return this; + } + + /** + * Get the importRoutePolicy property: Import Route Policy configuration. + * + * @return the importRoutePolicy value. + */ + public ImportRoutePolicyInformation importRoutePolicy() { + return this.importRoutePolicy; + } + + /** + * Set the importRoutePolicy property: Import Route Policy configuration. + * + * @param importRoutePolicy the importRoutePolicy value to set. + * @return the NetworkToNetworkInterconnectProperties object itself. + */ + public NetworkToNetworkInterconnectProperties withImportRoutePolicy( + ImportRoutePolicyInformation importRoutePolicy) { + this.importRoutePolicy = importRoutePolicy; + return this; + } + + /** + * Get the exportRoutePolicy property: Export Route Policy configuration. + * + * @return the exportRoutePolicy value. + */ + public ExportRoutePolicyInformation exportRoutePolicy() { + return this.exportRoutePolicy; + } + + /** + * Set the exportRoutePolicy property: Export Route Policy configuration. + * + * @param exportRoutePolicy the exportRoutePolicy value to set. + * @return the NetworkToNetworkInterconnectProperties object itself. + */ + public NetworkToNetworkInterconnectProperties withExportRoutePolicy( + ExportRoutePolicyInformation exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; + return this; + } + + /** + * Get the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @return the egressAclId value. + */ + public String egressAclId() { + return this.egressAclId; + } + + /** + * Set the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @param egressAclId the egressAclId value to set. + * @return the NetworkToNetworkInterconnectProperties object itself. + */ + public NetworkToNetworkInterconnectProperties withEgressAclId(String egressAclId) { + this.egressAclId = egressAclId; + return this; + } + + /** + * Get the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. * - * @return the layer3Configuration value. + * @return the ingressAclId value. */ - public Layer3Configuration layer3Configuration() { - return this.layer3Configuration; + public String ingressAclId() { + return this.ingressAclId; } /** - * Set the layer3Configuration property: Common properties for Layer3Configuration. + * Set the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. * - * @param layer3Configuration the layer3Configuration value to set. + * @param ingressAclId the ingressAclId value to set. * @return the NetworkToNetworkInterconnectProperties object itself. */ - public NetworkToNetworkInterconnectProperties withLayer3Configuration(Layer3Configuration layer3Configuration) { - this.layer3Configuration = layer3Configuration; + public NetworkToNetworkInterconnectProperties withIngressAclId(String ingressAclId) { + this.ingressAclId = ingressAclId; return this; } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ @@ -181,18 +326,21 @@ public ProvisioningState provisioningState() { return this.provisioningState; } + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (isManagementType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property isManagementType in model NetworkToNetworkInterconnectProperties")); - } if (useOptionB() == null) { throw LOGGER .logExceptionAsError( @@ -202,8 +350,17 @@ public void validate() { if (layer2Configuration() != null) { layer2Configuration().validate(); } - if (layer3Configuration() != null) { - layer3Configuration().validate(); + if (optionBLayer3Configuration() != null) { + optionBLayer3Configuration().validate(); + } + if (npbStaticRouteConfiguration() != null) { + npbStaticRouteConfiguration().validate(); + } + if (importRoutePolicy() != null) { + importRoutePolicy().validate(); + } + if (exportRoutePolicy() != null) { + exportRoutePolicy().validate(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyInner.java index 8c814741e20fe..0ad3a01775ba7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyInner.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyInner.java @@ -8,6 +8,9 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -66,30 +69,64 @@ public RoutePolicyInner withTags(Map tags) { } /** - * Get the statements property: Route Policy statements. + * Get the networkFabricId property: Arm Resource ID of Network Fabric. * - * @return the statements value. + * @return the networkFabricId value. */ - public List statements() { - return this.innerProperties() == null ? null : this.innerProperties().statements(); + public String networkFabricId() { + return this.innerProperties() == null ? null : this.innerProperties().networkFabricId(); } /** - * Set the statements property: Route Policy statements. + * Set the networkFabricId property: Arm Resource ID of Network Fabric. * - * @param statements the statements value to set. + * @param networkFabricId the networkFabricId value to set. * @return the RoutePolicyInner object itself. */ - public RoutePolicyInner withStatements(List statements) { + public RoutePolicyInner withNetworkFabricId(String networkFabricId) { if (this.innerProperties() == null) { this.innerProperties = new RoutePolicyProperties(); } - this.innerProperties().withStatements(statements); + this.innerProperties().withNetworkFabricId(networkFabricId); + return this; + } + + /** + * Get the addressFamilyType property: AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 + * route policy. + * + * @return the addressFamilyType value. + */ + public AddressFamilyType addressFamilyType() { + return this.innerProperties() == null ? null : this.innerProperties().addressFamilyType(); + } + + /** + * Set the addressFamilyType property: AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 + * route policy. + * + * @param addressFamilyType the addressFamilyType value to set. + * @return the RoutePolicyInner object itself. + */ + public RoutePolicyInner withAddressFamilyType(AddressFamilyType addressFamilyType) { + if (this.innerProperties() == null) { + this.innerProperties = new RoutePolicyProperties(); + } + this.innerProperties().withAddressFamilyType(addressFamilyType); return this; } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.innerProperties() == null ? null : this.innerProperties().configurationState(); + } + + /** + * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ @@ -97,6 +134,38 @@ public ProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.innerProperties() == null ? null : this.innerProperties().administrativeState(); + } + + /** + * Get the statements property: Route Policy statements. + * + * @return the statements value. + */ + public List statements() { + return this.innerProperties() == null ? null : this.innerProperties().statements(); + } + + /** + * Set the statements property: Route Policy statements. + * + * @param statements the statements value to set. + * @return the RoutePolicyInner object itself. + */ + public RoutePolicyInner withStatements(List statements) { + if (this.innerProperties() == null) { + this.innerProperties = new RoutePolicyProperties(); + } + this.innerProperties().withStatements(statements); + return this; + } + /** * Get the annotation property: Switch configuration description. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyPatchableProperties.java new file mode 100644 index 0000000000000..773450a4f577e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyPatchableProperties.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Route Policy patchable properties. */ +@Fluent +public class RoutePolicyPatchableProperties { + /* + * Route Policy statements. + */ + @JsonProperty(value = "statements") + private List statements; + + /** Creates an instance of RoutePolicyPatchableProperties class. */ + public RoutePolicyPatchableProperties() { + } + + /** + * Get the statements property: Route Policy statements. + * + * @return the statements value. + */ + public List statements() { + return this.statements; + } + + /** + * Set the statements property: Route Policy statements. + * + * @param statements the statements value to set. + * @return the RoutePolicyPatchableProperties object itself. + */ + public RoutePolicyPatchableProperties withStatements(List statements) { + this.statements = statements; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (statements() != null) { + statements().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyProperties.java index 6bae4a9402d85..339ca047e5996 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/RoutePolicyProperties.java @@ -6,53 +6,111 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** RoutePolicy Properties define the resource properties. */ +/** RoutePolicyProperties defines the resource properties. */ @Fluent public final class RoutePolicyProperties extends AnnotationResource { /* - * Route Policy statements. + * Arm Resource ID of Network Fabric. */ - @JsonProperty(value = "statements", required = true) - private List statements; + @JsonProperty(value = "networkFabricId", required = true) + private String networkFabricId; + + /* + * AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 route policy. + */ + @JsonProperty(value = "addressFamilyType") + private AddressFamilyType addressFamilyType; /* - * Gets the provisioning state of the resource. + * Configuration state of the resource. + */ + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; + + /* + * Provisioning state of the resource. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; + /* + * Administrative state of the resource. + */ + @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) + private AdministrativeState administrativeState; + + /* + * Route Policy statements. + */ + @JsonProperty(value = "statements") + private List statements; + /** Creates an instance of RoutePolicyProperties class. */ public RoutePolicyProperties() { } /** - * Get the statements property: Route Policy statements. + * Get the networkFabricId property: Arm Resource ID of Network Fabric. * - * @return the statements value. + * @return the networkFabricId value. */ - public List statements() { - return this.statements; + public String networkFabricId() { + return this.networkFabricId; } /** - * Set the statements property: Route Policy statements. + * Set the networkFabricId property: Arm Resource ID of Network Fabric. * - * @param statements the statements value to set. + * @param networkFabricId the networkFabricId value to set. * @return the RoutePolicyProperties object itself. */ - public RoutePolicyProperties withStatements(List statements) { - this.statements = statements; + public RoutePolicyProperties withNetworkFabricId(String networkFabricId) { + this.networkFabricId = networkFabricId; return this; } /** - * Get the provisioningState property: Gets the provisioning state of the resource. + * Get the addressFamilyType property: AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 + * route policy. + * + * @return the addressFamilyType value. + */ + public AddressFamilyType addressFamilyType() { + return this.addressFamilyType; + } + + /** + * Set the addressFamilyType property: AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 + * route policy. + * + * @param addressFamilyType the addressFamilyType value to set. + * @return the RoutePolicyProperties object itself. + */ + public RoutePolicyProperties withAddressFamilyType(AddressFamilyType addressFamilyType) { + this.addressFamilyType = addressFamilyType; + return this; + } + + /** + * Get the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + public ConfigurationState configurationState() { + return this.configurationState; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ @@ -60,6 +118,35 @@ public ProvisioningState provisioningState() { return this.provisioningState; } + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; + } + + /** + * Get the statements property: Route Policy statements. + * + * @return the statements value. + */ + public List statements() { + return this.statements; + } + + /** + * Set the statements property: Route Policy statements. + * + * @param statements the statements value to set. + * @return the RoutePolicyProperties object itself. + */ + public RoutePolicyProperties withStatements(List statements) { + this.statements = statements; + return this; + } + /** {@inheritDoc} */ @Override public RoutePolicyProperties withAnnotation(String annotation) { @@ -75,12 +162,13 @@ public RoutePolicyProperties withAnnotation(String annotation) { @Override public void validate() { super.validate(); - if (statements() == null) { + if (networkFabricId() == null) { throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property statements in model RoutePolicyProperties")); - } else { + "Missing required property networkFabricId in model RoutePolicyProperties")); + } + if (statements() != null) { statements().forEach(e -> e.validate()); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/SupportPackagePropertiesInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/SupportPackagePropertiesInner.java deleted file mode 100644 index 34e09bec9cddf..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/SupportPackagePropertiesInner.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Generate support package post action properties. */ -@Fluent -public final class SupportPackagePropertiesInner { - /* - * The URL to fetch the generated support package from. - */ - @JsonProperty(value = "supportPackageURL", required = true) - private String supportPackageUrl; - - /** Creates an instance of SupportPackagePropertiesInner class. */ - public SupportPackagePropertiesInner() { - } - - /** - * Get the supportPackageUrl property: The URL to fetch the generated support package from. - * - * @return the supportPackageUrl value. - */ - public String supportPackageUrl() { - return this.supportPackageUrl; - } - - /** - * Set the supportPackageUrl property: The URL to fetch the generated support package from. - * - * @param supportPackageUrl the supportPackageUrl value to set. - * @return the SupportPackagePropertiesInner object itself. - */ - public SupportPackagePropertiesInner withSupportPackageUrl(String supportPackageUrl) { - this.supportPackageUrl = supportPackageUrl; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (supportPackageUrl() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property supportPackageUrl in model SupportPackagePropertiesInner")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SupportPackagePropertiesInner.class); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ValidateConfigurationResponseInner.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ValidateConfigurationResponseInner.java new file mode 100644 index 0000000000000..ebe54aaeda2ca --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/fluent/models/ValidateConfigurationResponseInner.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The response of the action validate configuration. */ +@Fluent +public final class ValidateConfigurationResponseInner extends ManagementError { + /* + * Gets the configuration state. + */ + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; + + /* + * URL for the details of the response. + */ + @JsonProperty(value = "url") + private String url; + + /** Creates an instance of ValidateConfigurationResponseInner class. */ + public ValidateConfigurationResponseInner() { + } + + /** + * Get the configurationState property: Gets the configuration state. + * + * @return the configurationState value. + */ + public ConfigurationState getConfigurationState() { + return this.configurationState; + } + + /** + * Get the url property: URL for the details of the response. + * + * @return the url value. + */ + public String getUrl() { + return this.url; + } + + /** + * Set the url property: URL for the details of the response. + * + * @param url the url value to set. + * @return the ValidateConfigurationResponseInner object itself. + */ + public ValidateConfigurationResponseInner withUrl(String url) { + this.url = url; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListImpl.java index 0ab863e7b4df5..aac334c475eb5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListImpl.java @@ -9,10 +9,17 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListConditionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatch; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; +import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; import java.util.Map; @@ -52,12 +59,32 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public AddressFamily addressFamily() { - return this.innerModel().addressFamily(); + public OffsetDateTime lastSyncedTime() { + return this.innerModel().lastSyncedTime(); } - public List conditions() { - List inner = this.innerModel().conditions(); + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + + public ConfigurationType configurationType() { + return this.innerModel().configurationType(); + } + + public String aclsUrl() { + return this.innerModel().aclsUrl(); + } + + public List matchConfigurations() { + List inner = this.innerModel().matchConfigurations(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -65,8 +92,13 @@ public List conditions() { } } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public List dynamicMatchConfigurations() { + List inner = this.innerModel().dynamicMatchConfigurations(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } public String annotation() { @@ -109,8 +141,7 @@ public AccessControlList create() { serviceManager .serviceClient() .getAccessControlLists() - .createWithResponse(resourceGroupName, accessControlListName, this.innerModel(), Context.NONE) - .getValue(); + .create(resourceGroupName, accessControlListName, this.innerModel(), Context.NONE); return this; } @@ -119,8 +150,7 @@ public AccessControlList create(Context context) { serviceManager .serviceClient() .getAccessControlLists() - .createWithResponse(resourceGroupName, accessControlListName, this.innerModel(), context) - .getValue(); + .create(resourceGroupName, accessControlListName, this.innerModel(), context); return this; } @@ -141,8 +171,7 @@ public AccessControlList apply() { serviceManager .serviceClient() .getAccessControlLists() - .updateWithResponse(resourceGroupName, accessControlListName, updateBody, Context.NONE) - .getValue(); + .update(resourceGroupName, accessControlListName, updateBody, Context.NONE); return this; } @@ -151,8 +180,7 @@ public AccessControlList apply(Context context) { serviceManager .serviceClient() .getAccessControlLists() - .updateWithResponse(resourceGroupName, accessControlListName, updateBody, context) - .getValue(); + .update(resourceGroupName, accessControlListName, updateBody, context); return this; } @@ -185,6 +213,37 @@ public AccessControlList refresh(Context context) { return this; } + public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body) { + return serviceManager + .accessControlLists() + .updateAdministrativeState(resourceGroupName, accessControlListName, body); + } + + public CommonPostActionResponseForStateUpdate updateAdministrativeState( + UpdateAdministrativeState body, Context context) { + return serviceManager + .accessControlLists() + .updateAdministrativeState(resourceGroupName, accessControlListName, body, context); + } + + public CommonPostActionResponseForStateUpdate resync() { + return serviceManager.accessControlLists().resync(resourceGroupName, accessControlListName); + } + + public CommonPostActionResponseForStateUpdate resync(Context context) { + return serviceManager.accessControlLists().resync(resourceGroupName, accessControlListName, context); + } + + public ValidateConfigurationResponse validateConfiguration() { + return serviceManager.accessControlLists().validateConfiguration(resourceGroupName, accessControlListName); + } + + public ValidateConfigurationResponse validateConfiguration(Context context) { + return serviceManager + .accessControlLists() + .validateConfiguration(resourceGroupName, accessControlListName, context); + } + public AccessControlListImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -195,32 +254,54 @@ public AccessControlListImpl withRegion(String location) { return this; } - public AccessControlListImpl withAddressFamily(AddressFamily addressFamily) { + public AccessControlListImpl withTags(Map tags) { if (isInCreateMode()) { - this.innerModel().withAddressFamily(addressFamily); + this.innerModel().withTags(tags); return this; } else { - this.updateBody.withAddressFamily(addressFamily); + this.updateBody.withTags(tags); return this; } } - public AccessControlListImpl withConditions(List conditions) { + public AccessControlListImpl withConfigurationType(ConfigurationType configurationType) { if (isInCreateMode()) { - this.innerModel().withConditions(conditions); + this.innerModel().withConfigurationType(configurationType); return this; } else { - this.updateBody.withConditions(conditions); + this.updateBody.withConfigurationType(configurationType); return this; } } - public AccessControlListImpl withTags(Map tags) { + public AccessControlListImpl withAclsUrl(String aclsUrl) { if (isInCreateMode()) { - this.innerModel().withTags(tags); + this.innerModel().withAclsUrl(aclsUrl); return this; } else { - this.updateBody.withTags(tags); + this.updateBody.withAclsUrl(aclsUrl); + return this; + } + } + + public AccessControlListImpl withMatchConfigurations( + List matchConfigurations) { + if (isInCreateMode()) { + this.innerModel().withMatchConfigurations(matchConfigurations); + return this; + } else { + this.updateBody.withMatchConfigurations(matchConfigurations); + return this; + } + } + + public AccessControlListImpl withDynamicMatchConfigurations( + List dynamicMatchConfigurations) { + if (isInCreateMode()) { + this.innerModel().withDynamicMatchConfigurations(dynamicMatchConfigurations); + return this; + } else { + this.updateBody.withDynamicMatchConfigurations(dynamicMatchConfigurations); return this; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsClientImpl.java index ae0e69743b793..bd7d0c0eca2cb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsClientImpl.java @@ -14,6 +14,7 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -27,12 +28,20 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatch; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListsListResult; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in AccessControlListsClient. */ @@ -64,9 +73,9 @@ public interface AccessControlListsService { @Headers({"Content-Type: application/json"}) @Put( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") - @ExpectedResponses({200}) + @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( + Mono>> create( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -93,9 +102,9 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Patch( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") - @ExpectedResponses({200}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( + Mono>> update( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -108,9 +117,9 @@ Mono> update( @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}") - @ExpectedResponses({200, 204}) + @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( + Mono>> delete( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -143,6 +152,49 @@ Mono> list( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/updateAdministrativeState") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateAdministrativeState( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("accessControlListName") String accessControlListName, + @BodyParam("application/json") UpdateAdministrativeState body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/resync") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resync( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("accessControlListName") String accessControlListName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/validateConfiguration") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> validateConfiguration( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("accessControlListName") String accessControlListName, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -165,7 +217,7 @@ Mono> listBySubscriptionNext( } /** - * Create Access Control List. + * Creates Access Control List. * *

Implements Access Control List PUT method. * @@ -175,11 +227,11 @@ Mono> listBySubscriptionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the Access Control List resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( + private Mono>> createWithResponseAsync( String resourceGroupName, String accessControlListName, AccessControlListInner body) { if (this.client.getEndpoint() == null) { return Mono @@ -224,7 +276,7 @@ private Mono> createWithResponseAsync( } /** - * Create Access Control List. + * Creates Access Control List. * *

Implements Access Control List PUT method. * @@ -235,11 +287,11 @@ private Mono> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the Access Control List resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( + private Mono>> createWithResponseAsync( String resourceGroupName, String accessControlListName, AccessControlListInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -281,7 +333,103 @@ private Mono> createWithResponseAsync( } /** - * Create Access Control List. + * Creates Access Control List. + * + *

Implements Access Control List PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Access Control List resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AccessControlListInner> beginCreateAsync( + String resourceGroupName, String accessControlListName, AccessControlListInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, accessControlListName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AccessControlListInner.class, + AccessControlListInner.class, + this.client.getContext()); + } + + /** + * Creates Access Control List. + * + *

Implements Access Control List PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Access Control List resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AccessControlListInner> beginCreateAsync( + String resourceGroupName, String accessControlListName, AccessControlListInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createWithResponseAsync(resourceGroupName, accessControlListName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AccessControlListInner.class, + AccessControlListInner.class, + context); + } + + /** + * Creates Access Control List. + * + *

Implements Access Control List PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Access Control List resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AccessControlListInner> beginCreate( + String resourceGroupName, String accessControlListName, AccessControlListInner body) { + return this.beginCreateAsync(resourceGroupName, accessControlListName, body).getSyncPoller(); + } + + /** + * Creates Access Control List. + * + *

Implements Access Control List PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Access Control List resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AccessControlListInner> beginCreate( + String resourceGroupName, String accessControlListName, AccessControlListInner body, Context context) { + return this.beginCreateAsync(resourceGroupName, accessControlListName, body, context).getSyncPoller(); + } + + /** + * Creates Access Control List. * *

Implements Access Control List PUT method. * @@ -291,17 +439,18 @@ private Mono> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition on successful completion of {@link Mono}. + * @return the Access Control List resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( String resourceGroupName, String accessControlListName, AccessControlListInner body) { - return createWithResponseAsync(resourceGroupName, accessControlListName, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return beginCreateAsync(resourceGroupName, accessControlListName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create Access Control List. + * Creates Access Control List. * *

Implements Access Control List PUT method. * @@ -312,16 +461,18 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition along with {@link Response}. + * @return the Access Control List resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( + private Mono createAsync( String resourceGroupName, String accessControlListName, AccessControlListInner body, Context context) { - return createWithResponseAsync(resourceGroupName, accessControlListName, body, context).block(); + return beginCreateAsync(resourceGroupName, accessControlListName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create Access Control List. + * Creates Access Control List. * *

Implements Access Control List PUT method. * @@ -331,12 +482,32 @@ public Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition. + * @return the Access Control List resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessControlListInner create( String resourceGroupName, String accessControlListName, AccessControlListInner body) { - return createWithResponse(resourceGroupName, accessControlListName, body, Context.NONE).getValue(); + return createAsync(resourceGroupName, accessControlListName, body).block(); + } + + /** + * Creates Access Control List. + * + *

Implements Access Control List PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Access Control List resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessControlListInner create( + String resourceGroupName, String accessControlListName, AccessControlListInner body, Context context) { + return createAsync(resourceGroupName, accessControlListName, body, context).block(); } /** @@ -349,8 +520,8 @@ public AccessControlListInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the Access Control List resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -402,8 +573,8 @@ private Mono> getByResourceGroupWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the Access Control List resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -451,7 +622,7 @@ private Mono> getByResourceGroupWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition on successful completion of {@link Mono}. + * @return the Access Control List resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync( @@ -471,7 +642,7 @@ private Mono getByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition along with {@link Response}. + * @return the Access Control List resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -489,7 +660,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition. + * @return the Access Control List resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessControlListInner getByResourceGroup(String resourceGroupName, String accessControlListName) { @@ -497,7 +668,7 @@ public AccessControlListInner getByResourceGroup(String resourceGroupName, Strin } /** - * Updates a Access Control List. + * Updates the Access Control List. * *

API to update certain properties of the Access Control List resource. * @@ -507,11 +678,11 @@ public AccessControlListInner getByResourceGroup(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the Access Control List resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( + private Mono>> updateWithResponseAsync( String resourceGroupName, String accessControlListName, AccessControlListPatch body) { if (this.client.getEndpoint() == null) { return Mono @@ -556,7 +727,7 @@ private Mono> updateWithResponseAsync( } /** - * Updates a Access Control List. + * Updates the Access Control List. * *

API to update certain properties of the Access Control List resource. * @@ -567,11 +738,11 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the Access Control List resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( + private Mono>> updateWithResponseAsync( String resourceGroupName, String accessControlListName, AccessControlListPatch body, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -613,7 +784,103 @@ private Mono> updateWithResponseAsync( } /** - * Updates a Access Control List. + * Updates the Access Control List. + * + *

API to update certain properties of the Access Control List resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Access Control List properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Access Control List resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AccessControlListInner> beginUpdateAsync( + String resourceGroupName, String accessControlListName, AccessControlListPatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, accessControlListName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AccessControlListInner.class, + AccessControlListInner.class, + this.client.getContext()); + } + + /** + * Updates the Access Control List. + * + *

API to update certain properties of the Access Control List resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Access Control List properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Access Control List resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AccessControlListInner> beginUpdateAsync( + String resourceGroupName, String accessControlListName, AccessControlListPatch body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, accessControlListName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AccessControlListInner.class, + AccessControlListInner.class, + context); + } + + /** + * Updates the Access Control List. + * + *

API to update certain properties of the Access Control List resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Access Control List properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Access Control List resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AccessControlListInner> beginUpdate( + String resourceGroupName, String accessControlListName, AccessControlListPatch body) { + return this.beginUpdateAsync(resourceGroupName, accessControlListName, body).getSyncPoller(); + } + + /** + * Updates the Access Control List. + * + *

API to update certain properties of the Access Control List resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Access Control List properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Access Control List resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AccessControlListInner> beginUpdate( + String resourceGroupName, String accessControlListName, AccessControlListPatch body, Context context) { + return this.beginUpdateAsync(resourceGroupName, accessControlListName, body, context).getSyncPoller(); + } + + /** + * Updates the Access Control List. * *

API to update certain properties of the Access Control List resource. * @@ -623,17 +890,18 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition on successful completion of {@link Mono}. + * @return the Access Control List resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( String resourceGroupName, String accessControlListName, AccessControlListPatch body) { - return updateWithResponseAsync(resourceGroupName, accessControlListName, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return beginUpdateAsync(resourceGroupName, accessControlListName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a Access Control List. + * Updates the Access Control List. * *

API to update certain properties of the Access Control List resource. * @@ -644,16 +912,18 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition along with {@link Response}. + * @return the Access Control List resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( + private Mono updateAsync( String resourceGroupName, String accessControlListName, AccessControlListPatch body, Context context) { - return updateWithResponseAsync(resourceGroupName, accessControlListName, body, context).block(); + return beginUpdateAsync(resourceGroupName, accessControlListName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a Access Control List. + * Updates the Access Control List. * *

API to update certain properties of the Access Control List resource. * @@ -663,12 +933,32 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition. + * @return the Access Control List resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessControlListInner update( String resourceGroupName, String accessControlListName, AccessControlListPatch body) { - return updateWithResponse(resourceGroupName, accessControlListName, body, Context.NONE).getValue(); + return updateAsync(resourceGroupName, accessControlListName, body).block(); + } + + /** + * Updates the Access Control List. + * + *

API to update certain properties of the Access Control List resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Access Control List properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Access Control List resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessControlListInner update( + String resourceGroupName, String accessControlListName, AccessControlListPatch body, Context context) { + return updateAsync(resourceGroupName, accessControlListName, body, context).block(); } /** @@ -684,7 +974,8 @@ public AccessControlListInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accessControlListName) { + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String accessControlListName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -735,7 +1026,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( + private Mono>> deleteWithResponseAsync( String resourceGroupName, String accessControlListName, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -780,11 +1071,16 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accessControlListName) { - return deleteWithResponseAsync(resourceGroupName, accessControlListName).flatMap(ignored -> Mono.empty()); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String accessControlListName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, accessControlListName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -798,11 +1094,17 @@ private Mono deleteAsync(String resourceGroupName, String accessControlLis * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String accessControlListName, Context context) { - return deleteWithResponseAsync(resourceGroupName, accessControlListName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String accessControlListName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, accessControlListName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** @@ -815,76 +1117,168 @@ public Response deleteWithResponse(String resourceGroupName, String access * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accessControlListName) { - deleteWithResponse(resourceGroupName, accessControlListName, Context.NONE); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String accessControlListName) { + return this.beginDeleteAsync(resourceGroupName, accessControlListName).getSyncPoller(); } /** - * List AccessControlLists by resource group. + * Deletes a Access Control List. * - *

Implements AccessControlLists list by resource group GET method. + *

Implements Access Control List DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String accessControlListName, Context context) { + return this.beginDeleteAsync(resourceGroupName, accessControlListName, context).getSyncPoller(); } /** - * List AccessControlLists by resource group. + * Deletes a Access Control List. * - *

Implements AccessControlLists list by resource group GET method. + *

Implements Access Control List DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String accessControlListName) { + return beginDeleteAsync(resourceGroupName, accessControlListName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Access Control List. + * + *

Implements Access Control List DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String accessControlListName, Context context) { + return beginDeleteAsync(resourceGroupName, accessControlListName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Access Control List. + * + *

Implements Access Control List DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accessControlListName) { + deleteAsync(resourceGroupName, accessControlListName).block(); + } + + /** + * Deletes a Access Control List. + * + *

Implements Access Control List DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accessControlListName, Context context) { + deleteAsync(resourceGroupName, accessControlListName, context).block(); + } + + /** + * List AccessControlLists by resource group. + * + *

Implements AccessControlLists list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List AccessControlLists by resource group. + * + *

Implements AccessControlLists list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -935,7 +1329,7 @@ private Mono> listByResourceGroupSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists as paginated response with {@link PagedFlux}. + * @return list of Access Control Lists as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -954,7 +1348,7 @@ private PagedFlux listByResourceGroupAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists as paginated response with {@link PagedFlux}. + * @return list of Access Control Lists as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -972,7 +1366,7 @@ private PagedFlux listByResourceGroupAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists as paginated response with {@link PagedIterable}. + * @return list of Access Control Lists as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -989,7 +1383,7 @@ public PagedIterable listByResourceGroup(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists as paginated response with {@link PagedIterable}. + * @return list of Access Control Lists as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -1003,7 +1397,7 @@ public PagedIterable listByResourceGroup(String resource * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1051,7 +1445,7 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1094,7 +1488,7 @@ private Mono> listSinglePageAsync(Context * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists as paginated response with {@link PagedFlux}. + * @return list of Access Control Lists as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1111,7 +1505,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists as paginated response with {@link PagedFlux}. + * @return list of Access Control Lists as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1126,7 +1520,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists as paginated response with {@link PagedIterable}. + * @return list of Access Control Lists as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1142,13 +1536,866 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists as paginated response with {@link PagedIterable}. + * @return list of Access Control Lists as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { return new PagedIterable<>(listAsync(context)); } + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateAdministrativeStateWithResponseAsync( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accessControlListName == null) { + return Mono + .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateAdministrativeState( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accessControlListName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateAdministrativeStateWithResponseAsync( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accessControlListName == null) { + return Mono + .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateAdministrativeState( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accessControlListName, + body, + accept, + context); + } + + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body) { + Mono>> mono = + updateAdministrativeStateWithResponseAsync(resourceGroupName, accessControlListName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); + } + + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateAdministrativeStateWithResponseAsync(resourceGroupName, accessControlListName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); + } + + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body) { + return this.beginUpdateAdministrativeStateAsync(resourceGroupName, accessControlListName, body).getSyncPoller(); + } + + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body, Context context) { + return this + .beginUpdateAdministrativeStateAsync(resourceGroupName, accessControlListName, body, context) + .getSyncPoller(); + } + + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, accessControlListName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body, Context context) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, accessControlListName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body) { + return updateAdministrativeStateAsync(resourceGroupName, accessControlListName, body).block(); + } + + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body, Context context) { + return updateAdministrativeStateAsync(resourceGroupName, accessControlListName, body, context).block(); + } + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resyncWithResponseAsync( + String resourceGroupName, String accessControlListName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accessControlListName == null) { + return Mono + .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .resync( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accessControlListName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resyncWithResponseAsync( + String resourceGroupName, String accessControlListName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accessControlListName == null) { + return Mono + .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .resync( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accessControlListName, + accept, + context); + } + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginResyncAsync(String resourceGroupName, String accessControlListName) { + Mono>> mono = resyncWithResponseAsync(resourceGroupName, accessControlListName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); + } + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginResyncAsync(String resourceGroupName, String accessControlListName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + resyncWithResponseAsync(resourceGroupName, accessControlListName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); + } + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginResync(String resourceGroupName, String accessControlListName) { + return this.beginResyncAsync(resourceGroupName, accessControlListName).getSyncPoller(); + } + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginResync(String resourceGroupName, String accessControlListName, Context context) { + return this.beginResyncAsync(resourceGroupName, accessControlListName, context).getSyncPoller(); + } + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resyncAsync( + String resourceGroupName, String accessControlListName) { + return beginResyncAsync(resourceGroupName, accessControlListName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resyncAsync( + String resourceGroupName, String accessControlListName, Context context) { + return beginResyncAsync(resourceGroupName, accessControlListName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String accessControlListName) { + return resyncAsync(resourceGroupName, accessControlListName).block(); + } + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner resync( + String resourceGroupName, String accessControlListName, Context context) { + return resyncAsync(resourceGroupName, accessControlListName, context).block(); + } + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateConfigurationWithResponseAsync( + String resourceGroupName, String accessControlListName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accessControlListName == null) { + return Mono + .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .validateConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accessControlListName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateConfigurationWithResponseAsync( + String resourceGroupName, String accessControlListName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accessControlListName == null) { + return Mono + .error(new IllegalArgumentException("Parameter accessControlListName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .validateConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accessControlListName, + accept, + context); + } + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ValidateConfigurationResponseInner> + beginValidateConfigurationAsync(String resourceGroupName, String accessControlListName) { + Mono>> mono = + validateConfigurationWithResponseAsync(resourceGroupName, accessControlListName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ValidateConfigurationResponseInner.class, + ValidateConfigurationResponseInner.class, + this.client.getContext()); + } + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ValidateConfigurationResponseInner> + beginValidateConfigurationAsync(String resourceGroupName, String accessControlListName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + validateConfigurationWithResponseAsync(resourceGroupName, accessControlListName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ValidateConfigurationResponseInner.class, + ValidateConfigurationResponseInner.class, + context); + } + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String accessControlListName) { + return this.beginValidateConfigurationAsync(resourceGroupName, accessControlListName).getSyncPoller(); + } + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String accessControlListName, Context context) { + return this.beginValidateConfigurationAsync(resourceGroupName, accessControlListName, context).getSyncPoller(); + } + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateConfigurationAsync( + String resourceGroupName, String accessControlListName) { + return beginValidateConfigurationAsync(resourceGroupName, accessControlListName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateConfigurationAsync( + String resourceGroupName, String accessControlListName, Context context) { + return beginValidateConfigurationAsync(resourceGroupName, accessControlListName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String accessControlListName) { + return validateConfigurationAsync(resourceGroupName, accessControlListName).block(); + } + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String accessControlListName, Context context) { + return validateConfigurationAsync(resourceGroupName, accessControlListName, context).block(); + } + /** * Get the next page of items. * @@ -1157,7 +2404,7 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1195,7 +2442,7 @@ private Mono> listByResourceGroupNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( @@ -1232,7 +2479,7 @@ private Mono> listByResourceGroupNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1270,7 +2517,7 @@ private Mono> listBySubscriptionNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Access Control Lists along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsImpl.java index ce3d5e44c5c22..cdd29d11f18b4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AccessControlListsImpl.java @@ -11,8 +11,13 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.AccessControlListsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlLists; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; public final class AccessControlListsImpl implements AccessControlLists { private static final ClientLogger LOGGER = new ClientLogger(AccessControlListsImpl.class); @@ -53,15 +58,14 @@ public AccessControlList getByResourceGroup(String resourceGroupName, String acc } } - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String accessControlListName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, accessControlListName, context); - } - public void deleteByResourceGroup(String resourceGroupName, String accessControlListName) { this.serviceClient().delete(resourceGroupName, accessControlListName); } + public void delete(String resourceGroupName, String accessControlListName, Context context) { + this.serviceClient().delete(resourceGroupName, accessControlListName, context); + } + public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return Utils.mapPage(inner, inner1 -> new AccessControlListImpl(inner1, this.manager())); @@ -83,6 +87,70 @@ public PagedIterable list(Context context) { return Utils.mapPage(inner, inner1 -> new AccessControlListImpl(inner1, this.manager())); } + public CommonPostActionResponseForStateUpdate updateAdministrativeState( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().updateAdministrativeState(resourceGroupName, accessControlListName, body); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate updateAdministrativeState( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body, Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().updateAdministrativeState(resourceGroupName, accessControlListName, body, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String accessControlListName) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().resync(resourceGroupName, accessControlListName); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate resync( + String resourceGroupName, String accessControlListName, Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().resync(resourceGroupName, accessControlListName, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String accessControlListName) { + ValidateConfigurationResponseInner inner = + this.serviceClient().validateConfiguration(resourceGroupName, accessControlListName); + if (inner != null) { + return new ValidateConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ValidateConfigurationResponse validateConfiguration( + String resourceGroupName, String accessControlListName, Context context) { + ValidateConfigurationResponseInner inner = + this.serviceClient().validateConfiguration(resourceGroupName, accessControlListName, context); + if (inner != null) { + return new ValidateConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public AccessControlList getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -143,10 +211,10 @@ public void deleteById(String id) { .format( "The resource ID '%s' is not valid. Missing path segment 'accessControlLists'.", id))); } - this.deleteByResourceGroupWithResponse(resourceGroupName, accessControlListName, Context.NONE); + this.delete(resourceGroupName, accessControlListName, Context.NONE); } - public Response deleteByIdWithResponse(String id, Context context) { + public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER @@ -164,7 +232,7 @@ public Response deleteByIdWithResponse(String id, Context context) { .format( "The resource ID '%s' is not valid. Missing path segment 'accessControlLists'.", id))); } - return this.deleteByResourceGroupWithResponse(resourceGroupName, accessControlListName, context); + this.delete(resourceGroupName, accessControlListName, context); } private AccessControlListsClient serviceClient() { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AzureNetworkFabricManagementServiceApiBuilder.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AzureNetworkFabricManagementServiceApiBuilder.java index c8c9d78d60a42..0abbd8fab6ef8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AzureNetworkFabricManagementServiceApiBuilder.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AzureNetworkFabricManagementServiceApiBuilder.java @@ -18,12 +18,12 @@ @ServiceClientBuilder(serviceClients = {AzureNetworkFabricManagementServiceApiImpl.class}) public final class AzureNetworkFabricManagementServiceApiBuilder { /* - * The ID of the target subscription. + * The ID of the target subscription. The value must be an UUID. */ private String subscriptionId; /** - * Sets The ID of the target subscription. + * Sets The ID of the target subscription. The value must be an UUID. * * @param subscriptionId the subscriptionId value. * @return the AzureNetworkFabricManagementServiceApiBuilder. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AzureNetworkFabricManagementServiceApiImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AzureNetworkFabricManagementServiceApiImpl.java index 394bbcee7d927..d70400988b47d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AzureNetworkFabricManagementServiceApiImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/AzureNetworkFabricManagementServiceApiImpl.java @@ -26,19 +26,24 @@ import com.azure.resourcemanager.managednetworkfabric.fluent.AzureNetworkFabricManagementServiceApi; import com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient; import com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient; import com.azure.resourcemanager.managednetworkfabric.fluent.IpCommunitiesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.IpExtendedCommunitiesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.IpPrefixesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDeviceSkusClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricControllersClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricSkusClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRackSkusClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.OperationsClient; import com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient; @@ -54,11 +59,11 @@ /** Initializes a new instance of the AzureNetworkFabricManagementServiceApiImpl type. */ @ServiceClient(builder = AzureNetworkFabricManagementServiceApiBuilder.class) public final class AzureNetworkFabricManagementServiceApiImpl implements AzureNetworkFabricManagementServiceApi { - /** The ID of the target subscription. */ + /** The ID of the target subscription. The value must be an UUID. */ private final String subscriptionId; /** - * Gets The ID of the target subscription. + * Gets The ID of the target subscription. The value must be an UUID. * * @return the subscriptionId value. */ @@ -138,6 +143,30 @@ public AccessControlListsClient getAccessControlLists() { return this.accessControlLists; } + /** The InternetGatewaysClient object to access its operations. */ + private final InternetGatewaysClient internetGateways; + + /** + * Gets the InternetGatewaysClient object to access its operations. + * + * @return the InternetGatewaysClient object. + */ + public InternetGatewaysClient getInternetGateways() { + return this.internetGateways; + } + + /** The InternetGatewayRulesClient object to access its operations. */ + private final InternetGatewayRulesClient internetGatewayRules; + + /** + * Gets the InternetGatewayRulesClient object to access its operations. + * + * @return the InternetGatewayRulesClient object. + */ + public InternetGatewayRulesClient getInternetGatewayRules() { + return this.internetGatewayRules; + } + /** The IpCommunitiesClient object to access its operations. */ private final IpCommunitiesClient ipCommunities; @@ -222,6 +251,18 @@ public ExternalNetworksClient getExternalNetworks() { return this.externalNetworks; } + /** The NeighborGroupsClient object to access its operations. */ + private final NeighborGroupsClient neighborGroups; + + /** + * Gets the NeighborGroupsClient object to access its operations. + * + * @return the NeighborGroupsClient object. + */ + public NeighborGroupsClient getNeighborGroups() { + return this.neighborGroups; + } + /** The NetworkDeviceSkusClient object to access its operations. */ private final NetworkDeviceSkusClient networkDeviceSkus; @@ -306,16 +347,16 @@ public NetworkToNetworkInterconnectsClient getNetworkToNetworkInterconnects() { return this.networkToNetworkInterconnects; } - /** The NetworkRackSkusClient object to access its operations. */ - private final NetworkRackSkusClient networkRackSkus; + /** The NetworkPacketBrokersClient object to access its operations. */ + private final NetworkPacketBrokersClient networkPacketBrokers; /** - * Gets the NetworkRackSkusClient object to access its operations. + * Gets the NetworkPacketBrokersClient object to access its operations. * - * @return the NetworkRackSkusClient object. + * @return the NetworkPacketBrokersClient object. */ - public NetworkRackSkusClient getNetworkRackSkus() { - return this.networkRackSkus; + public NetworkPacketBrokersClient getNetworkPacketBrokers() { + return this.networkPacketBrokers; } /** The NetworkRacksClient object to access its operations. */ @@ -330,6 +371,30 @@ public NetworkRacksClient getNetworkRacks() { return this.networkRacks; } + /** The NetworkTapRulesClient object to access its operations. */ + private final NetworkTapRulesClient networkTapRules; + + /** + * Gets the NetworkTapRulesClient object to access its operations. + * + * @return the NetworkTapRulesClient object. + */ + public NetworkTapRulesClient getNetworkTapRules() { + return this.networkTapRules; + } + + /** The NetworkTapsClient object to access its operations. */ + private final NetworkTapsClient networkTaps; + + /** + * Gets the NetworkTapsClient object to access its operations. + * + * @return the NetworkTapsClient object. + */ + public NetworkTapsClient getNetworkTaps() { + return this.networkTaps; + } + /** The OperationsClient object to access its operations. */ private final OperationsClient operations; @@ -361,7 +426,7 @@ public RoutePoliciesClient getRoutePolicies() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param endpoint server parameter. */ AzureNetworkFabricManagementServiceApiImpl( @@ -376,8 +441,10 @@ public RoutePoliciesClient getRoutePolicies() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-02-01-preview"; + this.apiVersion = "2023-06-15"; this.accessControlLists = new AccessControlListsClientImpl(this); + this.internetGateways = new InternetGatewaysClientImpl(this); + this.internetGatewayRules = new InternetGatewayRulesClientImpl(this); this.ipCommunities = new IpCommunitiesClientImpl(this); this.ipExtendedCommunities = new IpExtendedCommunitiesClientImpl(this); this.ipPrefixes = new IpPrefixesClientImpl(this); @@ -385,6 +452,7 @@ public RoutePoliciesClient getRoutePolicies() { this.l3IsolationDomains = new L3IsolationDomainsClientImpl(this); this.internalNetworks = new InternalNetworksClientImpl(this); this.externalNetworks = new ExternalNetworksClientImpl(this); + this.neighborGroups = new NeighborGroupsClientImpl(this); this.networkDeviceSkus = new NetworkDeviceSkusClientImpl(this); this.networkDevices = new NetworkDevicesClientImpl(this); this.networkInterfaces = new NetworkInterfacesClientImpl(this); @@ -392,8 +460,10 @@ public RoutePoliciesClient getRoutePolicies() { this.networkFabricSkus = new NetworkFabricSkusClientImpl(this); this.networkFabrics = new NetworkFabricsClientImpl(this); this.networkToNetworkInterconnects = new NetworkToNetworkInterconnectsClientImpl(this); - this.networkRackSkus = new NetworkRackSkusClientImpl(this); + this.networkPacketBrokers = new NetworkPacketBrokersClientImpl(this); this.networkRacks = new NetworkRacksClientImpl(this); + this.networkTapRules = new NetworkTapRulesClientImpl(this); + this.networkTaps = new NetworkTapsClientImpl(this); this.operations = new OperationsClientImpl(this); this.routePolicies = new RoutePoliciesClientImpl(this); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceUpdateImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceUpdateImpl.java new file mode 100644 index 0000000000000..030fe9d3858ab --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForDeviceUpdateImpl.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import java.util.Collections; +import java.util.List; + +public final class CommonPostActionResponseForDeviceUpdateImpl implements CommonPostActionResponseForDeviceUpdate { + private CommonPostActionResponseForDeviceUpdateInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + CommonPostActionResponseForDeviceUpdateImpl( + CommonPostActionResponseForDeviceUpdateInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public List successfulDevices() { + List inner = this.innerModel().successfulDevices(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List failedDevices() { + List inner = this.innerModel().failedDevices(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public CommonPostActionResponseForDeviceUpdateInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/SupportPackagePropertiesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForStateUpdateImpl.java similarity index 52% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/SupportPackagePropertiesImpl.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForStateUpdateImpl.java index 2391f8633af15..4af9fc341afb6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/SupportPackagePropertiesImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/CommonPostActionResponseForStateUpdateImpl.java @@ -4,26 +4,27 @@ package com.azure.resourcemanager.managednetworkfabric.implementation; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.SupportPackagePropertiesInner; -import com.azure.resourcemanager.managednetworkfabric.models.SupportPackageProperties; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; -public final class SupportPackagePropertiesImpl implements SupportPackageProperties { - private SupportPackagePropertiesInner innerObject; +public final class CommonPostActionResponseForStateUpdateImpl implements CommonPostActionResponseForStateUpdate { + private CommonPostActionResponseForStateUpdateInner innerObject; private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; - SupportPackagePropertiesImpl( - SupportPackagePropertiesInner innerObject, + CommonPostActionResponseForStateUpdateImpl( + CommonPostActionResponseForStateUpdateInner innerObject, com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } - public String supportPackageUrl() { - return this.innerModel().supportPackageUrl(); + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); } - public SupportPackagePropertiesInner innerModel() { + public CommonPostActionResponseForStateUpdateInner innerModel() { return this.innerObject; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkImpl.java index a72c2647ab1c6..27c72b375a6d2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworkImpl.java @@ -7,18 +7,19 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3OptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Collections; -import java.util.List; public final class ExternalNetworkImpl implements ExternalNetwork, ExternalNetwork.Definition, ExternalNetwork.Update { private ExternalNetworkInner innerObject; @@ -45,33 +46,28 @@ public String networkToNetworkInterconnectId() { return this.innerModel().networkToNetworkInterconnectId(); } - public List disabledOnResources() { - List inner = this.innerModel().disabledOnResources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public PeeringOption peeringOption() { + return this.innerModel().peeringOption(); } - public EnabledDisabledState administrativeState() { - return this.innerModel().administrativeState(); + public L3OptionBProperties optionBProperties() { + return this.innerModel().optionBProperties(); } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public ExternalNetworkPropertiesOptionAProperties optionAProperties() { + return this.innerModel().optionAProperties(); } - public PeeringOption peeringOption() { - return this.innerModel().peeringOption(); + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); } - public OptionBProperties optionBProperties() { - return this.innerModel().optionBProperties(); + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); } - public ExternalNetworkPropertiesOptionAProperties optionAProperties() { - return this.innerModel().optionAProperties(); + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); } public String importRoutePolicyId() { @@ -82,6 +78,14 @@ public String exportRoutePolicyId() { return this.innerModel().exportRoutePolicyId(); } + public ImportRoutePolicy importRoutePolicy() { + return this.innerModel().importRoutePolicy(); + } + + public ExportRoutePolicy exportRoutePolicy() { + return this.innerModel().exportRoutePolicy(); + } + public String annotation() { return this.innerModel().annotation(); } @@ -190,67 +194,35 @@ public ExternalNetwork refresh(Context context) { return this; } - public void updateAdministrativeState(UpdateAdministrativeState body) { - serviceManager + public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body) { + return serviceManager .externalNetworks() .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); } - public void updateAdministrativeState(UpdateAdministrativeState body, Context context) { - serviceManager + public CommonPostActionResponseForStateUpdate updateAdministrativeState( + UpdateAdministrativeState body, Context context) { + return serviceManager .externalNetworks() .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); } - public void updateBgpAdministrativeState(UpdateAdministrativeState body) { - serviceManager - .externalNetworks() - .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - } - - public void updateBgpAdministrativeState(UpdateAdministrativeState body, Context context) { - serviceManager - .externalNetworks() - .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); - } - - public void updateBfdForBgpAdministrativeState(UpdateAdministrativeState body) { - serviceManager + public CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState( + UpdateAdministrativeState body) { + return serviceManager .externalNetworks() - .updateBfdForBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); + .updateStaticRouteBfdAdministrativeState( + resourceGroupName, l3IsolationDomainName, externalNetworkName, body); } - public void updateBfdForBgpAdministrativeState(UpdateAdministrativeState body, Context context) { - serviceManager + public CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState( + UpdateAdministrativeState body, Context context) { + return serviceManager .externalNetworks() - .updateBfdForBgpAdministrativeState( + .updateStaticRouteBfdAdministrativeState( resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); } - public void clearIpv6Neighbors(EnableDisableOnResources body) { - serviceManager - .externalNetworks() - .clearIpv6Neighbors(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - } - - public void clearIpv6Neighbors(EnableDisableOnResources body, Context context) { - serviceManager - .externalNetworks() - .clearIpv6Neighbors(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); - } - - public void clearArpEntries(EnableDisableOnResources body) { - serviceManager - .externalNetworks() - .clearArpEntries(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - } - - public void clearArpEntries(EnableDisableOnResources body, Context context) { - serviceManager - .externalNetworks() - .clearArpEntries(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); - } - public ExternalNetworkImpl withPeeringOption(PeeringOption peeringOption) { if (isInCreateMode()) { this.innerModel().withPeeringOption(peeringOption); @@ -261,7 +233,7 @@ public ExternalNetworkImpl withPeeringOption(PeeringOption peeringOption) { } } - public ExternalNetworkImpl withOptionBProperties(OptionBProperties optionBProperties) { + public ExternalNetworkImpl withOptionBProperties(L3OptionBProperties optionBProperties) { if (isInCreateMode()) { this.innerModel().withOptionBProperties(optionBProperties); return this; @@ -296,6 +268,26 @@ public ExternalNetworkImpl withExportRoutePolicyId(String exportRoutePolicyId) { } } + public ExternalNetworkImpl withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { + if (isInCreateMode()) { + this.innerModel().withImportRoutePolicy(importRoutePolicy); + return this; + } else { + this.updateBody.withImportRoutePolicy(importRoutePolicy); + return this; + } + } + + public ExternalNetworkImpl withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { + if (isInCreateMode()) { + this.innerModel().withExportRoutePolicy(exportRoutePolicy); + return this; + } else { + this.updateBody.withExportRoutePolicy(exportRoutePolicy); + return this; + } + } + public ExternalNetworkImpl withAnnotation(String annotation) { if (isInCreateMode()) { this.innerModel().withAnnotation(annotation); @@ -306,7 +298,8 @@ public ExternalNetworkImpl withAnnotation(String annotation) { } } - public ExternalNetworkImpl withOptionAProperties(Layer3OptionAProperties optionAProperties) { + public ExternalNetworkImpl withOptionAProperties( + ExternalNetworkPatchPropertiesOptionAProperties optionAProperties) { this.updateBody.withOptionAProperties(optionAProperties); return this; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksClientImpl.java index e562be301af95..0d3d95d1bf718 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksClientImpl.java @@ -34,8 +34,8 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatch; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworksList; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -119,7 +119,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}") - @ExpectedResponses({200, 202, 204}) + @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @HostParam("$host") String endpoint, @@ -136,7 +136,7 @@ Mono>> delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( + Mono> listByL3IsolationDomain( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -148,7 +148,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState") - @ExpectedResponses({202}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateAdministrativeState( @HostParam("$host") String endpoint, @@ -163,26 +163,10 @@ Mono>> updateAdministrativeState( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateBgpAdministrativeState") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateBgpAdministrativeState( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @PathParam("externalNetworkName") String externalNetworkName, - @BodyParam("application/json") UpdateAdministrativeState body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateBfdForBgpAdministrativeState") - @ExpectedResponses({202}) + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateStaticRouteBfdAdministrativeState") + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateBfdForBgpAdministrativeState( + Mono>> updateStaticRouteBfdAdministrativeState( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -193,43 +177,11 @@ Mono>> updateBfdForBgpAdministrativeState( @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/clearIpv6Neighbors") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> clearIpv6Neighbors( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @PathParam("externalNetworkName") String externalNetworkName, - @BodyParam("application/json") EnableDisableOnResources body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/clearArpEntries") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> clearArpEntries( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @PathParam("externalNetworkName") String externalNetworkName, - @BodyParam("application/json") EnableDisableOnResources body, - @HeaderParam("Accept") String accept, - Context context); - @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( + Mono> listByL3IsolationDomainNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, @@ -242,13 +194,14 @@ Mono> listNext( *

Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item along with {@link Response} on successful completion of {@link Mono}. + * @return defines the External Network resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -306,14 +259,15 @@ private Mono>> createWithResponseAsync( *

Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item along with {@link Response} on successful completion of {@link Mono}. + * @return defines the External Network resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -372,13 +326,13 @@ private Mono>> createWithResponseAsync( *

Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the ExternalNetwork item. + * @return the {@link PollerFlux} for polling of defines the External Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ExternalNetworkInner> beginCreateAsync( @@ -401,14 +355,14 @@ private PollerFlux, ExternalNetworkInner> begin *

Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the ExternalNetwork item. + * @return the {@link PollerFlux} for polling of defines the External Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ExternalNetworkInner> beginCreateAsync( @@ -432,13 +386,13 @@ private PollerFlux, ExternalNetworkInner> begin *

Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the ExternalNetwork item. + * @return the {@link SyncPoller} for polling of defines the External Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExternalNetworkInner> beginCreate( @@ -454,14 +408,14 @@ public SyncPoller, ExternalNetworkInner> beginC *

Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the ExternalNetwork item. + * @return the {@link SyncPoller} for polling of defines the External Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExternalNetworkInner> beginCreate( @@ -481,13 +435,13 @@ public SyncPoller, ExternalNetworkInner> beginC *

Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item on successful completion of {@link Mono}. + * @return defines the External Network resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -503,14 +457,14 @@ private Mono createAsync( *

Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item on successful completion of {@link Mono}. + * @return defines the External Network resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -530,13 +484,13 @@ private Mono createAsync( *

Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item. + * @return defines the External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public ExternalNetworkInner create( @@ -550,14 +504,14 @@ public ExternalNetworkInner create( *

Creates ExternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item. + * @return defines the External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public ExternalNetworkInner create( @@ -575,12 +529,13 @@ public ExternalNetworkInner create( *

Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item along with {@link Response} on successful completion of {@link Mono}. + * @return defines the External Network resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -632,13 +587,14 @@ private Mono> getWithResponseAsync( *

Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item along with {@link Response} on successful completion of {@link Mono}. + * @return defines the External Network resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -687,12 +643,12 @@ private Mono> getWithResponseAsync( *

Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item on successful completion of {@link Mono}. + * @return defines the External Network resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -707,13 +663,13 @@ private Mono getAsync( *

Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item along with {@link Response}. + * @return defines the External Network resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -727,12 +683,12 @@ public Response getWithResponse( *

Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item. + * @return defines the External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public ExternalNetworkInner get( @@ -741,18 +697,19 @@ public ExternalNetworkInner get( } /** - * Updates a ExternalNetworks. + * Updates a External Networks. * *

API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item along with {@link Response} on successful completion of {@link Mono}. + * @return defines the External Network resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -805,19 +762,20 @@ private Mono>> updateWithResponseAsync( } /** - * Updates a ExternalNetworks. + * Updates a External Networks. * *

API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item along with {@link Response} on successful completion of {@link Mono}. + * @return defines the External Network resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -871,18 +829,18 @@ private Mono>> updateWithResponseAsync( } /** - * Updates a ExternalNetworks. + * Updates a External Networks. * *

API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the ExternalNetwork item. + * @return the {@link PollerFlux} for polling of defines the External Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ExternalNetworkInner> beginUpdateAsync( @@ -900,19 +858,19 @@ private PollerFlux, ExternalNetworkInner> begin } /** - * Updates a ExternalNetworks. + * Updates a External Networks. * *

API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the ExternalNetwork item. + * @return the {@link PollerFlux} for polling of defines the External Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ExternalNetworkInner> beginUpdateAsync( @@ -931,18 +889,18 @@ private PollerFlux, ExternalNetworkInner> begin } /** - * Updates a ExternalNetworks. + * Updates a External Networks. * *

API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the ExternalNetwork item. + * @return the {@link SyncPoller} for polling of defines the External Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExternalNetworkInner> beginUpdate( @@ -953,19 +911,19 @@ public SyncPoller, ExternalNetworkInner> beginU } /** - * Updates a ExternalNetworks. + * Updates a External Networks. * *

API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the ExternalNetwork item. + * @return the {@link SyncPoller} for polling of defines the External Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExternalNetworkInner> beginUpdate( @@ -980,18 +938,18 @@ public SyncPoller, ExternalNetworkInner> beginU } /** - * Updates a ExternalNetworks. + * Updates a External Networks. * *

API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item on successful completion of {@link Mono}. + * @return defines the External Network resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1002,19 +960,19 @@ private Mono updateAsync( } /** - * Updates a ExternalNetworks. + * Updates a External Networks. * *

API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item on successful completion of {@link Mono}. + * @return defines the External Network resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1029,18 +987,18 @@ private Mono updateAsync( } /** - * Updates a ExternalNetworks. + * Updates a External Networks. * *

API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item. + * @return defines the External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public ExternalNetworkInner update( @@ -1049,19 +1007,19 @@ public ExternalNetworkInner update( } /** - * Updates a ExternalNetworks. + * Updates a External Networks. * *

API to update certain properties of the ExternalNetworks resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body ExternalNetwork properties to update. Only annotations are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item. + * @return defines the External Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public ExternalNetworkInner update( @@ -1079,8 +1037,8 @@ public ExternalNetworkInner update( *

Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1136,8 +1094,8 @@ private Mono>> deleteWithResponseAsync( *

Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1191,8 +1149,8 @@ private Mono>> deleteWithResponseAsync( *

Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1215,8 +1173,8 @@ private PollerFlux, Void> beginDeleteAsync( *

Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1240,8 +1198,8 @@ private PollerFlux, Void> beginDeleteAsync( *

Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1259,8 +1217,8 @@ public SyncPoller, Void> beginDelete( *

Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1281,8 +1239,8 @@ public SyncPoller, Void> beginDelete( *

Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1301,8 +1259,8 @@ private Mono deleteAsync(String resourceGroupName, String l3IsolationDomai *

Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1323,8 +1281,8 @@ private Mono deleteAsync( *

Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1340,8 +1298,8 @@ public void delete(String resourceGroupName, String l3IsolationDomainName, Strin *

Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1359,14 +1317,14 @@ public void delete( *

Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ExternalNetworks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of External Networks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listByL3IsolationDomainSinglePageAsync( String resourceGroupName, String l3IsolationDomainName) { if (this.client.getEndpoint() == null) { return Mono @@ -1393,7 +1351,7 @@ private Mono> listSinglePageAsync( .withContext( context -> service - .list( + .listByL3IsolationDomain( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1419,15 +1377,15 @@ private Mono> listSinglePageAsync( *

Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ExternalNetworks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of External Networks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listByL3IsolationDomainSinglePageAsync( String resourceGroupName, String l3IsolationDomainName, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1452,7 +1410,7 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( + .listByL3IsolationDomain( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1477,17 +1435,18 @@ private Mono> listSinglePageAsync( *

Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ExternalNetworks as paginated response with {@link PagedFlux}. + * @return list of External Networks as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String l3IsolationDomainName) { + private PagedFlux listByL3IsolationDomainAsync( + String resourceGroupName, String l3IsolationDomainName) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, l3IsolationDomainName), - nextLink -> listNextSinglePageAsync(nextLink)); + () -> listByL3IsolationDomainSinglePageAsync(resourceGroupName, l3IsolationDomainName), + nextLink -> listByL3IsolationDomainNextSinglePageAsync(nextLink)); } /** @@ -1496,19 +1455,19 @@ private PagedFlux listAsync(String resourceGroupName, Stri *

Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ExternalNetworks as paginated response with {@link PagedFlux}. + * @return list of External Networks as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listByL3IsolationDomainAsync( String resourceGroupName, String l3IsolationDomainName, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, l3IsolationDomainName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + () -> listByL3IsolationDomainSinglePageAsync(resourceGroupName, l3IsolationDomainName, context), + nextLink -> listByL3IsolationDomainNextSinglePageAsync(nextLink, context)); } /** @@ -1517,15 +1476,16 @@ private PagedFlux listAsync( *

Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ExternalNetworks as paginated response with {@link PagedIterable}. + * @return list of External Networks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String l3IsolationDomainName) { - return new PagedIterable<>(listAsync(resourceGroupName, l3IsolationDomainName)); + public PagedIterable listByL3IsolationDomain( + String resourceGroupName, String l3IsolationDomainName) { + return new PagedIterable<>(listByL3IsolationDomainAsync(resourceGroupName, l3IsolationDomainName)); } /** @@ -1534,17 +1494,17 @@ public PagedIterable list(String resourceGroupName, String *

Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ExternalNetworks as paginated response with {@link PagedIterable}. + * @return list of External Networks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable listByL3IsolationDomain( String resourceGroupName, String l3IsolationDomainName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, l3IsolationDomainName, context)); + return new PagedIterable<>(listByL3IsolationDomainAsync(resourceGroupName, l3IsolationDomainName, context)); } /** @@ -1553,13 +1513,14 @@ public PagedIterable list( *

Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync( @@ -1620,14 +1581,15 @@ private Mono>> updateAdministrativeStateWithResponseAs *

Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync( @@ -1686,27 +1648,33 @@ private Mono>> updateAdministrativeStateWithResponseAs *

Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, + String l3IsolationDomainName, + String externalNetworkName, + UpdateAdministrativeState body) { Mono>> mono = updateAdministrativeStateWithResponseAsync( resourceGroupName, l3IsolationDomainName, externalNetworkName, body); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); } /** @@ -1715,29 +1683,36 @@ private PollerFlux, Void> beginUpdateAdministrativeStateAsync( *

Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body, - Context context) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, + String l3IsolationDomainName, + String externalNetworkName, + UpdateAdministrativeState body, + Context context) { context = this.client.mergeContext(context); Mono>> mono = updateAdministrativeStateWithResponseAsync( resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); } /** @@ -1746,20 +1721,22 @@ private PollerFlux, Void> beginUpdateAdministrativeStateAsync( *

Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body) { + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String externalNetworkName, + UpdateAdministrativeState body) { return this .beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) .getSyncPoller(); @@ -1771,22 +1748,24 @@ public SyncPoller, Void> beginUpdateAdministrativeState( *

Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body, - Context context) { + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String externalNetworkName, + UpdateAdministrativeState body, + Context context) { return this .beginUpdateAdministrativeStateAsync( resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) @@ -1799,16 +1778,16 @@ public SyncPoller, Void> beginUpdateAdministrativeState( *

Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync( + private Mono updateAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, @@ -1824,17 +1803,17 @@ private Mono updateAdministrativeStateAsync( *

Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync( + private Mono updateAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, @@ -1852,20 +1831,22 @@ private Mono updateAdministrativeStateAsync( *

Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateAdministrativeState( + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body).block(); + return updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) + .block(); } /** @@ -1874,41 +1855,44 @@ public void updateAdministrativeState( *

Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateAdministrativeState( + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) + return updateAdministrativeStateAsync( + resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) .block(); } /** - * Executes BGP state update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BGP for externalNetwork. + *

Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateBgpAdministrativeStateWithResponseAsync( + private Mono>> updateStaticRouteBfdAdministrativeStateWithResponseAsync( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, @@ -1947,7 +1931,7 @@ private Mono>> updateBgpAdministrativeStateWithRespons .withContext( context -> service - .updateBgpAdministrativeState( + .updateStaticRouteBfdAdministrativeState( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1961,22 +1945,23 @@ private Mono>> updateBgpAdministrativeStateWithRespons } /** - * Executes BGP state update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BGP for externalNetwork. + *

Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateBgpAdministrativeStateWithResponseAsync( + private Mono>> updateStaticRouteBfdAdministrativeStateWithResponseAsync( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, @@ -2014,7 +1999,7 @@ private Mono>> updateBgpAdministrativeStateWithRespons final String accept = "application/json"; context = this.client.mergeContext(context); return service - .updateBgpAdministrativeState( + .updateStaticRouteBfdAdministrativeState( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -2027,1278 +2012,267 @@ private Mono>> updateBgpAdministrativeStateWithRespons } /** - * Executes BGP state update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BGP for externalNetwork. + *

Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateBgpAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateStaticRouteBfdAdministrativeStateAsync( + String resourceGroupName, + String l3IsolationDomainName, + String externalNetworkName, + UpdateAdministrativeState body) { Mono>> mono = - updateBgpAdministrativeStateWithResponseAsync( + updateStaticRouteBfdAdministrativeStateWithResponseAsync( resourceGroupName, l3IsolationDomainName, externalNetworkName, body); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); } /** - * Executes BGP state update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BGP for externalNetwork. + *

Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateBgpAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body, - Context context) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateStaticRouteBfdAdministrativeStateAsync( + String resourceGroupName, + String l3IsolationDomainName, + String externalNetworkName, + UpdateAdministrativeState body, + Context context) { context = this.client.mergeContext(context); Mono>> mono = - updateBgpAdministrativeStateWithResponseAsync( + updateStaticRouteBfdAdministrativeStateWithResponseAsync( resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); } /** - * Executes BGP state update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BGP for externalNetwork. + *

Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body) { + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateStaticRouteBfdAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String externalNetworkName, + UpdateAdministrativeState body) { return this - .beginUpdateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) + .beginUpdateStaticRouteBfdAdministrativeStateAsync( + resourceGroupName, l3IsolationDomainName, externalNetworkName, body) .getSyncPoller(); } /** - * Executes BGP state update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BGP for externalNetwork. + *

Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body, - Context context) { + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateStaticRouteBfdAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String externalNetworkName, + UpdateAdministrativeState body, + Context context) { return this - .beginUpdateBgpAdministrativeStateAsync( + .beginUpdateStaticRouteBfdAdministrativeStateAsync( resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) .getSyncPoller(); } /** - * Executes BGP state update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BGP for externalNetwork. + *

Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateBgpAdministrativeStateAsync( + private Mono updateStaticRouteBfdAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - return beginUpdateBgpAdministrativeStateAsync( + return beginUpdateStaticRouteBfdAdministrativeStateAsync( resourceGroupName, l3IsolationDomainName, externalNetworkName, body) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Executes BGP state update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BGP for externalNetwork. + *

Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateBgpAdministrativeStateAsync( + private Mono updateStaticRouteBfdAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - return beginUpdateBgpAdministrativeStateAsync( + return beginUpdateStaticRouteBfdAdministrativeStateAsync( resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Executes BGP state update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BGP for externalNetwork. + *

Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateBgpAdministrativeState( + public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - updateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body).block(); + return updateStaticRouteBfdAdministrativeStateAsync( + resourceGroupName, l3IsolationDomainName, externalNetworkName, body) + .block(); } /** - * Executes BGP state update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BGP for externalNetwork. + *

Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateBgpAdministrativeState( + public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - updateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) + return updateStaticRouteBfdAdministrativeStateAsync( + resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) .block(); } /** - * Execute BfdForBgp update operation to the underlying resources. - * - *

Update BfdForBgp for externalNetwork. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return list of External Networks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateBfdForBgpAdministrativeStateWithResponseAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body) { + private Mono> listByL3IsolationDomainNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .updateBfdForBgpAdministrativeState( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - l3IsolationDomainName, - externalNetworkName, - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute BfdForBgp update operation to the underlying resources. - * - *

Update BfdForBgp for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateBfdForBgpAdministrativeStateWithResponseAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .updateBfdForBgpAdministrativeState( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - l3IsolationDomainName, - externalNetworkName, - body, - accept, - context); - } - - /** - * Execute BfdForBgp update operation to the underlying resources. - * - *

Update BfdForBgp for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateBfdForBgpAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body) { - Mono>> mono = - updateBfdForBgpAdministrativeStateWithResponseAsync( - resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Execute BfdForBgp update operation to the underlying resources. - * - *

Update BfdForBgp for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateBfdForBgpAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateBfdForBgpAdministrativeStateWithResponseAsync( - resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Execute BfdForBgp update operation to the underlying resources. - * - *

Update BfdForBgp for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateBfdForBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body) { - return this - .beginUpdateBfdForBgpAdministrativeStateAsync( - resourceGroupName, l3IsolationDomainName, externalNetworkName, body) - .getSyncPoller(); - } - - /** - * Execute BfdForBgp update operation to the underlying resources. - * - *

Update BfdForBgp for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateBfdForBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body, - Context context) { - return this - .beginUpdateBfdForBgpAdministrativeStateAsync( - resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) - .getSyncPoller(); - } - - /** - * Execute BfdForBgp update operation to the underlying resources. - * - *

Update BfdForBgp for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateBfdForBgpAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body) { - return beginUpdateBfdForBgpAdministrativeStateAsync( - resourceGroupName, l3IsolationDomainName, externalNetworkName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute BfdForBgp update operation to the underlying resources. - * - *

Update BfdForBgp for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateBfdForBgpAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body, - Context context) { - return beginUpdateBfdForBgpAdministrativeStateAsync( - resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Execute BfdForBgp update operation to the underlying resources. - * - *

Update BfdForBgp for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void updateBfdForBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body) { - updateBfdForBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) - .block(); - } - - /** - * Execute BfdForBgp update operation to the underlying resources. - * - *

Update BfdForBgp for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void updateBfdForBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body, - Context context) { - updateBfdForBgpAdministrativeStateAsync( - resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) - .block(); - } - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> clearIpv6NeighborsWithResponseAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .clearIpv6Neighbors( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - l3IsolationDomainName, - externalNetworkName, - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> clearIpv6NeighborsWithResponseAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .clearIpv6Neighbors( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - l3IsolationDomainName, - externalNetworkName, - body, - accept, - context); - } - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClearIpv6NeighborsAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body) { - Mono>> mono = - clearIpv6NeighborsWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClearIpv6NeighborsAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - clearIpv6NeighborsWithResponseAsync( - resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body) { - return this - .beginClearIpv6NeighborsAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) - .getSyncPoller(); - } - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context) { - return this - .beginClearIpv6NeighborsAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) - .getSyncPoller(); - } - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono clearIpv6NeighborsAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body) { - return beginClearIpv6NeighborsAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono clearIpv6NeighborsAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context) { - return beginClearIpv6NeighborsAsync( - resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void clearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body) { - clearIpv6NeighborsAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body).block(); - } - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void clearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context) { - clearIpv6NeighborsAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context).block(); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> clearArpEntriesWithResponseAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .clearArpEntries( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - l3IsolationDomainName, - externalNetworkName, - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> clearArpEntriesWithResponseAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (externalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter externalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .clearArpEntries( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - l3IsolationDomainName, - externalNetworkName, - body, - accept, - context); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClearArpEntriesAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body) { - Mono>> mono = - clearArpEntriesWithResponseAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClearArpEntriesAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - clearArpEntriesWithResponseAsync( - resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body) { - return this - .beginClearArpEntriesAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) - .getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context) { - return this - .beginClearArpEntriesAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) - .getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono clearArpEntriesAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body) { - return beginClearArpEntriesAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono clearArpEntriesAsync( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context) { - return beginClearArpEntriesAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void clearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body) { - clearArpEntriesAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body).block(); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void clearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context) { - clearArpEntriesAsync(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ExternalNetworks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByL3IsolationDomainNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( res -> new PagedResponseBase<>( @@ -3320,10 +2294,11 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ExternalNetworks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of External Networks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByL3IsolationDomainNextSinglePageAsync( + String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -3336,7 +2311,7 @@ private Mono> listNextSinglePageAsync(String final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) + .listByL3IsolationDomainNext(nextLink, this.client.getEndpoint(), accept, context) .map( res -> new PagedResponseBase<>( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksImpl.java index c85469a1ce2df..494228ee54fa7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ExternalNetworksImpl.java @@ -10,8 +10,9 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.ExternalNetworksClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworks; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -66,118 +67,87 @@ public void delete( this.serviceClient().delete(resourceGroupName, l3IsolationDomainName, externalNetworkName, context); } - public PagedIterable list(String resourceGroupName, String l3IsolationDomainName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, l3IsolationDomainName); + public PagedIterable listByL3IsolationDomain( + String resourceGroupName, String l3IsolationDomainName) { + PagedIterable inner = + this.serviceClient().listByL3IsolationDomain(resourceGroupName, l3IsolationDomainName); return Utils.mapPage(inner, inner1 -> new ExternalNetworkImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable listByL3IsolationDomain( String resourceGroupName, String l3IsolationDomainName, Context context) { PagedIterable inner = - this.serviceClient().list(resourceGroupName, l3IsolationDomainName, context); + this.serviceClient().listByL3IsolationDomain(resourceGroupName, l3IsolationDomainName, context); return Utils.mapPage(inner, inner1 -> new ExternalNetworkImpl(inner1, this.manager())); } - public void updateAdministrativeState( + public CommonPostActionResponseForStateUpdate updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - this - .serviceClient() - .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - } - - public void updateAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body, - Context context) { - this - .serviceClient() - .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); - } - - public void updateBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body) { - this - .serviceClient() - .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void updateBgpAdministrativeState( + public CommonPostActionResponseForStateUpdate updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - this - .serviceClient() - .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateAdministrativeState( + resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void updateBfdForBgpAdministrativeState( + public CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body) { - this - .serviceClient() - .updateBfdForBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateStaticRouteBfdAdministrativeState( + resourceGroupName, l3IsolationDomainName, externalNetworkName, body); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void updateBfdForBgpAdministrativeState( + public CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context) { - this - .serviceClient() - .updateBfdForBgpAdministrativeState( - resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); - } - - public void clearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body) { - this.serviceClient().clearIpv6Neighbors(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - } - - public void clearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context) { - this - .serviceClient() - .clearIpv6Neighbors(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); - } - - public void clearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body) { - this.serviceClient().clearArpEntries(resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - } - - public void clearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context) { - this - .serviceClient() - .clearArpEntries(resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateStaticRouteBfdAdministrativeState( + resourceGroupName, l3IsolationDomainName, externalNetworkName, body, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } } public ExternalNetwork getById(String id) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/GetDeviceStatusPropertiesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/GetDeviceStatusPropertiesImpl.java deleted file mode 100644 index bc53d8a81c2c5..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/GetDeviceStatusPropertiesImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.implementation; - -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetDeviceStatusPropertiesInner; -import com.azure.resourcemanager.managednetworkfabric.models.GetDeviceStatusProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OperationalStatus; -import com.azure.resourcemanager.managednetworkfabric.models.PowerCycleState; - -public final class GetDeviceStatusPropertiesImpl implements GetDeviceStatusProperties { - private GetDeviceStatusPropertiesInner innerObject; - - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; - - GetDeviceStatusPropertiesImpl( - GetDeviceStatusPropertiesInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public OperationalStatus operationalStatus() { - return this.innerModel().operationalStatus(); - } - - public PowerCycleState powerCycleState() { - return this.innerModel().powerCycleState(); - } - - public String serialNumber() { - return this.innerModel().serialNumber(); - } - - public GetDeviceStatusPropertiesInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/GetDynamicInterfaceMapsPropertiesItemImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/GetDynamicInterfaceMapsPropertiesItemImpl.java deleted file mode 100644 index 5e2e9b94b632f..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/GetDynamicInterfaceMapsPropertiesItemImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.implementation; - -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetDynamicInterfaceMapsPropertiesItemInner; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; -import com.azure.resourcemanager.managednetworkfabric.models.GetDynamicInterfaceMapsPropertiesItem; - -public final class GetDynamicInterfaceMapsPropertiesItemImpl implements GetDynamicInterfaceMapsPropertiesItem { - private GetDynamicInterfaceMapsPropertiesItemInner innerObject; - - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; - - GetDynamicInterfaceMapsPropertiesItemImpl( - GetDynamicInterfaceMapsPropertiesItemInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public EnabledDisabledState administrativeState() { - return this.innerModel().administrativeState(); - } - - public String operationalStatus() { - return this.innerModel().operationalStatus(); - } - - public String phyStatus() { - return this.innerModel().phyStatus(); - } - - public String transceiverStatus() { - return this.innerModel().transceiverStatus(); - } - - public String connectedTo() { - return this.innerModel().connectedTo(); - } - - public String name() { - return this.innerModel().name(); - } - - public GetDynamicInterfaceMapsPropertiesItemInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/GetStaticInterfaceMapsPropertiesItemImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/GetStaticInterfaceMapsPropertiesItemImpl.java deleted file mode 100644 index 2a2179f4e7843..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/GetStaticInterfaceMapsPropertiesItemImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.implementation; - -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetStaticInterfaceMapsPropertiesItemInner; -import com.azure.resourcemanager.managednetworkfabric.models.GetStaticInterfaceMapsPropertiesItem; - -public final class GetStaticInterfaceMapsPropertiesItemImpl implements GetStaticInterfaceMapsPropertiesItem { - private GetStaticInterfaceMapsPropertiesItemInner innerObject; - - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; - - GetStaticInterfaceMapsPropertiesItemImpl( - GetStaticInterfaceMapsPropertiesItemInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public String description() { - return this.innerModel().description(); - } - - public String identifier() { - return this.innerModel().identifier(); - } - - public String interfaceType() { - return this.innerModel().interfaceType(); - } - - public String connectorType() { - return this.innerModel().connectorType(); - } - - public String connectedTo() { - return this.innerModel().connectedTo(); - } - - public Float speed() { - return this.innerModel().speed(); - } - - public Float channelGroupId() { - return this.innerModel().channelGroupId(); - } - - public GetStaticInterfaceMapsPropertiesItemInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InterfaceStatusImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InterfaceStatusImpl.java deleted file mode 100644 index 85a712c55c5c6..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InterfaceStatusImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.implementation; - -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InterfaceStatusInner; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; -import com.azure.resourcemanager.managednetworkfabric.models.InterfaceStatus; - -public final class InterfaceStatusImpl implements InterfaceStatus { - private InterfaceStatusInner innerObject; - - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; - - InterfaceStatusImpl( - InterfaceStatusInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public EnabledDisabledState administrativeState() { - return this.innerModel().administrativeState(); - } - - public String operationalStatus() { - return this.innerModel().operationalStatus(); - } - - public String phyStatus() { - return this.innerModel().phyStatus(); - } - - public String transceiverStatus() { - return this.innerModel().transceiverStatus(); - } - - public String connectedTo() { - return this.innerModel().connectedTo(); - } - - public InterfaceStatusInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkImpl.java index f8f71c9ba2908..96fafa48b2885 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworkImpl.java @@ -7,12 +7,19 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.Extension; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatch; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -40,52 +47,28 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public List disabledOnResources() { - List inner = this.innerModel().disabledOnResources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public EnabledDisabledState administrativeState() { - return this.innerModel().administrativeState(); + public int vlanId() { + return this.innerModel().vlanId(); } - public List bgpDisabledOnResources() { - List inner = this.innerModel().bgpDisabledOnResources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public InternalNetworkPropertiesBgpConfiguration bgpConfiguration() { + return this.innerModel().bgpConfiguration(); } - public List bfdDisabledOnResources() { - List inner = this.innerModel().bfdDisabledOnResources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration() { + return this.innerModel().staticRouteConfiguration(); } - public List bfdForStaticRoutesDisabledOnResources() { - List inner = this.innerModel().bfdForStaticRoutesDisabledOnResources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); } public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } - public int vlanId() { - return this.innerModel().vlanId(); + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); } public Integer mtu() { @@ -110,14 +93,6 @@ public List connectedIPv6Subnets() { } } - public StaticRouteConfiguration staticRouteConfiguration() { - return this.innerModel().staticRouteConfiguration(); - } - - public BgpConfiguration bgpConfiguration() { - return this.innerModel().bgpConfiguration(); - } - public String importRoutePolicyId() { return this.innerModel().importRoutePolicyId(); } @@ -126,6 +101,30 @@ public String exportRoutePolicyId() { return this.innerModel().exportRoutePolicyId(); } + public ImportRoutePolicy importRoutePolicy() { + return this.innerModel().importRoutePolicy(); + } + + public ExportRoutePolicy exportRoutePolicy() { + return this.innerModel().exportRoutePolicy(); + } + + public String ingressAclId() { + return this.innerModel().ingressAclId(); + } + + public String egressAclId() { + return this.innerModel().egressAclId(); + } + + public IsMonitoringEnabled isMonitoringEnabled() { + return this.innerModel().isMonitoringEnabled(); + } + + public Extension extension() { + return this.innerModel().extension(); + } + public String annotation() { return this.innerModel().annotation(); } @@ -234,83 +233,61 @@ public InternalNetwork refresh(Context context) { return this; } - public void updateAdministrativeState(UpdateAdministrativeState body) { - serviceManager + public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body) { + return serviceManager .internalNetworks() .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); } - public void updateAdministrativeState(UpdateAdministrativeState body, Context context) { - serviceManager + public CommonPostActionResponseForStateUpdate updateAdministrativeState( + UpdateAdministrativeState body, Context context) { + return serviceManager .internalNetworks() .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); } - public void updateBgpAdministrativeState(UpdateAdministrativeState body) { - serviceManager + public CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(UpdateAdministrativeState body) { + return serviceManager .internalNetworks() .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); } - public void updateBgpAdministrativeState(UpdateAdministrativeState body, Context context) { - serviceManager + public CommonPostActionResponseForStateUpdate updateBgpAdministrativeState( + UpdateAdministrativeState body, Context context) { + return serviceManager .internalNetworks() .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); } - public void updateBfdForBgpAdministrativeState(UpdateAdministrativeState body) { - serviceManager + public CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState( + UpdateAdministrativeState body) { + return serviceManager .internalNetworks() - .updateBfdForBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + .updateStaticRouteBfdAdministrativeState( + resourceGroupName, l3IsolationDomainName, internalNetworkName, body); } - public void updateBfdForBgpAdministrativeState(UpdateAdministrativeState body, Context context) { - serviceManager + public CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState( + UpdateAdministrativeState body, Context context) { + return serviceManager .internalNetworks() - .updateBfdForBgpAdministrativeState( + .updateStaticRouteBfdAdministrativeState( resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); } - public void clearIpv6Neighbors(EnableDisableOnResources body) { - serviceManager - .internalNetworks() - .clearIpv6Neighbors(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - } - - public void clearIpv6Neighbors(EnableDisableOnResources body, Context context) { - serviceManager - .internalNetworks() - .clearIpv6Neighbors(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); - } - - public void clearArpEntries(EnableDisableOnResources body) { - serviceManager - .internalNetworks() - .clearArpEntries(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - } - - public void clearArpEntries(EnableDisableOnResources body, Context context) { - serviceManager - .internalNetworks() - .clearArpEntries(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); - } - - public void updateBfdForStaticRouteAdministrativeState(UpdateAdministrativeState body) { - serviceManager - .internalNetworks() - .updateBfdForStaticRouteAdministrativeState( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + public InternalNetworkImpl withVlanId(int vlanId) { + this.innerModel().withVlanId(vlanId); + return this; } - public void updateBfdForStaticRouteAdministrativeState(UpdateAdministrativeState body, Context context) { - serviceManager - .internalNetworks() - .updateBfdForStaticRouteAdministrativeState( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); + public InternalNetworkImpl withBgpConfiguration(InternalNetworkPropertiesBgpConfiguration bgpConfiguration) { + this.innerModel().withBgpConfiguration(bgpConfiguration); + return this; } - public InternalNetworkImpl withVlanId(int vlanId) { - this.innerModel().withVlanId(vlanId); + public InternalNetworkImpl withStaticRouteConfiguration( + InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration) { + this.innerModel().withStaticRouteConfiguration(staticRouteConfiguration); return this; } @@ -344,46 +321,81 @@ public InternalNetworkImpl withConnectedIPv6Subnets(List connec } } - public InternalNetworkImpl withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration) { + public InternalNetworkImpl withImportRoutePolicyId(String importRoutePolicyId) { if (isInCreateMode()) { - this.innerModel().withStaticRouteConfiguration(staticRouteConfiguration); + this.innerModel().withImportRoutePolicyId(importRoutePolicyId); return this; } else { - this.updateBody.withStaticRouteConfiguration(staticRouteConfiguration); + this.updateBody.withImportRoutePolicyId(importRoutePolicyId); return this; } } - public InternalNetworkImpl withBgpConfiguration(BgpConfiguration bgpConfiguration) { + public InternalNetworkImpl withExportRoutePolicyId(String exportRoutePolicyId) { if (isInCreateMode()) { - this.innerModel().withBgpConfiguration(bgpConfiguration); + this.innerModel().withExportRoutePolicyId(exportRoutePolicyId); return this; } else { - this.updateBody.withBgpConfiguration(bgpConfiguration); + this.updateBody.withExportRoutePolicyId(exportRoutePolicyId); return this; } } - public InternalNetworkImpl withImportRoutePolicyId(String importRoutePolicyId) { + public InternalNetworkImpl withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { if (isInCreateMode()) { - this.innerModel().withImportRoutePolicyId(importRoutePolicyId); + this.innerModel().withImportRoutePolicy(importRoutePolicy); return this; } else { - this.updateBody.withImportRoutePolicyId(importRoutePolicyId); + this.updateBody.withImportRoutePolicy(importRoutePolicy); return this; } } - public InternalNetworkImpl withExportRoutePolicyId(String exportRoutePolicyId) { + public InternalNetworkImpl withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { if (isInCreateMode()) { - this.innerModel().withExportRoutePolicyId(exportRoutePolicyId); + this.innerModel().withExportRoutePolicy(exportRoutePolicy); return this; } else { - this.updateBody.withExportRoutePolicyId(exportRoutePolicyId); + this.updateBody.withExportRoutePolicy(exportRoutePolicy); + return this; + } + } + + public InternalNetworkImpl withIngressAclId(String ingressAclId) { + if (isInCreateMode()) { + this.innerModel().withIngressAclId(ingressAclId); + return this; + } else { + this.updateBody.withIngressAclId(ingressAclId); return this; } } + public InternalNetworkImpl withEgressAclId(String egressAclId) { + if (isInCreateMode()) { + this.innerModel().withEgressAclId(egressAclId); + return this; + } else { + this.updateBody.withEgressAclId(egressAclId); + return this; + } + } + + public InternalNetworkImpl withIsMonitoringEnabled(IsMonitoringEnabled isMonitoringEnabled) { + if (isInCreateMode()) { + this.innerModel().withIsMonitoringEnabled(isMonitoringEnabled); + return this; + } else { + this.updateBody.withIsMonitoringEnabled(isMonitoringEnabled); + return this; + } + } + + public InternalNetworkImpl withExtension(Extension extension) { + this.innerModel().withExtension(extension); + return this; + } + public InternalNetworkImpl withAnnotation(String annotation) { if (isInCreateMode()) { this.innerModel().withAnnotation(annotation); @@ -394,6 +406,16 @@ public InternalNetworkImpl withAnnotation(String annotation) { } } + public InternalNetworkImpl withBgpConfiguration(BgpConfiguration bgpConfiguration) { + this.updateBody.withBgpConfiguration(bgpConfiguration); + return this; + } + + public InternalNetworkImpl withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration) { + this.updateBody.withStaticRouteConfiguration(staticRouteConfiguration); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksClientImpl.java index 60af1b285127f..e1818aa04b938 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksClientImpl.java @@ -34,8 +34,8 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatch; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworksList; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -119,7 +119,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}") - @ExpectedResponses({200, 202, 204}) + @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @HostParam("$host") String endpoint, @@ -136,7 +136,7 @@ Mono>> delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( + Mono> listByL3IsolationDomain( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -148,7 +148,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState") - @ExpectedResponses({202}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateAdministrativeState( @HostParam("$host") String endpoint, @@ -164,7 +164,7 @@ Mono>> updateAdministrativeState( @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState") - @ExpectedResponses({202}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateBgpAdministrativeState( @HostParam("$host") String endpoint, @@ -179,58 +179,10 @@ Mono>> updateBgpAdministrativeState( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBfdForBgpAdministrativeState") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateBfdForBgpAdministrativeState( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @PathParam("internalNetworkName") String internalNetworkName, - @BodyParam("application/json") UpdateAdministrativeState body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/clearIpv6Neighbors") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> clearIpv6Neighbors( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @PathParam("internalNetworkName") String internalNetworkName, - @BodyParam("application/json") EnableDisableOnResources body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/clearArpEntries") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> clearArpEntries( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @PathParam("internalNetworkName") String internalNetworkName, - @BodyParam("application/json") EnableDisableOnResources body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBfdForStaticRouteAdministrativeState") - @ExpectedResponses({202}) + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateStaticRouteBfdAdministrativeState") + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateBfdForStaticRouteAdministrativeState( + Mono>> updateStaticRouteBfdAdministrativeState( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -245,7 +197,7 @@ Mono>> updateBfdForStaticRouteAdministrativeState( @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( + Mono> listByL3IsolationDomainNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, @@ -258,13 +210,14 @@ Mono> listNext( *

Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the InternalNetwork item along with {@link Response} on successful completion of {@link Mono}. + * @return defines the Internal Network resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -322,14 +275,15 @@ private Mono>> createWithResponseAsync( *

Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the InternalNetwork item along with {@link Response} on successful completion of {@link Mono}. + * @return defines the Internal Network resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -388,13 +342,13 @@ private Mono>> createWithResponseAsync( *

Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the InternalNetwork item. + * @return the {@link PollerFlux} for polling of defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, InternalNetworkInner> beginCreateAsync( @@ -417,14 +371,14 @@ private PollerFlux, InternalNetworkInner> begin *

Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the InternalNetwork item. + * @return the {@link PollerFlux} for polling of defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, InternalNetworkInner> beginCreateAsync( @@ -448,13 +402,13 @@ private PollerFlux, InternalNetworkInner> begin *

Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the InternalNetwork item. + * @return the {@link SyncPoller} for polling of defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InternalNetworkInner> beginCreate( @@ -470,14 +424,14 @@ public SyncPoller, InternalNetworkInner> beginC *

Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the InternalNetwork item. + * @return the {@link SyncPoller} for polling of defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InternalNetworkInner> beginCreate( @@ -497,13 +451,13 @@ public SyncPoller, InternalNetworkInner> beginC *

Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the InternalNetwork item on successful completion of {@link Mono}. + * @return defines the Internal Network resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -519,14 +473,14 @@ private Mono createAsync( *

Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the InternalNetwork item on successful completion of {@link Mono}. + * @return defines the Internal Network resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -546,13 +500,13 @@ private Mono createAsync( *

Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the InternalNetwork item. + * @return defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public InternalNetworkInner create( @@ -566,14 +520,14 @@ public InternalNetworkInner create( *

Creates InternalNetwork PUT method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the InternalNetwork item. + * @return defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public InternalNetworkInner create( @@ -591,8 +545,8 @@ public InternalNetworkInner create( *

Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -648,8 +602,8 @@ private Mono> getWithResponseAsync( *

Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -703,8 +657,8 @@ private Mono> getWithResponseAsync( *

Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -723,8 +677,8 @@ private Mono getAsync( *

Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -743,8 +697,8 @@ public Response getWithResponse( *

Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -762,13 +716,14 @@ public InternalNetworkInner get( *

Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the InternalNetwork item along with {@link Response} on successful completion of {@link Mono}. + * @return defines the Internal Network resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -826,14 +781,15 @@ private Mono>> updateWithResponseAsync( *

Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the InternalNetwork item along with {@link Response} on successful completion of {@link Mono}. + * @return defines the Internal Network resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -892,13 +848,13 @@ private Mono>> updateWithResponseAsync( *

Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the InternalNetwork item. + * @return the {@link PollerFlux} for polling of defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, InternalNetworkInner> beginUpdateAsync( @@ -921,14 +877,14 @@ private PollerFlux, InternalNetworkInner> begin *

Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of defines the InternalNetwork item. + * @return the {@link PollerFlux} for polling of defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, InternalNetworkInner> beginUpdateAsync( @@ -952,13 +908,13 @@ private PollerFlux, InternalNetworkInner> begin *

Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the InternalNetwork item. + * @return the {@link SyncPoller} for polling of defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InternalNetworkInner> beginUpdate( @@ -974,14 +930,14 @@ public SyncPoller, InternalNetworkInner> beginU *

Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of defines the InternalNetwork item. + * @return the {@link SyncPoller} for polling of defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, InternalNetworkInner> beginUpdate( @@ -1001,13 +957,13 @@ public SyncPoller, InternalNetworkInner> beginU *

Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the InternalNetwork item on successful completion of {@link Mono}. + * @return defines the Internal Network resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1023,14 +979,14 @@ private Mono updateAsync( *

Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the InternalNetwork item on successful completion of {@link Mono}. + * @return defines the Internal Network resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1050,13 +1006,13 @@ private Mono updateAsync( *

Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the InternalNetwork item. + * @return defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public InternalNetworkInner update( @@ -1070,14 +1026,14 @@ public InternalNetworkInner update( *

Updates a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body InternalNetwork properties to update. Only annotations are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the InternalNetwork item. + * @return defines the Internal Network resource. */ @ServiceMethod(returns = ReturnType.SINGLE) public InternalNetworkInner update( @@ -1095,8 +1051,8 @@ public InternalNetworkInner update( *

Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1152,8 +1108,8 @@ private Mono>> deleteWithResponseAsync( *

Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1207,8 +1163,8 @@ private Mono>> deleteWithResponseAsync( *

Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1231,8 +1187,8 @@ private PollerFlux, Void> beginDeleteAsync( *

Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1256,8 +1212,8 @@ private PollerFlux, Void> beginDeleteAsync( *

Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1275,8 +1231,8 @@ public SyncPoller, Void> beginDelete( *

Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1297,8 +1253,8 @@ public SyncPoller, Void> beginDelete( *

Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1317,8 +1273,8 @@ private Mono deleteAsync(String resourceGroupName, String l3IsolationDomai *

Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1339,8 +1295,8 @@ private Mono deleteAsync( *

Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1356,8 +1312,8 @@ public void delete(String resourceGroupName, String l3IsolationDomainName, Strin *

Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1375,14 +1331,14 @@ public void delete( *

Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternalNetworks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Internal Networks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listByL3IsolationDomainSinglePageAsync( String resourceGroupName, String l3IsolationDomainName) { if (this.client.getEndpoint() == null) { return Mono @@ -1409,7 +1365,7 @@ private Mono> listSinglePageAsync( .withContext( context -> service - .list( + .listByL3IsolationDomain( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1435,15 +1391,15 @@ private Mono> listSinglePageAsync( *

Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternalNetworks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Internal Networks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listByL3IsolationDomainSinglePageAsync( String resourceGroupName, String l3IsolationDomainName, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1468,7 +1424,7 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( + .listByL3IsolationDomain( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1493,17 +1449,18 @@ private Mono> listSinglePageAsync( *

Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternalNetworks as paginated response with {@link PagedFlux}. + * @return list of Internal Networks as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String l3IsolationDomainName) { + private PagedFlux listByL3IsolationDomainAsync( + String resourceGroupName, String l3IsolationDomainName) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, l3IsolationDomainName), - nextLink -> listNextSinglePageAsync(nextLink)); + () -> listByL3IsolationDomainSinglePageAsync(resourceGroupName, l3IsolationDomainName), + nextLink -> listByL3IsolationDomainNextSinglePageAsync(nextLink)); } /** @@ -1512,19 +1469,19 @@ private PagedFlux listAsync(String resourceGroupName, Stri *

Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternalNetworks as paginated response with {@link PagedFlux}. + * @return list of Internal Networks as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listByL3IsolationDomainAsync( String resourceGroupName, String l3IsolationDomainName, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, l3IsolationDomainName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + () -> listByL3IsolationDomainSinglePageAsync(resourceGroupName, l3IsolationDomainName, context), + nextLink -> listByL3IsolationDomainNextSinglePageAsync(nextLink, context)); } /** @@ -1533,15 +1490,16 @@ private PagedFlux listAsync( *

Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternalNetworks as paginated response with {@link PagedIterable}. + * @return list of Internal Networks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String l3IsolationDomainName) { - return new PagedIterable<>(listAsync(resourceGroupName, l3IsolationDomainName)); + public PagedIterable listByL3IsolationDomain( + String resourceGroupName, String l3IsolationDomainName) { + return new PagedIterable<>(listByL3IsolationDomainAsync(resourceGroupName, l3IsolationDomainName)); } /** @@ -1550,17 +1508,17 @@ public PagedIterable list(String resourceGroupName, String *

Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternalNetworks as paginated response with {@link PagedIterable}. + * @return list of Internal Networks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable listByL3IsolationDomain( String resourceGroupName, String l3IsolationDomainName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, l3IsolationDomainName, context)); + return new PagedIterable<>(listByL3IsolationDomainAsync(resourceGroupName, l3IsolationDomainName, context)); } /** @@ -1569,13 +1527,14 @@ public PagedIterable list( *

Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync( @@ -1636,14 +1595,15 @@ private Mono>> updateAdministrativeStateWithResponseAs *

Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync( @@ -1702,27 +1662,33 @@ private Mono>> updateAdministrativeStateWithResponseAs *

Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body) { Mono>> mono = updateAdministrativeStateWithResponseAsync( resourceGroupName, l3IsolationDomainName, internalNetworkName, body); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); } /** @@ -1731,29 +1697,36 @@ private PollerFlux, Void> beginUpdateAdministrativeStateAsync( *

Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body, + Context context) { context = this.client.mergeContext(context); Mono>> mono = updateAdministrativeStateWithResponseAsync( resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); } /** @@ -1762,20 +1735,22 @@ private PollerFlux, Void> beginUpdateAdministrativeStateAsync( *

Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body) { + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body) { return this .beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) .getSyncPoller(); @@ -1787,22 +1762,24 @@ public SyncPoller, Void> beginUpdateAdministrativeState( *

Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context) { + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body, + Context context) { return this .beginUpdateAdministrativeStateAsync( resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) @@ -1815,16 +1792,16 @@ public SyncPoller, Void> beginUpdateAdministrativeState( *

Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync( + private Mono updateAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, @@ -1840,17 +1817,17 @@ private Mono updateAdministrativeStateAsync( *

Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync( + private Mono updateAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, @@ -1868,20 +1845,22 @@ private Mono updateAdministrativeStateAsync( *

Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateAdministrativeState( + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body).block(); + return updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) + .block(); } /** @@ -1890,22 +1869,24 @@ public void updateAdministrativeState( *

Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateAdministrativeState( + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) + return updateAdministrativeStateAsync( + resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) .block(); } @@ -1915,13 +1896,14 @@ public void updateAdministrativeState( *

Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateBgpAdministrativeStateWithResponseAsync( @@ -1982,14 +1964,15 @@ private Mono>> updateBgpAdministrativeStateWithRespons *

Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateBgpAdministrativeStateWithResponseAsync( @@ -2048,27 +2031,33 @@ private Mono>> updateBgpAdministrativeStateWithRespons *

Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateBgpAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateBgpAdministrativeStateAsync( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body) { Mono>> mono = updateBgpAdministrativeStateWithResponseAsync( resourceGroupName, l3IsolationDomainName, internalNetworkName, body); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); } /** @@ -2077,29 +2066,36 @@ private PollerFlux, Void> beginUpdateBgpAdministrativeStateAsyn *

Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateBgpAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateBgpAdministrativeStateAsync( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body, + Context context) { context = this.client.mergeContext(context); Mono>> mono = updateBgpAdministrativeStateWithResponseAsync( resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); } /** @@ -2108,20 +2104,22 @@ private PollerFlux, Void> beginUpdateBgpAdministrativeStateAsyn *

Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body) { + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateBgpAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body) { return this .beginUpdateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) .getSyncPoller(); @@ -2133,22 +2131,24 @@ public SyncPoller, Void> beginUpdateBgpAdministrativeState( *

Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context) { + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateBgpAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body, + Context context) { return this .beginUpdateBgpAdministrativeStateAsync( resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) @@ -2161,16 +2161,16 @@ public SyncPoller, Void> beginUpdateBgpAdministrativeState( *

Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateBgpAdministrativeStateAsync( + private Mono updateBgpAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, @@ -2187,17 +2187,17 @@ private Mono updateBgpAdministrativeStateAsync( *

Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateBgpAdministrativeStateAsync( + private Mono updateBgpAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, @@ -2215,20 +2215,22 @@ private Mono updateBgpAdministrativeStateAsync( *

Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateBgpAdministrativeState( + public CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - updateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body).block(); + return updateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) + .block(); } /** @@ -2237,41 +2239,44 @@ public void updateBgpAdministrativeState( *

Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateBgpAdministrativeState( + public CommonPostActionResponseForStateUpdateInner updateBgpAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - updateBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) + return updateBgpAdministrativeStateAsync( + resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) .block(); } /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateBfdForBgpAdministrativeStateWithResponseAsync( + private Mono>> updateStaticRouteBfdAdministrativeStateWithResponseAsync( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, @@ -2310,7 +2315,7 @@ private Mono>> updateBfdForBgpAdministrativeStateWithR .withContext( context -> service - .updateBfdForBgpAdministrativeState( + .updateStaticRouteBfdAdministrativeState( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -2326,20 +2331,21 @@ private Mono>> updateBfdForBgpAdministrativeStateWithR /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateBfdForBgpAdministrativeStateWithResponseAsync( + private Mono>> updateStaticRouteBfdAdministrativeStateWithResponseAsync( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, @@ -2377,7 +2383,7 @@ private Mono>> updateBfdForBgpAdministrativeStateWithR final String accept = "application/json"; context = this.client.mergeContext(context); return service - .updateBfdForBgpAdministrativeState( + .updateStaticRouteBfdAdministrativeState( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -2392,85 +2398,100 @@ private Mono>> updateBfdForBgpAdministrativeStateWithR /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateBfdForBgpAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateStaticRouteBfdAdministrativeStateAsync( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body) { Mono>> mono = - updateBfdForBgpAdministrativeStateWithResponseAsync( + updateStaticRouteBfdAdministrativeStateWithResponseAsync( resourceGroupName, l3IsolationDomainName, internalNetworkName, body); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); } /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateBfdForBgpAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateStaticRouteBfdAdministrativeStateAsync( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body, + Context context) { context = this.client.mergeContext(context); Mono>> mono = - updateBfdForBgpAdministrativeStateWithResponseAsync( + updateStaticRouteBfdAdministrativeStateWithResponseAsync( resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); } /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateBfdForBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body) { + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateStaticRouteBfdAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body) { return this - .beginUpdateBfdForBgpAdministrativeStateAsync( + .beginUpdateStaticRouteBfdAdministrativeStateAsync( resourceGroupName, l3IsolationDomainName, internalNetworkName, body) .getSyncPoller(); } @@ -2478,27 +2499,29 @@ public SyncPoller, Void> beginUpdateBfdForBgpAdministrativeStat /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateBfdForBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context) { + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateStaticRouteBfdAdministrativeState( + String resourceGroupName, + String l3IsolationDomainName, + String internalNetworkName, + UpdateAdministrativeState body, + Context context) { return this - .beginUpdateBfdForBgpAdministrativeStateAsync( + .beginUpdateStaticRouteBfdAdministrativeStateAsync( resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) .getSyncPoller(); } @@ -2506,24 +2529,24 @@ public SyncPoller, Void> beginUpdateBfdForBgpAdministrativeStat /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateBfdForBgpAdministrativeStateAsync( + private Mono updateStaticRouteBfdAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - return beginUpdateBfdForBgpAdministrativeStateAsync( + return beginUpdateStaticRouteBfdAdministrativeStateAsync( resourceGroupName, l3IsolationDomainName, internalNetworkName, body) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -2532,26 +2555,26 @@ private Mono updateBfdForBgpAdministrativeStateAsync( /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateBfdForBgpAdministrativeStateAsync( + private Mono updateStaticRouteBfdAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - return beginUpdateBfdForBgpAdministrativeStateAsync( + return beginUpdateStaticRouteBfdAdministrativeStateAsync( resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -2560,1112 +2583,80 @@ private Mono updateBfdForBgpAdministrativeStateAsync( /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateBfdForBgpAdministrativeState( + public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - updateBfdForBgpAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) + return updateStaticRouteBfdAdministrativeStateAsync( + resourceGroupName, l3IsolationDomainName, internalNetworkName, body) .block(); } /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateBfdForBgpAdministrativeState( + public CommonPostActionResponseForStateUpdateInner updateStaticRouteBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - updateBfdForBgpAdministrativeStateAsync( + return updateStaticRouteBfdAdministrativeStateAsync( resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) .block(); } /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return list of Internal Networks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> clearIpv6NeighborsWithResponseAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body) { + private Mono> listByL3IsolationDomainNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .clearIpv6Neighbors( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - l3IsolationDomainName, - internalNetworkName, - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> clearIpv6NeighborsWithResponseAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .clearIpv6Neighbors( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - l3IsolationDomainName, - internalNetworkName, - body, - accept, - context); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClearIpv6NeighborsAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body) { - Mono>> mono = - clearIpv6NeighborsWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClearIpv6NeighborsAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - clearIpv6NeighborsWithResponseAsync( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body) { - return this - .beginClearIpv6NeighborsAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context) { - return this - .beginClearIpv6NeighborsAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) - .getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono clearIpv6NeighborsAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body) { - return beginClearIpv6NeighborsAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono clearIpv6NeighborsAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context) { - return beginClearIpv6NeighborsAsync( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void clearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body) { - clearIpv6NeighborsAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body).block(); - } - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void clearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context) { - clearIpv6NeighborsAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context).block(); - } - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> clearArpEntriesWithResponseAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .clearArpEntries( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - l3IsolationDomainName, - internalNetworkName, - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> clearArpEntriesWithResponseAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .clearArpEntries( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - l3IsolationDomainName, - internalNetworkName, - body, - accept, - context); - } - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClearArpEntriesAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body) { - Mono>> mono = - clearArpEntriesWithResponseAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClearArpEntriesAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - clearArpEntriesWithResponseAsync( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body) { - return this - .beginClearArpEntriesAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .getSyncPoller(); - } - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context) { - return this - .beginClearArpEntriesAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) - .getSyncPoller(); - } - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono clearArpEntriesAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body) { - return beginClearArpEntriesAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono clearArpEntriesAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context) { - return beginClearArpEntriesAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void clearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body) { - clearArpEntriesAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body).block(); - } - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void clearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context) { - clearArpEntriesAsync(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context).block(); - } - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateBfdForStaticRouteAdministrativeStateWithResponseAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .updateBfdForStaticRouteAdministrativeState( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - l3IsolationDomainName, - internalNetworkName, - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateBfdForStaticRouteAdministrativeStateWithResponseAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (internalNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter internalNetworkName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .updateBfdForStaticRouteAdministrativeState( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - l3IsolationDomainName, - internalNetworkName, - body, - accept, - context); - } - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateBfdForStaticRouteAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body) { - Mono>> mono = - updateBfdForStaticRouteAdministrativeStateWithResponseAsync( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateBfdForStaticRouteAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateBfdForStaticRouteAdministrativeStateWithResponseAsync( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateBfdForStaticRouteAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body) { - return this - .beginUpdateBfdForStaticRouteAdministrativeStateAsync( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .getSyncPoller(); - } - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateBfdForStaticRouteAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context) { - return this - .beginUpdateBfdForStaticRouteAdministrativeStateAsync( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) - .getSyncPoller(); - } - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateBfdForStaticRouteAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body) { - return beginUpdateBfdForStaticRouteAdministrativeStateAsync( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateBfdForStaticRouteAdministrativeStateAsync( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context) { - return beginUpdateBfdForStaticRouteAdministrativeStateAsync( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void updateBfdForStaticRouteAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body) { - updateBfdForStaticRouteAdministrativeStateAsync( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body) - .block(); - } - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void updateBfdForStaticRouteAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context) { - updateBfdForStaticRouteAdministrativeStateAsync( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context) - .block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternalNetworks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByL3IsolationDomainNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( res -> new PagedResponseBase<>( @@ -3687,10 +2678,11 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternalNetworks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Internal Networks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByL3IsolationDomainNextSinglePageAsync( + String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -3703,7 +2695,7 @@ private Mono> listNextSinglePageAsync(String final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) + .listByL3IsolationDomainNext(nextLink, this.client.getEndpoint(), accept, context) .map( res -> new PagedResponseBase<>( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksImpl.java index 1480faf8ea781..f1069595a1f3e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternalNetworksImpl.java @@ -10,8 +10,9 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.InternalNetworksClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworks; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -66,141 +67,121 @@ public void delete( this.serviceClient().delete(resourceGroupName, l3IsolationDomainName, internalNetworkName, context); } - public PagedIterable list(String resourceGroupName, String l3IsolationDomainName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, l3IsolationDomainName); + public PagedIterable listByL3IsolationDomain( + String resourceGroupName, String l3IsolationDomainName) { + PagedIterable inner = + this.serviceClient().listByL3IsolationDomain(resourceGroupName, l3IsolationDomainName); return Utils.mapPage(inner, inner1 -> new InternalNetworkImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable listByL3IsolationDomain( String resourceGroupName, String l3IsolationDomainName, Context context) { PagedIterable inner = - this.serviceClient().list(resourceGroupName, l3IsolationDomainName, context); + this.serviceClient().listByL3IsolationDomain(resourceGroupName, l3IsolationDomainName, context); return Utils.mapPage(inner, inner1 -> new InternalNetworkImpl(inner1, this.manager())); } - public void updateAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body) { - this - .serviceClient() - .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - } - - public void updateAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context) { - this - .serviceClient() - .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); - } - - public void updateBgpAdministrativeState( + public CommonPostActionResponseForStateUpdate updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - this - .serviceClient() - .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void updateBgpAdministrativeState( + public CommonPostActionResponseForStateUpdate updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - this - .serviceClient() - .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateAdministrativeState( + resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void updateBfdForBgpAdministrativeState( + public CommonPostActionResponseForStateUpdate updateBgpAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - this - .serviceClient() - .updateBfdForBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateBgpAdministrativeState(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void updateBfdForBgpAdministrativeState( + public CommonPostActionResponseForStateUpdate updateBgpAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - this - .serviceClient() - .updateBfdForBgpAdministrativeState( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); - } - - public void clearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body) { - this.serviceClient().clearIpv6Neighbors(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - } - - public void clearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context) { - this - .serviceClient() - .clearIpv6Neighbors(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); - } - - public void clearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body) { - this.serviceClient().clearArpEntries(resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - } - - public void clearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context) { - this - .serviceClient() - .clearArpEntries(resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateBgpAdministrativeState( + resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void updateBfdForStaticRouteAdministrativeState( + public CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body) { - this - .serviceClient() - .updateBfdForStaticRouteAdministrativeState( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateStaticRouteBfdAdministrativeState( + resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void updateBfdForStaticRouteAdministrativeState( + public CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, UpdateAdministrativeState body, Context context) { - this - .serviceClient() - .updateBfdForStaticRouteAdministrativeState( - resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateStaticRouteBfdAdministrativeState( + resourceGroupName, l3IsolationDomainName, internalNetworkName, body, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } } public InternalNetwork getById(String id) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayImpl.java new file mode 100644 index 0000000000000..70ecb353efa1b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayImpl.java @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayInner; +import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGateway; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import java.util.Collections; +import java.util.Map; + +public final class InternetGatewayImpl implements InternetGateway, InternetGateway.Definition, InternetGateway.Update { + private InternetGatewayInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String ipv4Address() { + return this.innerModel().ipv4Address(); + } + + public Integer port() { + return this.innerModel().port(); + } + + public GatewayType typePropertiesType() { + return this.innerModel().typePropertiesType(); + } + + public String networkFabricControllerId() { + return this.innerModel().networkFabricControllerId(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String internetGatewayRuleId() { + return this.innerModel().internetGatewayRuleId(); + } + + public String annotation() { + return this.innerModel().annotation(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public InternetGatewayInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String internetGatewayName; + + private InternetGatewayPatch updateBody; + + public InternetGatewayImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public InternetGateway create() { + this.innerObject = + serviceManager + .serviceClient() + .getInternetGateways() + .create(resourceGroupName, internetGatewayName, this.innerModel(), Context.NONE); + return this; + } + + public InternetGateway create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getInternetGateways() + .create(resourceGroupName, internetGatewayName, this.innerModel(), context); + return this; + } + + InternetGatewayImpl( + String name, com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = new InternetGatewayInner(); + this.serviceManager = serviceManager; + this.internetGatewayName = name; + } + + public InternetGatewayImpl update() { + this.updateBody = new InternetGatewayPatch(); + return this; + } + + public InternetGateway apply() { + this.innerObject = + serviceManager + .serviceClient() + .getInternetGateways() + .update(resourceGroupName, internetGatewayName, updateBody, Context.NONE); + return this; + } + + public InternetGateway apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getInternetGateways() + .update(resourceGroupName, internetGatewayName, updateBody, context); + return this; + } + + InternetGatewayImpl( + InternetGatewayInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.internetGatewayName = Utils.getValueFromIdByName(innerObject.id(), "internetGateways"); + } + + public InternetGateway refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getInternetGateways() + .getByResourceGroupWithResponse(resourceGroupName, internetGatewayName, Context.NONE) + .getValue(); + return this; + } + + public InternetGateway refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getInternetGateways() + .getByResourceGroupWithResponse(resourceGroupName, internetGatewayName, context) + .getValue(); + return this; + } + + public InternetGatewayImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public InternetGatewayImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public InternetGatewayImpl withTypePropertiesType(GatewayType typePropertiesType) { + this.innerModel().withTypePropertiesType(typePropertiesType); + return this; + } + + public InternetGatewayImpl withNetworkFabricControllerId(String networkFabricControllerId) { + this.innerModel().withNetworkFabricControllerId(networkFabricControllerId); + return this; + } + + public InternetGatewayImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public InternetGatewayImpl withInternetGatewayRuleId(String internetGatewayRuleId) { + if (isInCreateMode()) { + this.innerModel().withInternetGatewayRuleId(internetGatewayRuleId); + return this; + } else { + this.updateBody.withInternetGatewayRuleId(internetGatewayRuleId); + return this; + } + } + + public InternetGatewayImpl withAnnotation(String annotation) { + this.innerModel().withAnnotation(annotation); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRuleImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRuleImpl.java new file mode 100644 index 0000000000000..6dfc5a53aeba1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRuleImpl.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRule; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRulePatch; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class InternetGatewayRuleImpl + implements InternetGatewayRule, InternetGatewayRule.Definition, InternetGatewayRule.Update { + private InternetGatewayRuleInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public RuleProperties ruleProperties() { + return this.innerModel().ruleProperties(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public List internetGatewayIds() { + List inner = this.innerModel().internetGatewayIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String annotation() { + return this.innerModel().annotation(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public InternetGatewayRuleInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String internetGatewayRuleName; + + private InternetGatewayRulePatch updateBody; + + public InternetGatewayRuleImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public InternetGatewayRule create() { + this.innerObject = + serviceManager + .serviceClient() + .getInternetGatewayRules() + .create(resourceGroupName, internetGatewayRuleName, this.innerModel(), Context.NONE); + return this; + } + + public InternetGatewayRule create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getInternetGatewayRules() + .create(resourceGroupName, internetGatewayRuleName, this.innerModel(), context); + return this; + } + + InternetGatewayRuleImpl( + String name, com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = new InternetGatewayRuleInner(); + this.serviceManager = serviceManager; + this.internetGatewayRuleName = name; + } + + public InternetGatewayRuleImpl update() { + this.updateBody = new InternetGatewayRulePatch(); + return this; + } + + public InternetGatewayRule apply() { + this.innerObject = + serviceManager + .serviceClient() + .getInternetGatewayRules() + .update(resourceGroupName, internetGatewayRuleName, updateBody, Context.NONE); + return this; + } + + public InternetGatewayRule apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getInternetGatewayRules() + .update(resourceGroupName, internetGatewayRuleName, updateBody, context); + return this; + } + + InternetGatewayRuleImpl( + InternetGatewayRuleInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.internetGatewayRuleName = Utils.getValueFromIdByName(innerObject.id(), "internetGatewayRules"); + } + + public InternetGatewayRule refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getInternetGatewayRules() + .getByResourceGroupWithResponse(resourceGroupName, internetGatewayRuleName, Context.NONE) + .getValue(); + return this; + } + + public InternetGatewayRule refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getInternetGatewayRules() + .getByResourceGroupWithResponse(resourceGroupName, internetGatewayRuleName, context) + .getValue(); + return this; + } + + public InternetGatewayRuleImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public InternetGatewayRuleImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public InternetGatewayRuleImpl withRuleProperties(RuleProperties ruleProperties) { + this.innerModel().withRuleProperties(ruleProperties); + return this; + } + + public InternetGatewayRuleImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public InternetGatewayRuleImpl withAnnotation(String annotation) { + this.innerModel().withAnnotation(annotation); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesClientImpl.java new file mode 100644 index 0000000000000..cb35daaa78e6f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesClientImpl.java @@ -0,0 +1,1657 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRulePatch; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRulesListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in InternetGatewayRulesClient. */ +public final class InternetGatewayRulesClientImpl implements InternetGatewayRulesClient { + /** The proxy service used to perform REST calls. */ + private final InternetGatewayRulesService service; + + /** The service client containing this operation class. */ + private final AzureNetworkFabricManagementServiceApiImpl client; + + /** + * Initializes an instance of InternetGatewayRulesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + InternetGatewayRulesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + this.service = + RestProxy + .create(InternetGatewayRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureNetworkFabricManagementServiceApiInternetGatewayRules to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureNetworkFabricMa") + public interface InternetGatewayRulesService { + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("internetGatewayRuleName") String internetGatewayRuleName, + @BodyParam("application/json") InternetGatewayRuleInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("internetGatewayRuleName") String internetGatewayRuleName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("internetGatewayRuleName") String internetGatewayRuleName, + @BodyParam("application/json") InternetGatewayRulePatch body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("internetGatewayRuleName") String internetGatewayRuleName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Creates an Internet Gateway rule. + * + *

Creates an Internet Gateway rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway Rule resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (internetGatewayRuleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter internetGatewayRuleName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .create( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + internetGatewayRuleName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates an Internet Gateway rule. + * + *

Creates an Internet Gateway rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway Rule resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (internetGatewayRuleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter internetGatewayRuleName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .create( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + internetGatewayRuleName, + body, + accept, + context); + } + + /** + * Creates an Internet Gateway rule. + * + *

Creates an Internet Gateway rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InternetGatewayRuleInner> beginCreateAsync( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body) { + Mono>> mono = + createWithResponseAsync(resourceGroupName, internetGatewayRuleName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + InternetGatewayRuleInner.class, + InternetGatewayRuleInner.class, + this.client.getContext()); + } + + /** + * Creates an Internet Gateway rule. + * + *

Creates an Internet Gateway rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InternetGatewayRuleInner> beginCreateAsync( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createWithResponseAsync(resourceGroupName, internetGatewayRuleName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + InternetGatewayRuleInner.class, + InternetGatewayRuleInner.class, + context); + } + + /** + * Creates an Internet Gateway rule. + * + *

Creates an Internet Gateway rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternetGatewayRuleInner> beginCreate( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body) { + return this.beginCreateAsync(resourceGroupName, internetGatewayRuleName, body).getSyncPoller(); + } + + /** + * Creates an Internet Gateway rule. + * + *

Creates an Internet Gateway rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternetGatewayRuleInner> beginCreate( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body, Context context) { + return this.beginCreateAsync(resourceGroupName, internetGatewayRuleName, body, context).getSyncPoller(); + } + + /** + * Creates an Internet Gateway rule. + * + *

Creates an Internet Gateway rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway Rule resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body) { + return beginCreateAsync(resourceGroupName, internetGatewayRuleName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates an Internet Gateway rule. + * + *

Creates an Internet Gateway rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway Rule resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body, Context context) { + return beginCreateAsync(resourceGroupName, internetGatewayRuleName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates an Internet Gateway rule. + * + *

Creates an Internet Gateway rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InternetGatewayRuleInner create( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body) { + return createAsync(resourceGroupName, internetGatewayRuleName, body).block(); + } + + /** + * Creates an Internet Gateway rule. + * + *

Creates an Internet Gateway rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InternetGatewayRuleInner create( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRuleInner body, Context context) { + return createAsync(resourceGroupName, internetGatewayRuleName, body, context).block(); + } + + /** + * Gets an Internet Gateway Rule. + * + *

Gets an Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Internet Gateway Rule resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String internetGatewayRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (internetGatewayRuleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter internetGatewayRuleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + internetGatewayRuleName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets an Internet Gateway Rule. + * + *

Gets an Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Internet Gateway Rule resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String internetGatewayRuleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (internetGatewayRuleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter internetGatewayRuleName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + internetGatewayRuleName, + accept, + context); + } + + /** + * Gets an Internet Gateway Rule. + * + *

Gets an Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Internet Gateway Rule resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync( + String resourceGroupName, String internetGatewayRuleName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, internetGatewayRuleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets an Internet Gateway Rule. + * + *

Gets an Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Internet Gateway Rule resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String internetGatewayRuleName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, internetGatewayRuleName, context).block(); + } + + /** + * Gets an Internet Gateway Rule. + * + *

Gets an Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Internet Gateway Rule resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InternetGatewayRuleInner getByResourceGroup(String resourceGroupName, String internetGatewayRuleName) { + return getByResourceGroupWithResponse(resourceGroupName, internetGatewayRuleName, Context.NONE).getValue(); + } + + /** + * Updates an Internet Gateway Rule. + * + *

API to update certain properties of the Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Internet Gateway Rule properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway Rule resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (internetGatewayRuleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter internetGatewayRuleName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + internetGatewayRuleName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates an Internet Gateway Rule. + * + *

API to update certain properties of the Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Internet Gateway Rule properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway Rule resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (internetGatewayRuleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter internetGatewayRuleName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + internetGatewayRuleName, + body, + accept, + context); + } + + /** + * Updates an Internet Gateway Rule. + * + *

API to update certain properties of the Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Internet Gateway Rule properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InternetGatewayRuleInner> beginUpdateAsync( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body) { + Mono>> mono = + updateWithResponseAsync(resourceGroupName, internetGatewayRuleName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + InternetGatewayRuleInner.class, + InternetGatewayRuleInner.class, + this.client.getContext()); + } + + /** + * Updates an Internet Gateway Rule. + * + *

API to update certain properties of the Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Internet Gateway Rule properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InternetGatewayRuleInner> beginUpdateAsync( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, internetGatewayRuleName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + InternetGatewayRuleInner.class, + InternetGatewayRuleInner.class, + context); + } + + /** + * Updates an Internet Gateway Rule. + * + *

API to update certain properties of the Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Internet Gateway Rule properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternetGatewayRuleInner> beginUpdate( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body) { + return this.beginUpdateAsync(resourceGroupName, internetGatewayRuleName, body).getSyncPoller(); + } + + /** + * Updates an Internet Gateway Rule. + * + *

API to update certain properties of the Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Internet Gateway Rule properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternetGatewayRuleInner> beginUpdate( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body, Context context) { + return this.beginUpdateAsync(resourceGroupName, internetGatewayRuleName, body, context).getSyncPoller(); + } + + /** + * Updates an Internet Gateway Rule. + * + *

API to update certain properties of the Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Internet Gateway Rule properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway Rule resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body) { + return beginUpdateAsync(resourceGroupName, internetGatewayRuleName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an Internet Gateway Rule. + * + *

API to update certain properties of the Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Internet Gateway Rule properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway Rule resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body, Context context) { + return beginUpdateAsync(resourceGroupName, internetGatewayRuleName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates an Internet Gateway Rule. + * + *

API to update certain properties of the Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Internet Gateway Rule properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InternetGatewayRuleInner update( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body) { + return updateAsync(resourceGroupName, internetGatewayRuleName, body).block(); + } + + /** + * Updates an Internet Gateway Rule. + * + *

API to update certain properties of the Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param body Internet Gateway Rule properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway Rule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InternetGatewayRuleInner update( + String resourceGroupName, String internetGatewayRuleName, InternetGatewayRulePatch body, Context context) { + return updateAsync(resourceGroupName, internetGatewayRuleName, body, context).block(); + } + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String internetGatewayRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (internetGatewayRuleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter internetGatewayRuleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + internetGatewayRuleName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String internetGatewayRuleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (internetGatewayRuleName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter internetGatewayRuleName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + internetGatewayRuleName, + accept, + context); + } + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String internetGatewayRuleName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, internetGatewayRuleName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String internetGatewayRuleName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, internetGatewayRuleName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String internetGatewayRuleName) { + return this.beginDeleteAsync(resourceGroupName, internetGatewayRuleName).getSyncPoller(); + } + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String internetGatewayRuleName, Context context) { + return this.beginDeleteAsync(resourceGroupName, internetGatewayRuleName, context).getSyncPoller(); + } + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String internetGatewayRuleName) { + return beginDeleteAsync(resourceGroupName, internetGatewayRuleName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String internetGatewayRuleName, Context context) { + return beginDeleteAsync(resourceGroupName, internetGatewayRuleName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String internetGatewayRuleName) { + deleteAsync(resourceGroupName, internetGatewayRuleName).block(); + } + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String internetGatewayRuleName, Context context) { + deleteAsync(resourceGroupName, internetGatewayRuleName, context).block(); + } + + /** + * List Internet Gateway Rules by resource group. + * + *

Implements Internet Gateway Rules list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Internet Gateway Rules by resource group. + * + *

Implements Internet Gateway Rules list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Internet Gateway Rules by resource group. + * + *

Implements Internet Gateway Rules list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List Internet Gateway Rules by resource group. + * + *

Implements Internet Gateway Rules list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List Internet Gateway Rules by resource group. + * + *

Implements Internet Gateway Rules list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List Internet Gateway Rules by resource group. + * + *

Implements Internet Gateway Rules list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * List Internet Gateway Rules by subscription. + * + *

List all Internet Gateway rules in the given subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Internet Gateway Rules by subscription. + * + *

List all Internet Gateway rules in the given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Internet Gateway Rules by subscription. + * + *

List all Internet Gateway rules in the given subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List Internet Gateway Rules by subscription. + * + *

List all Internet Gateway rules in the given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List Internet Gateway Rules by subscription. + * + *

List all Internet Gateway rules in the given subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List Internet Gateway Rules by subscription. + * + *

List all Internet Gateway rules in the given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesImpl.java new file mode 100644 index 0000000000000..132f74739e44a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewayRulesImpl.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewayRulesClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRule; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRules; + +public final class InternetGatewayRulesImpl implements InternetGatewayRules { + private static final ClientLogger LOGGER = new ClientLogger(InternetGatewayRulesImpl.class); + + private final InternetGatewayRulesClient innerClient; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public InternetGatewayRulesImpl( + InternetGatewayRulesClient innerClient, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String internetGatewayRuleName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, internetGatewayRuleName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new InternetGatewayRuleImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public InternetGatewayRule getByResourceGroup(String resourceGroupName, String internetGatewayRuleName) { + InternetGatewayRuleInner inner = + this.serviceClient().getByResourceGroup(resourceGroupName, internetGatewayRuleName); + if (inner != null) { + return new InternetGatewayRuleImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String internetGatewayRuleName) { + this.serviceClient().delete(resourceGroupName, internetGatewayRuleName); + } + + public void delete(String resourceGroupName, String internetGatewayRuleName, Context context) { + this.serviceClient().delete(resourceGroupName, internetGatewayRuleName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new InternetGatewayRuleImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new InternetGatewayRuleImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new InternetGatewayRuleImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new InternetGatewayRuleImpl(inner1, this.manager())); + } + + public InternetGatewayRule getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String internetGatewayRuleName = Utils.getValueFromIdByName(id, "internetGatewayRules"); + if (internetGatewayRuleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'internetGatewayRules'.", + id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, internetGatewayRuleName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String internetGatewayRuleName = Utils.getValueFromIdByName(id, "internetGatewayRules"); + if (internetGatewayRuleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'internetGatewayRules'.", + id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, internetGatewayRuleName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String internetGatewayRuleName = Utils.getValueFromIdByName(id, "internetGatewayRules"); + if (internetGatewayRuleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'internetGatewayRules'.", + id))); + } + this.delete(resourceGroupName, internetGatewayRuleName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String internetGatewayRuleName = Utils.getValueFromIdByName(id, "internetGatewayRules"); + if (internetGatewayRuleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'internetGatewayRules'.", + id))); + } + this.delete(resourceGroupName, internetGatewayRuleName, context); + } + + private InternetGatewayRulesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + public InternetGatewayRuleImpl define(String name) { + return new InternetGatewayRuleImpl(name, this.manager()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysClientImpl.java new file mode 100644 index 0000000000000..76edf528802e7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysClientImpl.java @@ -0,0 +1,1638 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayInner; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayPatch; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewaysListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in InternetGatewaysClient. */ +public final class InternetGatewaysClientImpl implements InternetGatewaysClient { + /** The proxy service used to perform REST calls. */ + private final InternetGatewaysService service; + + /** The service client containing this operation class. */ + private final AzureNetworkFabricManagementServiceApiImpl client; + + /** + * Initializes an instance of InternetGatewaysClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + InternetGatewaysClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + this.service = + RestProxy.create(InternetGatewaysService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureNetworkFabricManagementServiceApiInternetGateways to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureNetworkFabricMa") + public interface InternetGatewaysService { + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("internetGatewayName") String internetGatewayName, + @BodyParam("application/json") InternetGatewayInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("internetGatewayName") String internetGatewayName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("internetGatewayName") String internetGatewayName, + @BodyParam("application/json") InternetGatewayPatch body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("internetGatewayName") String internetGatewayName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGateways") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Create a Network Fabric Service Internet Gateway. + * + *

Creates a Network Fabric Service Internet Gateway resource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, String internetGatewayName, InternetGatewayInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (internetGatewayName == null) { + return Mono + .error(new IllegalArgumentException("Parameter internetGatewayName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .create( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + internetGatewayName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a Network Fabric Service Internet Gateway. + * + *

Creates a Network Fabric Service Internet Gateway resource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, String internetGatewayName, InternetGatewayInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (internetGatewayName == null) { + return Mono + .error(new IllegalArgumentException("Parameter internetGatewayName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .create( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + internetGatewayName, + body, + accept, + context); + } + + /** + * Create a Network Fabric Service Internet Gateway. + * + *

Creates a Network Fabric Service Internet Gateway resource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InternetGatewayInner> beginCreateAsync( + String resourceGroupName, String internetGatewayName, InternetGatewayInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, internetGatewayName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + InternetGatewayInner.class, + InternetGatewayInner.class, + this.client.getContext()); + } + + /** + * Create a Network Fabric Service Internet Gateway. + * + *

Creates a Network Fabric Service Internet Gateway resource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InternetGatewayInner> beginCreateAsync( + String resourceGroupName, String internetGatewayName, InternetGatewayInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createWithResponseAsync(resourceGroupName, internetGatewayName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), InternetGatewayInner.class, InternetGatewayInner.class, context); + } + + /** + * Create a Network Fabric Service Internet Gateway. + * + *

Creates a Network Fabric Service Internet Gateway resource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternetGatewayInner> beginCreate( + String resourceGroupName, String internetGatewayName, InternetGatewayInner body) { + return this.beginCreateAsync(resourceGroupName, internetGatewayName, body).getSyncPoller(); + } + + /** + * Create a Network Fabric Service Internet Gateway. + * + *

Creates a Network Fabric Service Internet Gateway resource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternetGatewayInner> beginCreate( + String resourceGroupName, String internetGatewayName, InternetGatewayInner body, Context context) { + return this.beginCreateAsync(resourceGroupName, internetGatewayName, body, context).getSyncPoller(); + } + + /** + * Create a Network Fabric Service Internet Gateway. + * + *

Creates a Network Fabric Service Internet Gateway resource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, String internetGatewayName, InternetGatewayInner body) { + return beginCreateAsync(resourceGroupName, internetGatewayName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a Network Fabric Service Internet Gateway. + * + *

Creates a Network Fabric Service Internet Gateway resource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, String internetGatewayName, InternetGatewayInner body, Context context) { + return beginCreateAsync(resourceGroupName, internetGatewayName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a Network Fabric Service Internet Gateway. + * + *

Creates a Network Fabric Service Internet Gateway resource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InternetGatewayInner create( + String resourceGroupName, String internetGatewayName, InternetGatewayInner body) { + return createAsync(resourceGroupName, internetGatewayName, body).block(); + } + + /** + * Create a Network Fabric Service Internet Gateway. + * + *

Creates a Network Fabric Service Internet Gateway resource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InternetGatewayInner create( + String resourceGroupName, String internetGatewayName, InternetGatewayInner body, Context context) { + return createAsync(resourceGroupName, internetGatewayName, body, context).block(); + } + + /** + * Retrieves details of Network Fabric Service Internet Gateway. + * + *

Implements Gateway GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String internetGatewayName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (internetGatewayName == null) { + return Mono + .error(new IllegalArgumentException("Parameter internetGatewayName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + internetGatewayName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves details of Network Fabric Service Internet Gateway. + * + *

Implements Gateway GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String internetGatewayName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (internetGatewayName == null) { + return Mono + .error(new IllegalArgumentException("Parameter internetGatewayName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + internetGatewayName, + accept, + context); + } + + /** + * Retrieves details of Network Fabric Service Internet Gateway. + * + *

Implements Gateway GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String internetGatewayName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, internetGatewayName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieves details of Network Fabric Service Internet Gateway. + * + *

Implements Gateway GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String internetGatewayName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, internetGatewayName, context).block(); + } + + /** + * Retrieves details of Network Fabric Service Internet Gateway. + * + *

Implements Gateway GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InternetGatewayInner getByResourceGroup(String resourceGroupName, String internetGatewayName) { + return getByResourceGroupWithResponse(resourceGroupName, internetGatewayName, Context.NONE).getValue(); + } + + /** + * Updates a Network Fabric Service Internet Gateway. + * + *

Execute patch on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String internetGatewayName, InternetGatewayPatch body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (internetGatewayName == null) { + return Mono + .error(new IllegalArgumentException("Parameter internetGatewayName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + internetGatewayName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a Network Fabric Service Internet Gateway. + * + *

Execute patch on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String internetGatewayName, InternetGatewayPatch body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (internetGatewayName == null) { + return Mono + .error(new IllegalArgumentException("Parameter internetGatewayName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + internetGatewayName, + body, + accept, + context); + } + + /** + * Updates a Network Fabric Service Internet Gateway. + * + *

Execute patch on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InternetGatewayInner> beginUpdateAsync( + String resourceGroupName, String internetGatewayName, InternetGatewayPatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, internetGatewayName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + InternetGatewayInner.class, + InternetGatewayInner.class, + this.client.getContext()); + } + + /** + * Updates a Network Fabric Service Internet Gateway. + * + *

Execute patch on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InternetGatewayInner> beginUpdateAsync( + String resourceGroupName, String internetGatewayName, InternetGatewayPatch body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, internetGatewayName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), InternetGatewayInner.class, InternetGatewayInner.class, context); + } + + /** + * Updates a Network Fabric Service Internet Gateway. + * + *

Execute patch on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternetGatewayInner> beginUpdate( + String resourceGroupName, String internetGatewayName, InternetGatewayPatch body) { + return this.beginUpdateAsync(resourceGroupName, internetGatewayName, body).getSyncPoller(); + } + + /** + * Updates a Network Fabric Service Internet Gateway. + * + *

Execute patch on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InternetGatewayInner> beginUpdate( + String resourceGroupName, String internetGatewayName, InternetGatewayPatch body, Context context) { + return this.beginUpdateAsync(resourceGroupName, internetGatewayName, body, context).getSyncPoller(); + } + + /** + * Updates a Network Fabric Service Internet Gateway. + * + *

Execute patch on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String internetGatewayName, InternetGatewayPatch body) { + return beginUpdateAsync(resourceGroupName, internetGatewayName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a Network Fabric Service Internet Gateway. + * + *

Execute patch on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String internetGatewayName, InternetGatewayPatch body, Context context) { + return beginUpdateAsync(resourceGroupName, internetGatewayName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a Network Fabric Service Internet Gateway. + * + *

Execute patch on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InternetGatewayInner update( + String resourceGroupName, String internetGatewayName, InternetGatewayPatch body) { + return updateAsync(resourceGroupName, internetGatewayName, body).block(); + } + + /** + * Updates a Network Fabric Service Internet Gateway. + * + *

Execute patch on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param body API to update certain properties of the L2 Isolation Domain resource.. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InternetGatewayInner update( + String resourceGroupName, String internetGatewayName, InternetGatewayPatch body, Context context) { + return updateAsync(resourceGroupName, internetGatewayName, body, context).block(); + } + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String internetGatewayName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (internetGatewayName == null) { + return Mono + .error(new IllegalArgumentException("Parameter internetGatewayName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + internetGatewayName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String internetGatewayName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (internetGatewayName == null) { + return Mono + .error(new IllegalArgumentException("Parameter internetGatewayName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + internetGatewayName, + accept, + context); + } + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String internetGatewayName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, internetGatewayName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String internetGatewayName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, internetGatewayName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String internetGatewayName) { + return this.beginDeleteAsync(resourceGroupName, internetGatewayName).getSyncPoller(); + } + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String internetGatewayName, Context context) { + return this.beginDeleteAsync(resourceGroupName, internetGatewayName, context).getSyncPoller(); + } + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String internetGatewayName) { + return beginDeleteAsync(resourceGroupName, internetGatewayName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String internetGatewayName, Context context) { + return beginDeleteAsync(resourceGroupName, internetGatewayName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String internetGatewayName) { + deleteAsync(resourceGroupName, internetGatewayName).block(); + } + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String internetGatewayName, Context context) { + deleteAsync(resourceGroupName, internetGatewayName, context).block(); + } + + /** + * List Internet Gateways by resource group. + * + *

Displays Internet Gateways list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Internet Gateways by resource group. + * + *

Displays Internet Gateways list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Internet Gateways by resource group. + * + *

Displays Internet Gateways list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List Internet Gateways by resource group. + * + *

Displays Internet Gateways list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List Internet Gateways by resource group. + * + *

Displays Internet Gateways list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List Internet Gateways by resource group. + * + *

Displays Internet Gateways list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * List Internet Gateways by subscription. + * + *

Displays Internet Gateways list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Internet Gateways by subscription. + * + *

Displays Internet Gateways list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Internet Gateways by subscription. + * + *

Displays Internet Gateways list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List Internet Gateways by subscription. + * + *

Displays Internet Gateways list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List Internet Gateways by subscription. + * + *

Displays Internet Gateways list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List Internet Gateways by subscription. + * + *

Displays Internet Gateways list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysImpl.java new file mode 100644 index 0000000000000..fc030971330b2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/InternetGatewaysImpl.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.fluent.InternetGatewaysClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayInner; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGateway; +import com.azure.resourcemanager.managednetworkfabric.models.InternetGateways; + +public final class InternetGatewaysImpl implements InternetGateways { + private static final ClientLogger LOGGER = new ClientLogger(InternetGatewaysImpl.class); + + private final InternetGatewaysClient innerClient; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public InternetGatewaysImpl( + InternetGatewaysClient innerClient, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String internetGatewayName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, internetGatewayName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new InternetGatewayImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public InternetGateway getByResourceGroup(String resourceGroupName, String internetGatewayName) { + InternetGatewayInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, internetGatewayName); + if (inner != null) { + return new InternetGatewayImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String internetGatewayName) { + this.serviceClient().delete(resourceGroupName, internetGatewayName); + } + + public void delete(String resourceGroupName, String internetGatewayName, Context context) { + this.serviceClient().delete(resourceGroupName, internetGatewayName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new InternetGatewayImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new InternetGatewayImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new InternetGatewayImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new InternetGatewayImpl(inner1, this.manager())); + } + + public InternetGateway getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String internetGatewayName = Utils.getValueFromIdByName(id, "internetGateways"); + if (internetGatewayName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'internetGateways'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, internetGatewayName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String internetGatewayName = Utils.getValueFromIdByName(id, "internetGateways"); + if (internetGatewayName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'internetGateways'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, internetGatewayName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String internetGatewayName = Utils.getValueFromIdByName(id, "internetGateways"); + if (internetGatewayName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'internetGateways'.", id))); + } + this.delete(resourceGroupName, internetGatewayName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String internetGatewayName = Utils.getValueFromIdByName(id, "internetGateways"); + if (internetGatewayName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'internetGateways'.", id))); + } + this.delete(resourceGroupName, internetGatewayName, context); + } + + private InternetGatewaysClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + public InternetGatewayImpl define(String name) { + return new InternetGatewayImpl(name, this.manager()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesClientImpl.java index 4fa9599da0946..cd10bed9b8209 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunitiesClientImpl.java @@ -113,7 +113,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}") - @ExpectedResponses({200, 202, 204}) + @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @HostParam("$host") String endpoint, @@ -180,7 +180,8 @@ Mono> listBySubscriptionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the IP Community resource definition along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -239,7 +240,8 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the IP Community resource definition along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -294,7 +296,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IpCommunity resource definition. + * @return the {@link PollerFlux} for polling of the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpCommunityInner> beginCreateAsync( @@ -322,7 +324,7 @@ private PollerFlux, IpCommunityInner> beginCreateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IpCommunity resource definition. + * @return the {@link PollerFlux} for polling of the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpCommunityInner> beginCreateAsync( @@ -347,7 +349,7 @@ private PollerFlux, IpCommunityInner> beginCreateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IpCommunity resource definition. + * @return the {@link SyncPoller} for polling of the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpCommunityInner> beginCreate( @@ -367,7 +369,7 @@ public SyncPoller, IpCommunityInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IpCommunity resource definition. + * @return the {@link SyncPoller} for polling of the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpCommunityInner> beginCreate( @@ -386,7 +388,7 @@ public SyncPoller, IpCommunityInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition on successful completion of {@link Mono}. + * @return the IP Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -408,7 +410,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition on successful completion of {@link Mono}. + * @return the IP Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -429,7 +431,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition. + * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public IpCommunityInner create(String resourceGroupName, String ipCommunityName, IpCommunityInner body) { @@ -448,7 +450,7 @@ public IpCommunityInner create(String resourceGroupName, String ipCommunityName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition. + * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public IpCommunityInner create( @@ -466,7 +468,8 @@ public IpCommunityInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the IP Community resource definition along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -518,7 +521,8 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the IP Community resource definition along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -566,7 +570,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition on successful completion of {@link Mono}. + * @return the IP Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String ipCommunityName) { @@ -585,7 +589,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition along with {@link Response}. + * @return the IP Community resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -603,7 +607,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition. + * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public IpCommunityInner getByResourceGroup(String resourceGroupName, String ipCommunityName) { @@ -621,7 +625,8 @@ public IpCommunityInner getByResourceGroup(String resourceGroupName, String ipCo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the IP Community resource definition along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -680,7 +685,8 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the IP Community resource definition along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -735,7 +741,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IpCommunity resource definition. + * @return the {@link PollerFlux} for polling of the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpCommunityInner> beginUpdateAsync( @@ -763,7 +769,7 @@ private PollerFlux, IpCommunityInner> beginUpdateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IpCommunity resource definition. + * @return the {@link PollerFlux} for polling of the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpCommunityInner> beginUpdateAsync( @@ -788,7 +794,7 @@ private PollerFlux, IpCommunityInner> beginUpdateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IpCommunity resource definition. + * @return the {@link SyncPoller} for polling of the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpCommunityInner> beginUpdate( @@ -808,7 +814,7 @@ public SyncPoller, IpCommunityInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IpCommunity resource definition. + * @return the {@link SyncPoller} for polling of the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpCommunityInner> beginUpdate( @@ -827,7 +833,7 @@ public SyncPoller, IpCommunityInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition on successful completion of {@link Mono}. + * @return the IP Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -849,7 +855,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition on successful completion of {@link Mono}. + * @return the IP Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -870,7 +876,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition. + * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public IpCommunityInner update(String resourceGroupName, String ipCommunityName, IpCommunityPatch body) { @@ -889,7 +895,7 @@ public IpCommunityInner update(String resourceGroupName, String ipCommunityName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition. + * @return the IP Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public IpCommunityInner update( @@ -1149,15 +1155,15 @@ public void delete(String resourceGroupName, String ipCommunityName, Context con } /** - * List IpCommunities by resource group. + * List IP Communities by resource group. * - *

Implements IpCommunities list by resource group GET method. + *

Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -1202,16 +1208,16 @@ private Mono> listByResourceGroupSinglePageAsync } /** - * List IpCommunities by resource group. + * List IP Communities by resource group. * - *

Implements IpCommunities list by resource group GET method. + *

Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1254,15 +1260,15 @@ private Mono> listByResourceGroupSinglePageAsync } /** - * List IpCommunities by resource group. + * List IP Communities by resource group. * - *

Implements IpCommunities list by resource group GET method. + *

Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities as paginated response with {@link PagedFlux}. + * @return list of IP Communities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1272,16 +1278,16 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou } /** - * List IpCommunities by resource group. + * List IP Communities by resource group. * - *

Implements IpCommunities list by resource group GET method. + *

Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities as paginated response with {@link PagedFlux}. + * @return list of IP Communities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -1291,15 +1297,15 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou } /** - * List IpCommunities by resource group. + * List IP Communities by resource group. * - *

Implements IpCommunities list by resource group GET method. + *

Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Communities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1307,16 +1313,16 @@ public PagedIterable listByResourceGroup(String resourceGroupN } /** - * List IpCommunities by resource group. + * List IP Communities by resource group. * - *

Implements IpCommunities list by resource group GET method. + *

Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Communities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -1324,13 +1330,13 @@ public PagedIterable listByResourceGroup(String resourceGroupN } /** - * List IpCommunities by subscription. + * List IP Communities by subscription. * - *

Implements IpCommunities list by subscription GET method. + *

Implements IP Communities list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1370,15 +1376,15 @@ private Mono> listSinglePageAsync() { } /** - * List IpCommunities by subscription. + * List IP Communities by subscription. * - *

Implements IpCommunities list by subscription GET method. + *

Implements IP Communities list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1415,13 +1421,13 @@ private Mono> listSinglePageAsync(Context contex } /** - * List IpCommunities by subscription. + * List IP Communities by subscription. * - *

Implements IpCommunities list by subscription GET method. + *

Implements IP Communities list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities as paginated response with {@link PagedFlux}. + * @return list of IP Communities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1430,15 +1436,15 @@ private PagedFlux listAsync() { } /** - * List IpCommunities by subscription. + * List IP Communities by subscription. * - *

Implements IpCommunities list by subscription GET method. + *

Implements IP Communities list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities as paginated response with {@link PagedFlux}. + * @return list of IP Communities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1447,13 +1453,13 @@ private PagedFlux listAsync(Context context) { } /** - * List IpCommunities by subscription. + * List IP Communities by subscription. * - *

Implements IpCommunities list by subscription GET method. + *

Implements IP Communities list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Communities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1461,15 +1467,15 @@ public PagedIterable list() { } /** - * List IpCommunities by subscription. + * List IP Communities by subscription. * - *

Implements IpCommunities list by subscription GET method. + *

Implements IP Communities list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Communities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -1484,7 +1490,7 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1522,7 +1528,7 @@ private Mono> listByResourceGroupNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( @@ -1559,7 +1565,7 @@ private Mono> listByResourceGroupNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1597,7 +1603,7 @@ private Mono> listBySubscriptionNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Communities along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunityImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunityImpl.java index d785cba17f0c1..b21dfa1a2e79f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunityImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpCommunityImpl.java @@ -8,11 +8,12 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunity; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; import java.util.Collections; import java.util.List; import java.util.Map; @@ -51,21 +52,20 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public CommunityActionTypes action() { - return this.innerModel().action(); + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); } - public List wellKnownCommunities() { - List inner = this.innerModel().wellKnownCommunities(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); } - public List communityMembers() { - List inner = this.innerModel().communityMembers(); + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + + public List ipCommunityRules() { + List inner = this.innerModel().ipCommunityRules(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -73,10 +73,6 @@ public List communityMembers() { } } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public String annotation() { return this.innerModel().annotation(); } @@ -209,19 +205,14 @@ public IpCommunityImpl withTags(Map tags) { } } - public IpCommunityImpl withAction(CommunityActionTypes action) { - this.innerModel().withAction(action); - return this; - } - - public IpCommunityImpl withWellKnownCommunities(List wellKnownCommunities) { - this.innerModel().withWellKnownCommunities(wellKnownCommunities); - return this; - } - - public IpCommunityImpl withCommunityMembers(List communityMembers) { - this.innerModel().withCommunityMembers(communityMembers); - return this; + public IpCommunityImpl withIpCommunityRules(List ipCommunityRules) { + if (isInCreateMode()) { + this.innerModel().withIpCommunityRules(ipCommunityRules); + return this; + } else { + this.updateBody.withIpCommunityRules(ipCommunityRules); + return this; + } } public IpCommunityImpl withAnnotation(String annotation) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesClientImpl.java index a6484e63368dd..06d621a7c0a9f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunitiesClientImpl.java @@ -114,7 +114,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}") - @ExpectedResponses({200, 202, 204}) + @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @HostParam("$host") String endpoint, @@ -181,7 +181,7 @@ Mono> listBySubscriptionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition along with {@link Response} on successful completion of + * @return the IP Extended Community resource definition along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -242,7 +242,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition along with {@link Response} on successful completion of + * @return the IP Extended Community resource definition along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -299,7 +299,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IpExtendedCommunity resource definition. + * @return the {@link PollerFlux} for polling of the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpExtendedCommunityInner> beginCreateAsync( @@ -328,7 +328,7 @@ private PollerFlux, IpExtendedCommunityInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IpExtendedCommunity resource definition. + * @return the {@link PollerFlux} for polling of the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpExtendedCommunityInner> beginCreateAsync( @@ -357,7 +357,7 @@ private PollerFlux, IpExtendedCommunityInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IpExtendedCommunity resource definition. + * @return the {@link SyncPoller} for polling of the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpExtendedCommunityInner> beginCreate( @@ -377,7 +377,7 @@ public SyncPoller, IpExtendedCommunityInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IpExtendedCommunity resource definition. + * @return the {@link SyncPoller} for polling of the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpExtendedCommunityInner> beginCreate( @@ -396,7 +396,7 @@ public SyncPoller, IpExtendedCommunityInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition on successful completion of {@link Mono}. + * @return the IP Extended Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -418,7 +418,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition on successful completion of {@link Mono}. + * @return the IP Extended Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -439,7 +439,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition. + * @return the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public IpExtendedCommunityInner create( @@ -459,7 +459,7 @@ public IpExtendedCommunityInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition. + * @return the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public IpExtendedCommunityInner create( @@ -477,7 +477,7 @@ public IpExtendedCommunityInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition along with {@link Response} on successful completion of + * @return the IP Extended Community resource definition along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -531,7 +531,7 @@ private Mono> getByResourceGroupWithResponseA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition along with {@link Response} on successful completion of + * @return the IP Extended Community resource definition along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -581,7 +581,7 @@ private Mono> getByResourceGroupWithResponseA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition on successful completion of {@link Mono}. + * @return the IP Extended Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync( @@ -601,7 +601,7 @@ private Mono getByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition along with {@link Response}. + * @return the IP Extended Community resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -619,7 +619,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition. + * @return the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public IpExtendedCommunityInner getByResourceGroup(String resourceGroupName, String ipExtendedCommunityName) { @@ -637,7 +637,7 @@ public IpExtendedCommunityInner getByResourceGroup(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition along with {@link Response} on successful completion of + * @return the IP Extended Community resource definition along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -698,7 +698,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition along with {@link Response} on successful completion of + * @return the IP Extended Community resource definition along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -755,7 +755,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IpExtendedCommunity resource definition. + * @return the {@link PollerFlux} for polling of the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpExtendedCommunityInner> beginUpdateAsync( @@ -784,7 +784,7 @@ private PollerFlux, IpExtendedCommunityInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IpExtendedCommunity resource definition. + * @return the {@link PollerFlux} for polling of the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpExtendedCommunityInner> beginUpdateAsync( @@ -813,7 +813,7 @@ private PollerFlux, IpExtendedCommunityInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IpExtendedCommunity resource definition. + * @return the {@link SyncPoller} for polling of the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpExtendedCommunityInner> beginUpdate( @@ -833,7 +833,7 @@ public SyncPoller, IpExtendedCommunityInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IpExtendedCommunity resource definition. + * @return the {@link SyncPoller} for polling of the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpExtendedCommunityInner> beginUpdate( @@ -852,7 +852,7 @@ public SyncPoller, IpExtendedCommunityInner * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition on successful completion of {@link Mono}. + * @return the IP Extended Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -874,7 +874,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition on successful completion of {@link Mono}. + * @return the IP Extended Community resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -895,7 +895,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition. + * @return the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public IpExtendedCommunityInner update( @@ -915,7 +915,7 @@ public IpExtendedCommunityInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition. + * @return the IP Extended Community resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public IpExtendedCommunityInner update( @@ -1188,7 +1188,8 @@ public void delete(String resourceGroupName, String ipExtendedCommunityName, Con * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Extended Communities along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -1242,7 +1243,8 @@ private Mono> listByResourceGroupSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Extended Communities along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1293,7 +1295,7 @@ private Mono> listByResourceGroupSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities as paginated response with {@link PagedFlux}. + * @return list of IP Extended Communities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1312,7 +1314,7 @@ private PagedFlux listByResourceGroupAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities as paginated response with {@link PagedFlux}. + * @return list of IP Extended Communities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -1330,7 +1332,7 @@ private PagedFlux listByResourceGroupAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1347,7 +1349,7 @@ public PagedIterable listByResourceGroup(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -1361,7 +1363,8 @@ public PagedIterable listByResourceGroup(String resour * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Extended Communities along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1409,7 +1412,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Extended Communities along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1452,7 +1456,7 @@ private Mono> listSinglePageAsync(Contex * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities as paginated response with {@link PagedFlux}. + * @return list of IP Extended Communities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1469,7 +1473,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities as paginated response with {@link PagedFlux}. + * @return list of IP Extended Communities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1484,7 +1488,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1500,7 +1504,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -1515,7 +1519,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Extended Communities along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1553,7 +1558,8 @@ private Mono> listByResourceGroupNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Extended Communities along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( @@ -1590,7 +1596,8 @@ private Mono> listByResourceGroupNextSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Extended Communities along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1628,7 +1635,8 @@ private Mono> listBySubscriptionNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Extended Communities along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunityImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunityImpl.java index 907846122c5fd..82b1b034734d4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunityImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpExtendedCommunityImpl.java @@ -8,9 +8,11 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpExtendedCommunityInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunity; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatch; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.util.Collections; import java.util.List; @@ -51,12 +53,20 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public CommunityActionTypes action() { - return this.innerModel().action(); + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); } - public List routeTargets() { - List inner = this.innerModel().routeTargets(); + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + + public List ipExtendedCommunityRules() { + List inner = this.innerModel().ipExtendedCommunityRules(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -64,10 +74,6 @@ public List routeTargets() { } } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public String annotation() { return this.innerModel().annotation(); } @@ -190,6 +196,17 @@ public IpExtendedCommunityImpl withRegion(String location) { return this; } + public IpExtendedCommunityImpl withIpExtendedCommunityRules( + List ipExtendedCommunityRules) { + if (isInCreateMode()) { + this.innerModel().withIpExtendedCommunityRules(ipExtendedCommunityRules); + return this; + } else { + this.updateBody.withIpExtendedCommunityRules(ipExtendedCommunityRules); + return this; + } + } + public IpExtendedCommunityImpl withTags(Map tags) { if (isInCreateMode()) { this.innerModel().withTags(tags); @@ -200,19 +217,14 @@ public IpExtendedCommunityImpl withTags(Map tags) { } } - public IpExtendedCommunityImpl withAction(CommunityActionTypes action) { - this.innerModel().withAction(action); - return this; - } - - public IpExtendedCommunityImpl withRouteTargets(List routeTargets) { - this.innerModel().withRouteTargets(routeTargets); - return this; - } - public IpExtendedCommunityImpl withAnnotation(String annotation) { - this.innerModel().withAnnotation(annotation); - return this; + if (isInCreateMode()) { + this.innerModel().withAnnotation(annotation); + return this; + } else { + this.updateBody.withAnnotation(annotation); + return this; + } } private boolean isInCreateMode() { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixImpl.java index 1c69b875023ef..a1f0a86547c4d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixImpl.java @@ -8,9 +8,11 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixInner; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefix; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPatch; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPropertiesIpPrefixRulesItem; +import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import java.util.Collections; import java.util.List; @@ -50,8 +52,20 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public List ipPrefixRules() { - List inner = this.innerModel().ipPrefixRules(); + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + + public List ipPrefixRules() { + List inner = this.innerModel().ipPrefixRules(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -59,10 +73,6 @@ public List ipPrefixRules() { } } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public String annotation() { return this.innerModel().annotation(); } @@ -182,11 +192,6 @@ public IpPrefixImpl withRegion(String location) { return this; } - public IpPrefixImpl withIpPrefixRules(List ipPrefixRules) { - this.innerModel().withIpPrefixRules(ipPrefixRules); - return this; - } - public IpPrefixImpl withTags(Map tags) { if (isInCreateMode()) { this.innerModel().withTags(tags); @@ -197,9 +202,24 @@ public IpPrefixImpl withTags(Map tags) { } } + public IpPrefixImpl withIpPrefixRules(List ipPrefixRules) { + if (isInCreateMode()) { + this.innerModel().withIpPrefixRules(ipPrefixRules); + return this; + } else { + this.updateBody.withIpPrefixRules(ipPrefixRules); + return this; + } + } + public IpPrefixImpl withAnnotation(String annotation) { - this.innerModel().withAnnotation(annotation); - return this; + if (isInCreateMode()) { + this.innerModel().withAnnotation(annotation); + return this; + } else { + this.updateBody.withAnnotation(annotation); + return this; + } } private boolean isInCreateMode() { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesClientImpl.java index ca112f2616253..9c69fcdd69c18 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/IpPrefixesClientImpl.java @@ -113,7 +113,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}") - @ExpectedResponses({200, 202, 204}) + @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @HostParam("$host") String endpoint, @@ -180,7 +180,7 @@ Mono> listBySubscriptionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -238,7 +238,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -292,7 +292,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IPPrefix resource definition. + * @return the {@link PollerFlux} for polling of the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpPrefixInner> beginCreateAsync( @@ -320,7 +320,7 @@ private PollerFlux, IpPrefixInner> beginCreateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IPPrefix resource definition. + * @return the {@link PollerFlux} for polling of the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpPrefixInner> beginCreateAsync( @@ -344,7 +344,7 @@ private PollerFlux, IpPrefixInner> beginCreateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IPPrefix resource definition. + * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpPrefixInner> beginCreate( @@ -364,7 +364,7 @@ public SyncPoller, IpPrefixInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IPPrefix resource definition. + * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpPrefixInner> beginCreate( @@ -383,7 +383,7 @@ public SyncPoller, IpPrefixInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition on successful completion of {@link Mono}. + * @return the IP Prefix resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync(String resourceGroupName, String ipPrefixName, IpPrefixInner body) { @@ -404,7 +404,7 @@ private Mono createAsync(String resourceGroupName, String ipPrefi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition on successful completion of {@link Mono}. + * @return the IP Prefix resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -425,7 +425,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition. + * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner body) { @@ -444,7 +444,7 @@ public IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition. + * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPrefixInner body, Context context) { @@ -461,7 +461,7 @@ public IpPrefixInner create(String resourceGroupName, String ipPrefixName, IpPre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -512,7 +512,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -559,7 +559,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition on successful completion of {@link Mono}. + * @return the IP Prefix resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String ipPrefixName) { @@ -578,7 +578,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition along with {@link Response}. + * @return the IP Prefix resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -596,7 +596,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition. + * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public IpPrefixInner getByResourceGroup(String resourceGroupName, String ipPrefixName) { @@ -614,7 +614,7 @@ public IpPrefixInner getByResourceGroup(String resourceGroupName, String ipPrefi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -672,7 +672,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the IP Prefix resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -726,7 +726,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IPPrefix resource definition. + * @return the {@link PollerFlux} for polling of the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpPrefixInner> beginUpdateAsync( @@ -754,7 +754,7 @@ private PollerFlux, IpPrefixInner> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the IPPrefix resource definition. + * @return the {@link PollerFlux} for polling of the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IpPrefixInner> beginUpdateAsync( @@ -778,7 +778,7 @@ private PollerFlux, IpPrefixInner> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IPPrefix resource definition. + * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpPrefixInner> beginUpdate( @@ -798,7 +798,7 @@ public SyncPoller, IpPrefixInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the IPPrefix resource definition. + * @return the {@link SyncPoller} for polling of the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IpPrefixInner> beginUpdate( @@ -817,7 +817,7 @@ public SyncPoller, IpPrefixInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition on successful completion of {@link Mono}. + * @return the IP Prefix resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String ipPrefixName, IpPrefixPatch body) { @@ -838,7 +838,7 @@ private Mono updateAsync(String resourceGroupName, String ipPrefi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition on successful completion of {@link Mono}. + * @return the IP Prefix resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -859,7 +859,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition. + * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPrefixPatch body) { @@ -878,7 +878,7 @@ public IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition. + * @return the IP Prefix resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public IpPrefixInner update(String resourceGroupName, String ipPrefixName, IpPrefixPatch body, Context context) { @@ -1141,7 +1141,7 @@ public void delete(String resourceGroupName, String ipPrefixName, Context contex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -1195,7 +1195,7 @@ private Mono> listByResourceGroupSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1246,7 +1246,7 @@ private Mono> listByResourceGroupSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes as paginated response with {@link PagedFlux}. + * @return list of IP Prefixes as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1265,7 +1265,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes as paginated response with {@link PagedFlux}. + * @return list of IP Prefixes as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -1283,7 +1283,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes as paginated response with {@link PagedIterable}. + * @return list of IP Prefixes as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1300,7 +1300,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes as paginated response with {@link PagedIterable}. + * @return list of IP Prefixes as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -1314,7 +1314,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1362,7 +1362,7 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1405,7 +1405,7 @@ private Mono> listSinglePageAsync(Context context) * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes as paginated response with {@link PagedFlux}. + * @return list of IP Prefixes as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1422,7 +1422,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes as paginated response with {@link PagedFlux}. + * @return list of IP Prefixes as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1437,7 +1437,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes as paginated response with {@link PagedIterable}. + * @return list of IP Prefixes as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1453,7 +1453,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes as paginated response with {@link PagedIterable}. + * @return list of IP Prefixes as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -1468,7 +1468,7 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1506,7 +1506,7 @@ private Mono> listByResourceGroupNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( @@ -1543,7 +1543,7 @@ private Mono> listByResourceGroupNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1581,7 +1581,7 @@ private Mono> listBySubscriptionNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of IP Prefixes along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainImpl.java index 3303d55ab8fd7..f82d382b8d5f8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainImpl.java @@ -8,15 +8,16 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner; -import com.azure.resourcemanager.managednetworkfabric.models.ArpProperties; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatch; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; import java.util.Collections; -import java.util.List; import java.util.Map; public final class L2IsolationDomainImpl @@ -66,23 +67,18 @@ public Integer mtu() { return this.innerModel().mtu(); } - public List disabledOnResources() { - List inner = this.innerModel().disabledOnResources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public EnabledDisabledState administrativeState() { - return this.innerModel().administrativeState(); + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); } public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + public String annotation() { return this.innerModel().annotation(); } @@ -195,38 +191,37 @@ public L2IsolationDomain refresh(Context context) { return this; } - public void updateAdministrativeState(UpdateAdministrativeState body) { - serviceManager.l2IsolationDomains().updateAdministrativeState(resourceGroupName, l2IsolationDomainName, body); + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body) { + return serviceManager + .l2IsolationDomains() + .updateAdministrativeState(resourceGroupName, l2IsolationDomainName, body); } - public void updateAdministrativeState(UpdateAdministrativeState body, Context context) { - serviceManager + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState( + UpdateAdministrativeState body, Context context) { + return serviceManager .l2IsolationDomains() .updateAdministrativeState(resourceGroupName, l2IsolationDomainName, body, context); } - public void clearArpTable(EnableDisableOnResources body) { - serviceManager.l2IsolationDomains().clearArpTable(resourceGroupName, l2IsolationDomainName, body); - } - - public void clearArpTable(EnableDisableOnResources body, Context context) { - serviceManager.l2IsolationDomains().clearArpTable(resourceGroupName, l2IsolationDomainName, body, context); - } - - public void clearNeighborTable(EnableDisableOnResources body) { - serviceManager.l2IsolationDomains().clearNeighborTable(resourceGroupName, l2IsolationDomainName, body); + public ValidateConfigurationResponse validateConfiguration() { + return serviceManager.l2IsolationDomains().validateConfiguration(resourceGroupName, l2IsolationDomainName); } - public void clearNeighborTable(EnableDisableOnResources body, Context context) { - serviceManager.l2IsolationDomains().clearNeighborTable(resourceGroupName, l2IsolationDomainName, body, context); + public ValidateConfigurationResponse validateConfiguration(Context context) { + return serviceManager + .l2IsolationDomains() + .validateConfiguration(resourceGroupName, l2IsolationDomainName, context); } - public Map getArpEntries() { - return serviceManager.l2IsolationDomains().getArpEntries(resourceGroupName, l2IsolationDomainName); + public CommonPostActionResponseForStateUpdate commitConfiguration() { + return serviceManager.l2IsolationDomains().commitConfiguration(resourceGroupName, l2IsolationDomainName); } - public Map getArpEntries(Context context) { - return serviceManager.l2IsolationDomains().getArpEntries(resourceGroupName, l2IsolationDomainName, context); + public CommonPostActionResponseForStateUpdate commitConfiguration(Context context) { + return serviceManager + .l2IsolationDomains() + .commitConfiguration(resourceGroupName, l2IsolationDomainName, context); } public L2IsolationDomainImpl withRegion(Region location) { @@ -239,16 +234,6 @@ public L2IsolationDomainImpl withRegion(String location) { return this; } - public L2IsolationDomainImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - public L2IsolationDomainImpl withNetworkFabricId(String networkFabricId) { this.innerModel().withNetworkFabricId(networkFabricId); return this; @@ -259,6 +244,16 @@ public L2IsolationDomainImpl withVlanId(int vlanId) { return this; } + public L2IsolationDomainImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + public L2IsolationDomainImpl withMtu(Integer mtu) { if (isInCreateMode()) { this.innerModel().withMtu(mtu); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsClientImpl.java index f48d1b8f8a01a..72b362ac1f01f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsClientImpl.java @@ -34,15 +34,14 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.ArpPropertiesInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatch; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainsListResult; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import com.fasterxml.jackson.core.type.TypeReference; import java.nio.ByteBuffer; -import java.util.Map; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -119,7 +118,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}") - @ExpectedResponses({200, 202, 204}) + @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @HostParam("$host") String endpoint, @@ -133,7 +132,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/updateAdministrativeState") - @ExpectedResponses({202}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateAdministrativeState( @HostParam("$host") String endpoint, @@ -147,40 +146,24 @@ Mono>> updateAdministrativeState( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/clearArpTable") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> clearArpTable( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("l2IsolationDomainName") String l2IsolationDomainName, - @BodyParam("application/json") EnableDisableOnResources body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/clearNeighborTable") - @ExpectedResponses({202}) + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/validateConfiguration") + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> clearNeighborTable( + Mono>> validateConfiguration( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @PathParam("l2IsolationDomainName") String l2IsolationDomainName, - @BodyParam("application/json") EnableDisableOnResources body, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/getArpEntries") - @ExpectedResponses({202}) + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/commitConfiguration") + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> getArpEntries( + Mono>> commitConfiguration( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -246,8 +229,8 @@ Mono> listBySubscriptionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the L2 Isolation Domain resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -307,8 +290,8 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the L2 Isolation Domain resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -364,7 +347,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the L2IsolationDomain resource definition. + * @return the {@link PollerFlux} for polling of the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, L2IsolationDomainInner> beginCreateAsync( @@ -393,7 +376,7 @@ private PollerFlux, L2IsolationDomainInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the L2IsolationDomain resource definition. + * @return the {@link PollerFlux} for polling of the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, L2IsolationDomainInner> beginCreateAsync( @@ -423,7 +406,7 @@ private PollerFlux, L2IsolationDomainInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L2IsolationDomain resource definition. + * @return the {@link SyncPoller} for polling of the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, L2IsolationDomainInner> beginCreate( @@ -444,7 +427,7 @@ public SyncPoller, L2IsolationDomainInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L2IsolationDomain resource definition. + * @return the {@link SyncPoller} for polling of the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, L2IsolationDomainInner> beginCreate( @@ -464,7 +447,7 @@ public SyncPoller, L2IsolationDomainInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition on successful completion of {@link Mono}. + * @return the L2 Isolation Domain resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -487,7 +470,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition on successful completion of {@link Mono}. + * @return the L2 Isolation Domain resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -509,7 +492,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition. + * @return the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public L2IsolationDomainInner create( @@ -530,7 +513,7 @@ public L2IsolationDomainInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition. + * @return the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public L2IsolationDomainInner create( @@ -548,8 +531,8 @@ public L2IsolationDomainInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the L2 Isolation Domain resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -601,8 +584,8 @@ private Mono> getByResourceGroupWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the L2 Isolation Domain resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -650,7 +633,7 @@ private Mono> getByResourceGroupWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition on successful completion of {@link Mono}. + * @return the L2 Isolation Domain resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync( @@ -670,7 +653,7 @@ private Mono getByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition along with {@link Response}. + * @return the L2 Isolation Domain resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -688,7 +671,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition. + * @return the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public L2IsolationDomainInner getByResourceGroup(String resourceGroupName, String l2IsolationDomainName) { @@ -696,7 +679,7 @@ public L2IsolationDomainInner getByResourceGroup(String resourceGroupName, Strin } /** - * Updates a L2 Isolation Domain. + * Updates the L2 Isolation Domain. * *

API to update certain properties of the L2 Isolation Domain resource. * @@ -706,8 +689,8 @@ public L2IsolationDomainInner getByResourceGroup(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the L2 Isolation Domain resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -755,7 +738,7 @@ private Mono>> updateWithResponseAsync( } /** - * Updates a L2 Isolation Domain. + * Updates the L2 Isolation Domain. * *

API to update certain properties of the L2 Isolation Domain resource. * @@ -766,8 +749,8 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the L2 Isolation Domain resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -812,7 +795,7 @@ private Mono>> updateWithResponseAsync( } /** - * Updates a L2 Isolation Domain. + * Updates the L2 Isolation Domain. * *

API to update certain properties of the L2 Isolation Domain resource. * @@ -822,7 +805,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the L2IsolationDomain resource definition. + * @return the {@link PollerFlux} for polling of the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, L2IsolationDomainInner> beginUpdateAsync( @@ -839,7 +822,7 @@ private PollerFlux, L2IsolationDomainInner> b } /** - * Updates a L2 Isolation Domain. + * Updates the L2 Isolation Domain. * *

API to update certain properties of the L2 Isolation Domain resource. * @@ -850,7 +833,7 @@ private PollerFlux, L2IsolationDomainInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the L2IsolationDomain resource definition. + * @return the {@link PollerFlux} for polling of the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, L2IsolationDomainInner> beginUpdateAsync( @@ -869,7 +852,7 @@ private PollerFlux, L2IsolationDomainInner> b } /** - * Updates a L2 Isolation Domain. + * Updates the L2 Isolation Domain. * *

API to update certain properties of the L2 Isolation Domain resource. * @@ -879,7 +862,7 @@ private PollerFlux, L2IsolationDomainInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L2IsolationDomain resource definition. + * @return the {@link SyncPoller} for polling of the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, L2IsolationDomainInner> beginUpdate( @@ -888,7 +871,7 @@ public SyncPoller, L2IsolationDomainInner> be } /** - * Updates a L2 Isolation Domain. + * Updates the L2 Isolation Domain. * *

API to update certain properties of the L2 Isolation Domain resource. * @@ -899,7 +882,7 @@ public SyncPoller, L2IsolationDomainInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L2IsolationDomain resource definition. + * @return the {@link SyncPoller} for polling of the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, L2IsolationDomainInner> beginUpdate( @@ -908,7 +891,7 @@ public SyncPoller, L2IsolationDomainInner> be } /** - * Updates a L2 Isolation Domain. + * Updates the L2 Isolation Domain. * *

API to update certain properties of the L2 Isolation Domain resource. * @@ -918,7 +901,7 @@ public SyncPoller, L2IsolationDomainInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition on successful completion of {@link Mono}. + * @return the L2 Isolation Domain resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -929,7 +912,7 @@ private Mono updateAsync( } /** - * Updates a L2 Isolation Domain. + * Updates the L2 Isolation Domain. * *

API to update certain properties of the L2 Isolation Domain resource. * @@ -940,7 +923,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition on successful completion of {@link Mono}. + * @return the L2 Isolation Domain resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -951,7 +934,7 @@ private Mono updateAsync( } /** - * Updates a L2 Isolation Domain. + * Updates the L2 Isolation Domain. * *

API to update certain properties of the L2 Isolation Domain resource. * @@ -961,7 +944,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition. + * @return the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public L2IsolationDomainInner update( @@ -970,7 +953,7 @@ public L2IsolationDomainInner update( } /** - * Updates a L2 Isolation Domain. + * Updates the L2 Isolation Domain. * *

API to update certain properties of the L2 Isolation Domain resource. * @@ -981,7 +964,7 @@ public L2IsolationDomainInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition. + * @return the L2 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public L2IsolationDomainInner update( @@ -990,7 +973,7 @@ public L2IsolationDomainInner update( } /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -1041,7 +1024,7 @@ private Mono>> deleteWithResponseAsync( } /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -1090,7 +1073,7 @@ private Mono>> deleteWithResponseAsync( } /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -1112,7 +1095,7 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -1136,7 +1119,7 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -1153,7 +1136,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -1172,7 +1155,7 @@ public SyncPoller, Void> beginDelete( } /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -1191,7 +1174,7 @@ private Mono deleteAsync(String resourceGroupName, String l2IsolationDomai } /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -1211,7 +1194,7 @@ private Mono deleteAsync(String resourceGroupName, String l2IsolationDomai } /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -1227,7 +1210,7 @@ public void delete(String resourceGroupName, String l2IsolationDomainName) { } /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -1249,12 +1232,12 @@ public void delete(String resourceGroupName, String l2IsolationDomainName, Conte *

Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync( @@ -1307,13 +1290,13 @@ private Mono>> updateAdministrativeStateWithResponseAs *

Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync( @@ -1363,22 +1346,28 @@ private Mono>> updateAdministrativeStateWithResponseAs *

Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAdministrativeStateAsync( - String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body) { + private PollerFlux< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body) { Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, l2IsolationDomainName, body); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, + this.client.getContext()); } /** @@ -1387,23 +1376,30 @@ private PollerFlux, Void> beginUpdateAdministrativeStateAsync( *

Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAdministrativeStateAsync( - String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context) { + private PollerFlux< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, l2IsolationDomainName, body, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, + context); } /** @@ -1412,16 +1408,18 @@ private PollerFlux, Void> beginUpdateAdministrativeStateAsync( *

Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body) { + public SyncPoller< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body) { return this.beginUpdateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body).getSyncPoller(); } @@ -1431,17 +1429,19 @@ public SyncPoller, Void> beginUpdateAdministrativeState( *

Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context) { + public SyncPoller< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context) { return this .beginUpdateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body, context) .getSyncPoller(); @@ -1453,15 +1453,15 @@ public SyncPoller, Void> beginUpdateAdministrativeState( *

Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for device updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync( + private Mono updateAdministrativeStateAsync( String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body) { return beginUpdateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body) .last() @@ -1474,16 +1474,16 @@ private Mono updateAdministrativeStateAsync( *

Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for device updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync( + private Mono updateAdministrativeStateAsync( String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context) { return beginUpdateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body, context) .last() @@ -1496,16 +1496,17 @@ private Mono updateAdministrativeStateAsync( *

Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateAdministrativeState( + public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState( String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body) { - updateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body).block(); + return updateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body).block(); } /** @@ -1514,35 +1515,34 @@ public void updateAdministrativeState( *

Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateAdministrativeState( + public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState( String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context) { - updateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body, context).block(); + return updateAdministrativeStateAsync(resourceGroupName, l2IsolationDomainName, body, context).block(); } /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response of the action validate configuration along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> clearArpTableWithResponseAsync( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body) { + private Mono>> validateConfigurationWithResponseAsync( + String resourceGroupName, String l2IsolationDomainName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1563,45 +1563,37 @@ private Mono>> clearArpTableWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .clearArpTable( + .validateConfiguration( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, - body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response of the action validate configuration along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> clearArpTableWithResponseAsync( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context) { + private Mono>> validateConfigurationWithResponseAsync( + String resourceGroupName, String l2IsolationDomainName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1622,491 +1614,189 @@ private Mono>> clearArpTableWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .clearArpTable( + .validateConfiguration( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l2IsolationDomainName, - body, accept, context); } /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClearArpTableAsync( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body) { + private PollerFlux, ValidateConfigurationResponseInner> + beginValidateConfigurationAsync(String resourceGroupName, String l2IsolationDomainName) { Mono>> mono = - clearArpTableWithResponseAsync(resourceGroupName, l2IsolationDomainName, body); + validateConfigurationWithResponseAsync(resourceGroupName, l2IsolationDomainName); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + ValidateConfigurationResponseInner.class, + ValidateConfigurationResponseInner.class, + this.client.getContext()); } /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClearArpTableAsync( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context) { + private PollerFlux, ValidateConfigurationResponseInner> + beginValidateConfigurationAsync(String resourceGroupName, String l2IsolationDomainName, Context context) { context = this.client.mergeContext(context); Mono>> mono = - clearArpTableWithResponseAsync(resourceGroupName, l2IsolationDomainName, body, context); + validateConfigurationWithResponseAsync(resourceGroupName, l2IsolationDomainName, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClearArpTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body) { - return this.beginClearArpTableAsync(resourceGroupName, l2IsolationDomainName, body).getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClearArpTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context) { - return this.beginClearArpTableAsync(resourceGroupName, l2IsolationDomainName, body, context).getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono clearArpTableAsync( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body) { - return beginClearArpTableAsync(resourceGroupName, l2IsolationDomainName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono clearArpTableAsync( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context) { - return beginClearArpTableAsync(resourceGroupName, l2IsolationDomainName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void clearArpTable(String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body) { - clearArpTableAsync(resourceGroupName, l2IsolationDomainName, body).block(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void clearArpTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context) { - clearArpTableAsync(resourceGroupName, l2IsolationDomainName, body, context).block(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> clearNeighborTableWithResponseAsync( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .clearNeighborTable( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - l2IsolationDomainName, - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> clearNeighborTableWithResponseAsync( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l2IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l2IsolationDomainName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .clearNeighborTable( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - l2IsolationDomainName, - body, - accept, + .getLroResult( + mono, + this.client.getHttpPipeline(), + ValidateConfigurationResponseInner.class, + ValidateConfigurationResponseInner.class, context); } /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClearNeighborTableAsync( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body) { - Mono>> mono = - clearNeighborTableWithResponseAsync(resourceGroupName, l2IsolationDomainName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClearNeighborTableAsync( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - clearNeighborTableWithResponseAsync(resourceGroupName, l2IsolationDomainName, body, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClearNeighborTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body) { - return this.beginClearNeighborTableAsync(resourceGroupName, l2IsolationDomainName, body).getSyncPoller(); + public SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String l2IsolationDomainName) { + return this.beginValidateConfigurationAsync(resourceGroupName, l2IsolationDomainName).getSyncPoller(); } /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClearNeighborTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context) { - return this - .beginClearNeighborTableAsync(resourceGroupName, l2IsolationDomainName, body, context) - .getSyncPoller(); + public SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String l2IsolationDomainName, Context context) { + return this.beginValidateConfigurationAsync(resourceGroupName, l2IsolationDomainName, context).getSyncPoller(); } /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response of the action validate configuration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono clearNeighborTableAsync( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body) { - return beginClearNeighborTableAsync(resourceGroupName, l2IsolationDomainName, body) + private Mono validateConfigurationAsync( + String resourceGroupName, String l2IsolationDomainName) { + return beginValidateConfigurationAsync(resourceGroupName, l2IsolationDomainName) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response of the action validate configuration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono clearNeighborTableAsync( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context) { - return beginClearNeighborTableAsync(resourceGroupName, l2IsolationDomainName, body, context) + private Mono validateConfigurationAsync( + String resourceGroupName, String l2IsolationDomainName, Context context) { + return beginValidateConfigurationAsync(resourceGroupName, l2IsolationDomainName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void clearNeighborTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body) { - clearNeighborTableAsync(resourceGroupName, l2IsolationDomainName, body).block(); + public ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String l2IsolationDomainName) { + return validateConfigurationAsync(resourceGroupName, l2IsolationDomainName).block(); } /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void clearNeighborTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context) { - clearNeighborTableAsync(resourceGroupName, l2IsolationDomainName, body, context).block(); + public ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String l2IsolationDomainName, Context context) { + return validateConfigurationAsync(resourceGroupName, l2IsolationDomainName, context).block(); } /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return show ARP entries response per network device along with {@link Response} on successful completion of - * {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getArpEntriesWithResponseAsync( + private Mono>> commitConfigurationWithResponseAsync( String resourceGroupName, String l2IsolationDomainName) { if (this.client.getEndpoint() == null) { return Mono @@ -2133,7 +1823,7 @@ private Mono>> getArpEntriesWithResponseAsync( .withContext( context -> service - .getArpEntries( + .commitConfiguration( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -2145,21 +1835,21 @@ private Mono>> getArpEntriesWithResponseAsync( } /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return show ARP entries response per network device along with {@link Response} on successful completion of - * {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getArpEntriesWithResponseAsync( + private Mono>> commitConfigurationWithResponseAsync( String resourceGroupName, String l2IsolationDomainName, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -2184,7 +1874,7 @@ private Mono>> getArpEntriesWithResponseAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .getArpEntries( + .commitConfiguration( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -2195,177 +1885,178 @@ private Mono>> getArpEntriesWithResponseAsync( } /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of show ARP entries response per network device. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux>, Map> - beginGetArpEntriesAsync(String resourceGroupName, String l2IsolationDomainName) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginCommitConfigurationAsync(String resourceGroupName, String l2IsolationDomainName) { Mono>> mono = - getArpEntriesWithResponseAsync(resourceGroupName, l2IsolationDomainName); + commitConfigurationWithResponseAsync(resourceGroupName, l2IsolationDomainName); return this .client - ., Map>getLroResult( + .getLroResult( mono, this.client.getHttpPipeline(), - new TypeReference>() { - }.getType(), - new TypeReference>() { - }.getType(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); } /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of show ARP entries response per network device. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux>, Map> - beginGetArpEntriesAsync(String resourceGroupName, String l2IsolationDomainName, Context context) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginCommitConfigurationAsync(String resourceGroupName, String l2IsolationDomainName, Context context) { context = this.client.mergeContext(context); Mono>> mono = - getArpEntriesWithResponseAsync(resourceGroupName, l2IsolationDomainName, context); + commitConfigurationWithResponseAsync(resourceGroupName, l2IsolationDomainName, context); return this .client - ., Map>getLroResult( + .getLroResult( mono, this.client.getHttpPipeline(), - new TypeReference>() { - }.getType(), - new TypeReference>() { - }.getType(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of show ARP entries response per network device. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller>, Map> beginGetArpEntries( - String resourceGroupName, String l2IsolationDomainName) { - return this.beginGetArpEntriesAsync(resourceGroupName, l2IsolationDomainName).getSyncPoller(); + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginCommitConfiguration(String resourceGroupName, String l2IsolationDomainName) { + return this.beginCommitConfigurationAsync(resourceGroupName, l2IsolationDomainName).getSyncPoller(); } /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of show ARP entries response per network device. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller>, Map> beginGetArpEntries( - String resourceGroupName, String l2IsolationDomainName, Context context) { - return this.beginGetArpEntriesAsync(resourceGroupName, l2IsolationDomainName, context).getSyncPoller(); + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginCommitConfiguration(String resourceGroupName, String l2IsolationDomainName, Context context) { + return this.beginCommitConfigurationAsync(resourceGroupName, l2IsolationDomainName, context).getSyncPoller(); } /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return show ARP entries response per network device on successful completion of {@link Mono}. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getArpEntriesAsync( + private Mono commitConfigurationAsync( String resourceGroupName, String l2IsolationDomainName) { - return beginGetArpEntriesAsync(resourceGroupName, l2IsolationDomainName) + return beginCommitConfigurationAsync(resourceGroupName, l2IsolationDomainName) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return show ARP entries response per network device on successful completion of {@link Mono}. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getArpEntriesAsync( + private Mono commitConfigurationAsync( String resourceGroupName, String l2IsolationDomainName, Context context) { - return beginGetArpEntriesAsync(resourceGroupName, l2IsolationDomainName, context) + return beginCommitConfigurationAsync(resourceGroupName, l2IsolationDomainName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return show ARP entries response per network device. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Map getArpEntries(String resourceGroupName, String l2IsolationDomainName) { - return getArpEntriesAsync(resourceGroupName, l2IsolationDomainName).block(); + public CommonPostActionResponseForStateUpdateInner commitConfiguration( + String resourceGroupName, String l2IsolationDomainName) { + return commitConfigurationAsync(resourceGroupName, l2IsolationDomainName).block(); } /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return show ARP entries response per network device. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Map getArpEntries( + public CommonPostActionResponseForStateUpdateInner commitConfiguration( String resourceGroupName, String l2IsolationDomainName, Context context) { - return getArpEntriesAsync(resourceGroupName, l2IsolationDomainName, context).block(); + return commitConfigurationAsync(resourceGroupName, l2IsolationDomainName, context).block(); } /** @@ -2377,7 +2068,7 @@ public Map getArpEntries( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -2431,7 +2122,7 @@ private Mono> listByResourceGroupSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -2482,7 +2173,7 @@ private Mono> listByResourceGroupSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains as paginated response with {@link PagedFlux}. + * @return list of L2 Isolation Domains as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -2501,7 +2192,7 @@ private PagedFlux listByResourceGroupAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains as paginated response with {@link PagedFlux}. + * @return list of L2 Isolation Domains as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -2519,7 +2210,7 @@ private PagedFlux listByResourceGroupAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -2536,7 +2227,7 @@ public PagedIterable listByResourceGroup(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -2550,7 +2241,7 @@ public PagedIterable listByResourceGroup(String resource * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -2598,7 +2289,7 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -2641,7 +2332,7 @@ private Mono> listSinglePageAsync(Context * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains as paginated response with {@link PagedFlux}. + * @return list of L2 Isolation Domains as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -2658,7 +2349,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains as paginated response with {@link PagedFlux}. + * @return list of L2 Isolation Domains as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -2673,7 +2364,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -2689,7 +2380,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -2704,7 +2395,7 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -2742,7 +2433,7 @@ private Mono> listByResourceGroupNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( @@ -2779,7 +2470,7 @@ private Mono> listByResourceGroupNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -2817,7 +2508,7 @@ private Mono> listBySubscriptionNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of L2 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsImpl.java index af9173915ad0b..a65105817c359 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L2IsolationDomainsImpl.java @@ -10,16 +10,16 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.L2IsolationDomainsClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.ArpPropertiesInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner; -import com.azure.resourcemanager.managednetworkfabric.models.ArpProperties; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomains; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Collections; -import java.util.Map; -import java.util.stream.Collectors; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; public final class L2IsolationDomainsImpl implements L2IsolationDomains { private static final ClientLogger LOGGER = new ClientLogger(L2IsolationDomainsImpl.class); @@ -68,71 +68,68 @@ public void delete(String resourceGroupName, String l2IsolationDomainName, Conte this.serviceClient().delete(resourceGroupName, l2IsolationDomainName, context); } - public void updateAdministrativeState( + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState( String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body) { - this.serviceClient().updateAdministrativeState(resourceGroupName, l2IsolationDomainName, body); + CommonPostActionResponseForDeviceUpdateInner inner = + this.serviceClient().updateAdministrativeState(resourceGroupName, l2IsolationDomainName, body); + if (inner != null) { + return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void updateAdministrativeState( + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState( String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context) { - this.serviceClient().updateAdministrativeState(resourceGroupName, l2IsolationDomainName, body, context); - } - - public void clearArpTable(String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body) { - this.serviceClient().clearArpTable(resourceGroupName, l2IsolationDomainName, body); - } - - public void clearArpTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context) { - this.serviceClient().clearArpTable(resourceGroupName, l2IsolationDomainName, body, context); + CommonPostActionResponseForDeviceUpdateInner inner = + this.serviceClient().updateAdministrativeState(resourceGroupName, l2IsolationDomainName, body, context); + if (inner != null) { + return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void clearNeighborTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body) { - this.serviceClient().clearNeighborTable(resourceGroupName, l2IsolationDomainName, body); + public ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String l2IsolationDomainName) { + ValidateConfigurationResponseInner inner = + this.serviceClient().validateConfiguration(resourceGroupName, l2IsolationDomainName); + if (inner != null) { + return new ValidateConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } } - public void clearNeighborTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context) { - this.serviceClient().clearNeighborTable(resourceGroupName, l2IsolationDomainName, body, context); + public ValidateConfigurationResponse validateConfiguration( + String resourceGroupName, String l2IsolationDomainName, Context context) { + ValidateConfigurationResponseInner inner = + this.serviceClient().validateConfiguration(resourceGroupName, l2IsolationDomainName, context); + if (inner != null) { + return new ValidateConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } } - public Map getArpEntries(String resourceGroupName, String l2IsolationDomainName) { - Map inner = - this.serviceClient().getArpEntries(resourceGroupName, l2IsolationDomainName); + public CommonPostActionResponseForStateUpdate commitConfiguration( + String resourceGroupName, String l2IsolationDomainName) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().commitConfiguration(resourceGroupName, l2IsolationDomainName); if (inner != null) { - return Collections - .unmodifiableMap( - inner - .entrySet() - .stream() - .collect( - Collectors - .toMap( - Map.Entry::getKey, - inner1 -> new ArpPropertiesImpl(inner1.getValue(), this.manager())))); + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); } else { - return Collections.emptyMap(); + return null; } } - public Map getArpEntries( + public CommonPostActionResponseForStateUpdate commitConfiguration( String resourceGroupName, String l2IsolationDomainName, Context context) { - Map inner = - this.serviceClient().getArpEntries(resourceGroupName, l2IsolationDomainName, context); + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().commitConfiguration(resourceGroupName, l2IsolationDomainName, context); if (inner != null) { - return Collections - .unmodifiableMap( - inner - .entrySet() - .stream() - .collect( - Collectors - .toMap( - Map.Entry::getKey, - inner1 -> new ArpPropertiesImpl(inner1.getValue(), this.manager())))); + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); } else { - return Collections.emptyMap(); + return null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainImpl.java index 86e05618520e0..a3e6a7e065ff9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainImpl.java @@ -8,18 +8,20 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatch; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; import java.util.Collections; -import java.util.List; import java.util.Map; public final class L3IsolationDomainImpl @@ -61,32 +63,18 @@ public String networkFabricId() { return this.innerModel().networkFabricId(); } - public List disabledOnResources() { - List inner = this.innerModel().disabledOnResources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public EnabledDisabledState administrativeState() { - return this.innerModel().administrativeState(); - } - - public List optionBDisabledOnResources() { - List inner = this.innerModel().optionBDisabledOnResources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); } public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + public RedistributeConnectedSubnets redistributeConnectedSubnets() { return this.innerModel().redistributeConnectedSubnets(); } @@ -99,11 +87,7 @@ public AggregateRouteConfiguration aggregateRouteConfiguration() { return this.innerModel().aggregateRouteConfiguration(); } - public String description() { - return this.innerModel().description(); - } - - public L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { + public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { return this.innerModel().connectedSubnetRoutePolicy(); } @@ -219,42 +203,37 @@ public L3IsolationDomain refresh(Context context) { return this; } - public void updateAdministrativeState(UpdateAdministrativeState body) { - serviceManager.l3IsolationDomains().updateAdministrativeState(resourceGroupName, l3IsolationDomainName, body); + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body) { + return serviceManager + .l3IsolationDomains() + .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, body); } - public void updateAdministrativeState(UpdateAdministrativeState body, Context context) { - serviceManager + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState( + UpdateAdministrativeState body, Context context) { + return serviceManager .l3IsolationDomains() .updateAdministrativeState(resourceGroupName, l3IsolationDomainName, body, context); } - public void updateOptionBAdministrativeState(UpdateAdministrativeState body) { - serviceManager - .l3IsolationDomains() - .updateOptionBAdministrativeState(resourceGroupName, l3IsolationDomainName, body); + public ValidateConfigurationResponse validateConfiguration() { + return serviceManager.l3IsolationDomains().validateConfiguration(resourceGroupName, l3IsolationDomainName); } - public void updateOptionBAdministrativeState(UpdateAdministrativeState body, Context context) { - serviceManager + public ValidateConfigurationResponse validateConfiguration(Context context) { + return serviceManager .l3IsolationDomains() - .updateOptionBAdministrativeState(resourceGroupName, l3IsolationDomainName, body, context); - } - - public void clearArpTable(EnableDisableOnResources body) { - serviceManager.l3IsolationDomains().clearArpTable(resourceGroupName, l3IsolationDomainName, body); - } - - public void clearArpTable(EnableDisableOnResources body, Context context) { - serviceManager.l3IsolationDomains().clearArpTable(resourceGroupName, l3IsolationDomainName, body, context); + .validateConfiguration(resourceGroupName, l3IsolationDomainName, context); } - public void clearNeighborTable(EnableDisableOnResources body) { - serviceManager.l3IsolationDomains().clearNeighborTable(resourceGroupName, l3IsolationDomainName, body); + public CommonPostActionResponseForStateUpdate commitConfiguration() { + return serviceManager.l3IsolationDomains().commitConfiguration(resourceGroupName, l3IsolationDomainName); } - public void clearNeighborTable(EnableDisableOnResources body, Context context) { - serviceManager.l3IsolationDomains().clearNeighborTable(resourceGroupName, l3IsolationDomainName, body, context); + public CommonPostActionResponseForStateUpdate commitConfiguration(Context context) { + return serviceManager + .l3IsolationDomains() + .commitConfiguration(resourceGroupName, l3IsolationDomainName, context); } public L3IsolationDomainImpl withRegion(Region location) { @@ -267,6 +246,11 @@ public L3IsolationDomainImpl withRegion(String location) { return this; } + public L3IsolationDomainImpl withNetworkFabricId(String networkFabricId) { + this.innerModel().withNetworkFabricId(networkFabricId); + return this; + } + public L3IsolationDomainImpl withTags(Map tags) { if (isInCreateMode()) { this.innerModel().withTags(tags); @@ -277,11 +261,6 @@ public L3IsolationDomainImpl withTags(Map tags) { } } - public L3IsolationDomainImpl withNetworkFabricId(String networkFabricId) { - this.innerModel().withNetworkFabricId(networkFabricId); - return this; - } - public L3IsolationDomainImpl withRedistributeConnectedSubnets( RedistributeConnectedSubnets redistributeConnectedSubnets) { if (isInCreateMode()) { @@ -314,32 +293,26 @@ public L3IsolationDomainImpl withAggregateRouteConfiguration( } } - public L3IsolationDomainImpl withDescription(String description) { + public L3IsolationDomainImpl withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { if (isInCreateMode()) { - this.innerModel().withDescription(description); + this.innerModel().withConnectedSubnetRoutePolicy(connectedSubnetRoutePolicy); return this; } else { - this.updateBody.withDescription(description); + this.updateBody.withConnectedSubnetRoutePolicy(connectedSubnetRoutePolicy); return this; } } - public L3IsolationDomainImpl withConnectedSubnetRoutePolicy( - L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { + public L3IsolationDomainImpl withAnnotation(String annotation) { if (isInCreateMode()) { - this.innerModel().withConnectedSubnetRoutePolicy(connectedSubnetRoutePolicy); + this.innerModel().withAnnotation(annotation); return this; } else { - this.updateBody.withConnectedSubnetRoutePolicy(connectedSubnetRoutePolicy); + this.updateBody.withAnnotation(annotation); return this; } } - public L3IsolationDomainImpl withAnnotation(String annotation) { - this.innerModel().withAnnotation(annotation); - return this; - } - private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsClientImpl.java index da683a853b650..3120634b213f0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsClientImpl.java @@ -34,8 +34,10 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatch; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainsListResult; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -116,7 +118,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}") - @ExpectedResponses({200, 202, 204}) + @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @HostParam("$host") String endpoint, @@ -154,7 +156,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateAdministrativeState") - @ExpectedResponses({202}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateAdministrativeState( @HostParam("$host") String endpoint, @@ -168,46 +170,29 @@ Mono>> updateAdministrativeState( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateOptionBAdministrativeState") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateOptionBAdministrativeState( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @BodyParam("application/json") UpdateAdministrativeState body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/clearArpTable") - @ExpectedResponses({202}) + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/validateConfiguration") + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> clearArpTable( + Mono>> validateConfiguration( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @BodyParam("application/json") EnableDisableOnResources body, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/clearNeighborTable") - @ExpectedResponses({202}) + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/commitConfiguration") + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> clearNeighborTable( + Mono>> commitConfiguration( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @PathParam("l3IsolationDomainName") String l3IsolationDomainName, - @BodyParam("application/json") EnableDisableOnResources body, @HeaderParam("Accept") String accept, Context context); @@ -245,8 +230,8 @@ Mono> listBySubscriptionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the L3 Isolation Domain resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -307,8 +292,8 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the L3 Isolation Domain resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -365,7 +350,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the L3IsolationDomain resource definition. + * @return the {@link PollerFlux} for polling of the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, L3IsolationDomainInner> beginCreateAsync( @@ -395,7 +380,7 @@ private PollerFlux, L3IsolationDomainInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the L3IsolationDomain resource definition. + * @return the {@link PollerFlux} for polling of the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, L3IsolationDomainInner> beginCreateAsync( @@ -426,7 +411,7 @@ private PollerFlux, L3IsolationDomainInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L3IsolationDomain resource definition. + * @return the {@link SyncPoller} for polling of the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, L3IsolationDomainInner> beginCreate( @@ -448,7 +433,7 @@ public SyncPoller, L3IsolationDomainInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L3IsolationDomain resource definition. + * @return the {@link SyncPoller} for polling of the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, L3IsolationDomainInner> beginCreate( @@ -469,7 +454,7 @@ public SyncPoller, L3IsolationDomainInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition on successful completion of {@link Mono}. + * @return the L3 Isolation Domain resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -493,7 +478,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition on successful completion of {@link Mono}. + * @return the L3 Isolation Domain resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -516,7 +501,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition. + * @return the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public L3IsolationDomainInner create( @@ -538,7 +523,7 @@ public L3IsolationDomainInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition. + * @return the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public L3IsolationDomainInner create( @@ -556,8 +541,8 @@ public L3IsolationDomainInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the L3 Isolation Domain resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -609,8 +594,8 @@ private Mono> getByResourceGroupWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the L3 Isolation Domain resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -658,7 +643,7 @@ private Mono> getByResourceGroupWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition on successful completion of {@link Mono}. + * @return the L3 Isolation Domain resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync( @@ -678,7 +663,7 @@ private Mono getByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition along with {@link Response}. + * @return the L3 Isolation Domain resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -696,7 +681,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition. + * @return the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public L3IsolationDomainInner getByResourceGroup(String resourceGroupName, String l3IsolationDomainName) { @@ -714,8 +699,8 @@ public L3IsolationDomainInner getByResourceGroup(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the L3 Isolation Domain resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -774,8 +759,8 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the L3 Isolation Domain resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -830,7 +815,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the L3IsolationDomain resource definition. + * @return the {@link PollerFlux} for polling of the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, L3IsolationDomainInner> beginUpdateAsync( @@ -858,7 +843,7 @@ private PollerFlux, L3IsolationDomainInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the L3IsolationDomain resource definition. + * @return the {@link PollerFlux} for polling of the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, L3IsolationDomainInner> beginUpdateAsync( @@ -887,7 +872,7 @@ private PollerFlux, L3IsolationDomainInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L3IsolationDomain resource definition. + * @return the {@link SyncPoller} for polling of the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, L3IsolationDomainInner> beginUpdate( @@ -907,7 +892,7 @@ public SyncPoller, L3IsolationDomainInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the L3IsolationDomain resource definition. + * @return the {@link SyncPoller} for polling of the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, L3IsolationDomainInner> beginUpdate( @@ -926,7 +911,7 @@ public SyncPoller, L3IsolationDomainInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition on successful completion of {@link Mono}. + * @return the L3 Isolation Domain resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -948,7 +933,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition on successful completion of {@link Mono}. + * @return the L3 Isolation Domain resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -969,7 +954,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition. + * @return the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public L3IsolationDomainInner update( @@ -989,7 +974,7 @@ public L3IsolationDomainInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition. + * @return the L3 Isolation Domain resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public L3IsolationDomainInner update( @@ -1260,7 +1245,7 @@ public void delete(String resourceGroupName, String l3IsolationDomainName, Conte * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -1314,7 +1299,7 @@ private Mono> listByResourceGroupSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1365,7 +1350,7 @@ private Mono> listByResourceGroupSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains as paginated response with {@link PagedFlux}. + * @return list of L3 Isolation Domains as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1384,7 +1369,7 @@ private PagedFlux listByResourceGroupAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains as paginated response with {@link PagedFlux}. + * @return list of L3 Isolation Domains as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -1402,7 +1387,7 @@ private PagedFlux listByResourceGroupAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1419,7 +1404,7 @@ public PagedIterable listByResourceGroup(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -1433,7 +1418,7 @@ public PagedIterable listByResourceGroup(String resource * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1481,7 +1466,7 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1524,7 +1509,7 @@ private Mono> listSinglePageAsync(Context * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains as paginated response with {@link PagedFlux}. + * @return list of L3 Isolation Domains as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1541,7 +1526,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains as paginated response with {@link PagedFlux}. + * @return list of L3 Isolation Domains as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1556,7 +1541,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1572,7 +1557,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -1585,12 +1570,12 @@ public PagedIterable list(Context context) { *

Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync( @@ -1643,13 +1628,13 @@ private Mono>> updateAdministrativeStateWithResponseAs *

Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync( @@ -1699,22 +1684,28 @@ private Mono>> updateAdministrativeStateWithResponseAs *

Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAdministrativeStateAsync( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { + private PollerFlux< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, l3IsolationDomainName, body); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, + this.client.getContext()); } /** @@ -1723,23 +1714,30 @@ private PollerFlux, Void> beginUpdateAdministrativeStateAsync( *

Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAdministrativeStateAsync( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { + private PollerFlux< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateAdministrativeStateWithResponseAsync(resourceGroupName, l3IsolationDomainName, body, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, + context); } /** @@ -1748,16 +1746,18 @@ private PollerFlux, Void> beginUpdateAdministrativeStateAsync( *

Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { + public SyncPoller< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { return this.beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body).getSyncPoller(); } @@ -1767,17 +1767,19 @@ public SyncPoller, Void> beginUpdateAdministrativeState( *

Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { + public SyncPoller< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { return this .beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body, context) .getSyncPoller(); @@ -1789,15 +1791,15 @@ public SyncPoller, Void> beginUpdateAdministrativeState( *

Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for device updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync( + private Mono updateAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { return beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body) .last() @@ -1810,16 +1812,16 @@ private Mono updateAdministrativeStateAsync( *

Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for device updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync( + private Mono updateAdministrativeStateAsync( String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { return beginUpdateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body, context) .last() @@ -1832,16 +1834,17 @@ private Mono updateAdministrativeStateAsync( *

Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateAdministrativeState( + public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { - updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body).block(); + return updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body).block(); } /** @@ -1850,35 +1853,34 @@ public void updateAdministrativeState( *

Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateAdministrativeState( + public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { - updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body, context).block(); + return updateAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body, context).block(); } /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response of the action validate configuration along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateOptionBAdministrativeStateWithResponseAsync( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { + private Mono>> validateConfigurationWithResponseAsync( + String resourceGroupName, String l3IsolationDomainName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1899,45 +1901,37 @@ private Mono>> updateOptionBAdministrativeStateWithRes return Mono .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .updateOptionBAdministrativeState( + .validateConfiguration( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response of the action validate configuration along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateOptionBAdministrativeStateWithResponseAsync( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { + private Mono>> validateConfigurationWithResponseAsync( + String resourceGroupName, String l3IsolationDomainName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1958,494 +1952,190 @@ private Mono>> updateOptionBAdministrativeStateWithRes return Mono .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .updateOptionBAdministrativeState( + .validateConfiguration( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - body, accept, context); } /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateOptionBAdministrativeStateAsync( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { + private PollerFlux, ValidateConfigurationResponseInner> + beginValidateConfigurationAsync(String resourceGroupName, String l3IsolationDomainName) { Mono>> mono = - updateOptionBAdministrativeStateWithResponseAsync(resourceGroupName, l3IsolationDomainName, body); + validateConfigurationWithResponseAsync(resourceGroupName, l3IsolationDomainName); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + ValidateConfigurationResponseInner.class, + ValidateConfigurationResponseInner.class, + this.client.getContext()); } /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateOptionBAdministrativeStateAsync( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { + private PollerFlux, ValidateConfigurationResponseInner> + beginValidateConfigurationAsync(String resourceGroupName, String l3IsolationDomainName, Context context) { context = this.client.mergeContext(context); Mono>> mono = - updateOptionBAdministrativeStateWithResponseAsync(resourceGroupName, l3IsolationDomainName, body, context); + validateConfigurationWithResponseAsync(resourceGroupName, l3IsolationDomainName, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateOptionBAdministrativeState( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { - return this - .beginUpdateOptionBAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body) - .getSyncPoller(); - } - - /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateOptionBAdministrativeState( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { - return this - .beginUpdateOptionBAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body, context) - .getSyncPoller(); - } - - /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateOptionBAdministrativeStateAsync( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { - return beginUpdateOptionBAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateOptionBAdministrativeStateAsync( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { - return beginUpdateOptionBAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void updateOptionBAdministrativeState( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { - updateOptionBAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body).block(); - } - - /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void updateOptionBAdministrativeState( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { - updateOptionBAdministrativeStateAsync(resourceGroupName, l3IsolationDomainName, body, context).block(); - } - - /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> clearArpTableWithResponseAsync( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .clearArpTable( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - l3IsolationDomainName, - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> clearArpTableWithResponseAsync( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (l3IsolationDomainName == null) { - return Mono - .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .clearArpTable( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - l3IsolationDomainName, - body, - accept, + .getLroResult( + mono, + this.client.getHttpPipeline(), + ValidateConfigurationResponseInner.class, + ValidateConfigurationResponseInner.class, context); } /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClearArpTableAsync( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body) { - Mono>> mono = - clearArpTableWithResponseAsync(resourceGroupName, l3IsolationDomainName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClearArpTableAsync( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - clearArpTableWithResponseAsync(resourceGroupName, l3IsolationDomainName, body, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClearArpTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body) { - return this.beginClearArpTableAsync(resourceGroupName, l3IsolationDomainName, body).getSyncPoller(); + public SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String l3IsolationDomainName) { + return this.beginValidateConfigurationAsync(resourceGroupName, l3IsolationDomainName).getSyncPoller(); } /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClearArpTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context) { - return this.beginClearArpTableAsync(resourceGroupName, l3IsolationDomainName, body, context).getSyncPoller(); + public SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context) { + return this.beginValidateConfigurationAsync(resourceGroupName, l3IsolationDomainName, context).getSyncPoller(); } /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response of the action validate configuration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono clearArpTableAsync( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body) { - return beginClearArpTableAsync(resourceGroupName, l3IsolationDomainName, body) + private Mono validateConfigurationAsync( + String resourceGroupName, String l3IsolationDomainName) { + return beginValidateConfigurationAsync(resourceGroupName, l3IsolationDomainName) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response of the action validate configuration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono clearArpTableAsync( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context) { - return beginClearArpTableAsync(resourceGroupName, l3IsolationDomainName, body, context) + private Mono validateConfigurationAsync( + String resourceGroupName, String l3IsolationDomainName, Context context) { + return beginValidateConfigurationAsync(resourceGroupName, l3IsolationDomainName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void clearArpTable(String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body) { - clearArpTableAsync(resourceGroupName, l3IsolationDomainName, body).block(); + public ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String l3IsolationDomainName) { + return validateConfigurationAsync(resourceGroupName, l3IsolationDomainName).block(); } /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void clearArpTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context) { - clearArpTableAsync(resourceGroupName, l3IsolationDomainName, body, context).block(); + public ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String l3IsolationDomainName, Context context) { + return validateConfigurationAsync(resourceGroupName, l3IsolationDomainName, context).block(); } /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> clearNeighborTableWithResponseAsync( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body) { + private Mono>> commitConfigurationWithResponseAsync( + String resourceGroupName, String l3IsolationDomainName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -2466,45 +2156,39 @@ private Mono>> clearNeighborTableWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .clearNeighborTable( + .commitConfiguration( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> clearNeighborTableWithResponseAsync( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context) { + private Mono>> commitConfigurationWithResponseAsync( + String resourceGroupName, String l3IsolationDomainName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -2525,193 +2209,192 @@ private Mono>> clearNeighborTableWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter l3IsolationDomainName is required and cannot be null.")); } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .clearNeighborTable( + .commitConfiguration( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), l3IsolationDomainName, - body, accept, context); } /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClearNeighborTableAsync( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginCommitConfigurationAsync(String resourceGroupName, String l3IsolationDomainName) { Mono>> mono = - clearNeighborTableWithResponseAsync(resourceGroupName, l3IsolationDomainName, body); + commitConfigurationWithResponseAsync(resourceGroupName, l3IsolationDomainName); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); } /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginClearNeighborTableAsync( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginCommitConfigurationAsync(String resourceGroupName, String l3IsolationDomainName, Context context) { context = this.client.mergeContext(context); Mono>> mono = - clearNeighborTableWithResponseAsync(resourceGroupName, l3IsolationDomainName, body, context); + commitConfigurationWithResponseAsync(resourceGroupName, l3IsolationDomainName, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); } /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClearNeighborTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body) { - return this.beginClearNeighborTableAsync(resourceGroupName, l3IsolationDomainName, body).getSyncPoller(); + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginCommitConfiguration(String resourceGroupName, String l3IsolationDomainName) { + return this.beginCommitConfigurationAsync(resourceGroupName, l3IsolationDomainName).getSyncPoller(); } /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginClearNeighborTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context) { - return this - .beginClearNeighborTableAsync(resourceGroupName, l3IsolationDomainName, body, context) - .getSyncPoller(); + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginCommitConfiguration(String resourceGroupName, String l3IsolationDomainName, Context context) { + return this.beginCommitConfigurationAsync(resourceGroupName, l3IsolationDomainName, context).getSyncPoller(); } /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono clearNeighborTableAsync( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body) { - return beginClearNeighborTableAsync(resourceGroupName, l3IsolationDomainName, body) + private Mono commitConfigurationAsync( + String resourceGroupName, String l3IsolationDomainName) { + return beginCommitConfigurationAsync(resourceGroupName, l3IsolationDomainName) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono clearNeighborTableAsync( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context) { - return beginClearNeighborTableAsync(resourceGroupName, l3IsolationDomainName, body, context) + private Mono commitConfigurationAsync( + String resourceGroupName, String l3IsolationDomainName, Context context) { + return beginCommitConfigurationAsync(resourceGroupName, l3IsolationDomainName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void clearNeighborTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body) { - clearNeighborTableAsync(resourceGroupName, l3IsolationDomainName, body).block(); + public CommonPostActionResponseForStateUpdateInner commitConfiguration( + String resourceGroupName, String l3IsolationDomainName) { + return commitConfigurationAsync(resourceGroupName, l3IsolationDomainName).block(); } /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void clearNeighborTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context) { - clearNeighborTableAsync(resourceGroupName, l3IsolationDomainName, body, context).block(); + public CommonPostActionResponseForStateUpdateInner commitConfiguration( + String resourceGroupName, String l3IsolationDomainName, Context context) { + return commitConfigurationAsync(resourceGroupName, l3IsolationDomainName, context).block(); } /** @@ -2722,7 +2405,7 @@ public void clearNeighborTable( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -2760,7 +2443,7 @@ private Mono> listByResourceGroupNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( @@ -2797,7 +2480,7 @@ private Mono> listByResourceGroupNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -2835,7 +2518,7 @@ private Mono> listBySubscriptionNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of L3 Isolation Domains along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsImpl.java index 903698acb1f79..ac1d2bfaa0892 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/L3IsolationDomainsImpl.java @@ -10,11 +10,16 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.L3IsolationDomainsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomains; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; public final class L3IsolationDomainsImpl implements L3IsolationDomains { private static final ClientLogger LOGGER = new ClientLogger(L3IsolationDomainsImpl.class); @@ -84,43 +89,69 @@ public PagedIterable list(Context context) { return Utils.mapPage(inner, inner1 -> new L3IsolationDomainImpl(inner1, this.manager())); } - public void updateAdministrativeState( + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { - this.serviceClient().updateAdministrativeState(resourceGroupName, l3IsolationDomainName, body); - } - - public void updateAdministrativeState( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { - this.serviceClient().updateAdministrativeState(resourceGroupName, l3IsolationDomainName, body, context); - } - - public void updateOptionBAdministrativeState( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body) { - this.serviceClient().updateOptionBAdministrativeState(resourceGroupName, l3IsolationDomainName, body); + CommonPostActionResponseForDeviceUpdateInner inner = + this.serviceClient().updateAdministrativeState(resourceGroupName, l3IsolationDomainName, body); + if (inner != null) { + return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void updateOptionBAdministrativeState( + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context) { - this.serviceClient().updateOptionBAdministrativeState(resourceGroupName, l3IsolationDomainName, body, context); + CommonPostActionResponseForDeviceUpdateInner inner = + this.serviceClient().updateAdministrativeState(resourceGroupName, l3IsolationDomainName, body, context); + if (inner != null) { + return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void clearArpTable(String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body) { - this.serviceClient().clearArpTable(resourceGroupName, l3IsolationDomainName, body); + public ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String l3IsolationDomainName) { + ValidateConfigurationResponseInner inner = + this.serviceClient().validateConfiguration(resourceGroupName, l3IsolationDomainName); + if (inner != null) { + return new ValidateConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } } - public void clearArpTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context) { - this.serviceClient().clearArpTable(resourceGroupName, l3IsolationDomainName, body, context); + public ValidateConfigurationResponse validateConfiguration( + String resourceGroupName, String l3IsolationDomainName, Context context) { + ValidateConfigurationResponseInner inner = + this.serviceClient().validateConfiguration(resourceGroupName, l3IsolationDomainName, context); + if (inner != null) { + return new ValidateConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } } - public void clearNeighborTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body) { - this.serviceClient().clearNeighborTable(resourceGroupName, l3IsolationDomainName, body); + public CommonPostActionResponseForStateUpdate commitConfiguration( + String resourceGroupName, String l3IsolationDomainName) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().commitConfiguration(resourceGroupName, l3IsolationDomainName); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void clearNeighborTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context) { - this.serviceClient().clearNeighborTable(resourceGroupName, l3IsolationDomainName, body, context); + public CommonPostActionResponseForStateUpdate commitConfiguration( + String resourceGroupName, String l3IsolationDomainName, Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().commitConfiguration(resourceGroupName, l3IsolationDomainName, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } } public L3IsolationDomain getById(String id) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupImpl.java new file mode 100644 index 0000000000000..5a15aa6a8b6d8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupImpl.java @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class NeighborGroupImpl implements NeighborGroup, NeighborGroup.Definition, NeighborGroup.Update { + private NeighborGroupInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public List networkTapIds() { + List inner = this.innerModel().networkTapIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List networkTapRuleIds() { + List inner = this.innerModel().networkTapRuleIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public NeighborGroupDestination destination() { + return this.innerModel().destination(); + } + + public String annotation() { + return this.innerModel().annotation(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public NeighborGroupInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String neighborGroupName; + + private NeighborGroupPatch updateBody; + + public NeighborGroupImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public NeighborGroup create() { + this.innerObject = + serviceManager + .serviceClient() + .getNeighborGroups() + .create(resourceGroupName, neighborGroupName, this.innerModel(), Context.NONE); + return this; + } + + public NeighborGroup create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNeighborGroups() + .create(resourceGroupName, neighborGroupName, this.innerModel(), context); + return this; + } + + NeighborGroupImpl( + String name, com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = new NeighborGroupInner(); + this.serviceManager = serviceManager; + this.neighborGroupName = name; + } + + public NeighborGroupImpl update() { + this.updateBody = new NeighborGroupPatch(); + return this; + } + + public NeighborGroup apply() { + this.innerObject = + serviceManager + .serviceClient() + .getNeighborGroups() + .update(resourceGroupName, neighborGroupName, updateBody, Context.NONE); + return this; + } + + public NeighborGroup apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNeighborGroups() + .update(resourceGroupName, neighborGroupName, updateBody, context); + return this; + } + + NeighborGroupImpl( + NeighborGroupInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.neighborGroupName = Utils.getValueFromIdByName(innerObject.id(), "neighborGroups"); + } + + public NeighborGroup refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getNeighborGroups() + .getByResourceGroupWithResponse(resourceGroupName, neighborGroupName, Context.NONE) + .getValue(); + return this; + } + + public NeighborGroup refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNeighborGroups() + .getByResourceGroupWithResponse(resourceGroupName, neighborGroupName, context) + .getValue(); + return this; + } + + public NeighborGroupImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public NeighborGroupImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public NeighborGroupImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public NeighborGroupImpl withDestination(NeighborGroupDestination destination) { + if (isInCreateMode()) { + this.innerModel().withDestination(destination); + return this; + } else { + this.updateBody.withDestination(destination); + return this; + } + } + + public NeighborGroupImpl withAnnotation(String annotation) { + if (isInCreateMode()) { + this.innerModel().withAnnotation(annotation); + return this; + } else { + this.updateBody.withAnnotation(annotation); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsClientImpl.java new file mode 100644 index 0000000000000..0e121db9681ba --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsClientImpl.java @@ -0,0 +1,1629 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupsListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in NeighborGroupsClient. */ +public final class NeighborGroupsClientImpl implements NeighborGroupsClient { + /** The proxy service used to perform REST calls. */ + private final NeighborGroupsService service; + + /** The service client containing this operation class. */ + private final AzureNetworkFabricManagementServiceApiImpl client; + + /** + * Initializes an instance of NeighborGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NeighborGroupsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + this.service = + RestProxy.create(NeighborGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureNetworkFabricManagementServiceApiNeighborGroups to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureNetworkFabricMa") + public interface NeighborGroupsService { + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("neighborGroupName") String neighborGroupName, + @BodyParam("application/json") NeighborGroupInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("neighborGroupName") String neighborGroupName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("neighborGroupName") String neighborGroupName, + @BodyParam("application/json") NeighborGroupPatch body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("neighborGroupName") String neighborGroupName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/neighborGroups") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Creates the Neighbor Group. + * + *

Implements the Neighbor Group PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the Neighbor Group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, String neighborGroupName, NeighborGroupInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (neighborGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter neighborGroupName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .create( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + neighborGroupName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates the Neighbor Group. + * + *

Implements the Neighbor Group PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the Neighbor Group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, String neighborGroupName, NeighborGroupInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (neighborGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter neighborGroupName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .create( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + neighborGroupName, + body, + accept, + context); + } + + /** + * Creates the Neighbor Group. + * + *

Implements the Neighbor Group PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NeighborGroupInner> beginCreateAsync( + String resourceGroupName, String neighborGroupName, NeighborGroupInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, neighborGroupName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NeighborGroupInner.class, + NeighborGroupInner.class, + this.client.getContext()); + } + + /** + * Creates the Neighbor Group. + * + *

Implements the Neighbor Group PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NeighborGroupInner> beginCreateAsync( + String resourceGroupName, String neighborGroupName, NeighborGroupInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createWithResponseAsync(resourceGroupName, neighborGroupName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), NeighborGroupInner.class, NeighborGroupInner.class, context); + } + + /** + * Creates the Neighbor Group. + * + *

Implements the Neighbor Group PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NeighborGroupInner> beginCreate( + String resourceGroupName, String neighborGroupName, NeighborGroupInner body) { + return this.beginCreateAsync(resourceGroupName, neighborGroupName, body).getSyncPoller(); + } + + /** + * Creates the Neighbor Group. + * + *

Implements the Neighbor Group PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NeighborGroupInner> beginCreate( + String resourceGroupName, String neighborGroupName, NeighborGroupInner body, Context context) { + return this.beginCreateAsync(resourceGroupName, neighborGroupName, body, context).getSyncPoller(); + } + + /** + * Creates the Neighbor Group. + * + *

Implements the Neighbor Group PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the Neighbor Group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, String neighborGroupName, NeighborGroupInner body) { + return beginCreateAsync(resourceGroupName, neighborGroupName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates the Neighbor Group. + * + *

Implements the Neighbor Group PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the Neighbor Group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, String neighborGroupName, NeighborGroupInner body, Context context) { + return beginCreateAsync(resourceGroupName, neighborGroupName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates the Neighbor Group. + * + *

Implements the Neighbor Group PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NeighborGroupInner create(String resourceGroupName, String neighborGroupName, NeighborGroupInner body) { + return createAsync(resourceGroupName, neighborGroupName, body).block(); + } + + /** + * Creates the Neighbor Group. + * + *

Implements the Neighbor Group PUT method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NeighborGroupInner create( + String resourceGroupName, String neighborGroupName, NeighborGroupInner body, Context context) { + return createAsync(resourceGroupName, neighborGroupName, body, context).block(); + } + + /** + * Retrieves details of neighbor Group using GET method. + * + *

Gets the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Neighbor Group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String neighborGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (neighborGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter neighborGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + neighborGroupName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves details of neighbor Group using GET method. + * + *

Gets the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Neighbor Group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String neighborGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (neighborGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter neighborGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + neighborGroupName, + accept, + context); + } + + /** + * Retrieves details of neighbor Group using GET method. + * + *

Gets the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Neighbor Group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String neighborGroupName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, neighborGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieves details of neighbor Group using GET method. + * + *

Gets the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Neighbor Group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String neighborGroupName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, neighborGroupName, context).block(); + } + + /** + * Retrieves details of neighbor Group using GET method. + * + *

Gets the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NeighborGroupInner getByResourceGroup(String resourceGroupName, String neighborGroupName) { + return getByResourceGroupWithResponse(resourceGroupName, neighborGroupName, Context.NONE).getValue(); + } + + /** + * API to update certain properties of the Neighbor Group Resources. + * + *

Updates the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Neighbor Group properties to update. Only annotations are supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the Neighbor Group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String neighborGroupName, NeighborGroupPatch body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (neighborGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter neighborGroupName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + neighborGroupName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * API to update certain properties of the Neighbor Group Resources. + * + *

Updates the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Neighbor Group properties to update. Only annotations are supported. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the Neighbor Group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String neighborGroupName, NeighborGroupPatch body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (neighborGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter neighborGroupName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + neighborGroupName, + body, + accept, + context); + } + + /** + * API to update certain properties of the Neighbor Group Resources. + * + *

Updates the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Neighbor Group properties to update. Only annotations are supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NeighborGroupInner> beginUpdateAsync( + String resourceGroupName, String neighborGroupName, NeighborGroupPatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, neighborGroupName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NeighborGroupInner.class, + NeighborGroupInner.class, + this.client.getContext()); + } + + /** + * API to update certain properties of the Neighbor Group Resources. + * + *

Updates the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Neighbor Group properties to update. Only annotations are supported. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NeighborGroupInner> beginUpdateAsync( + String resourceGroupName, String neighborGroupName, NeighborGroupPatch body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, neighborGroupName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), NeighborGroupInner.class, NeighborGroupInner.class, context); + } + + /** + * API to update certain properties of the Neighbor Group Resources. + * + *

Updates the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Neighbor Group properties to update. Only annotations are supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NeighborGroupInner> beginUpdate( + String resourceGroupName, String neighborGroupName, NeighborGroupPatch body) { + return this.beginUpdateAsync(resourceGroupName, neighborGroupName, body).getSyncPoller(); + } + + /** + * API to update certain properties of the Neighbor Group Resources. + * + *

Updates the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Neighbor Group properties to update. Only annotations are supported. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NeighborGroupInner> beginUpdate( + String resourceGroupName, String neighborGroupName, NeighborGroupPatch body, Context context) { + return this.beginUpdateAsync(resourceGroupName, neighborGroupName, body, context).getSyncPoller(); + } + + /** + * API to update certain properties of the Neighbor Group Resources. + * + *

Updates the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Neighbor Group properties to update. Only annotations are supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the Neighbor Group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String neighborGroupName, NeighborGroupPatch body) { + return beginUpdateAsync(resourceGroupName, neighborGroupName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * API to update certain properties of the Neighbor Group Resources. + * + *

Updates the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Neighbor Group properties to update. Only annotations are supported. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the Neighbor Group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String neighborGroupName, NeighborGroupPatch body, Context context) { + return beginUpdateAsync(resourceGroupName, neighborGroupName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * API to update certain properties of the Neighbor Group Resources. + * + *

Updates the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Neighbor Group properties to update. Only annotations are supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NeighborGroupInner update(String resourceGroupName, String neighborGroupName, NeighborGroupPatch body) { + return updateAsync(resourceGroupName, neighborGroupName, body).block(); + } + + /** + * API to update certain properties of the Neighbor Group Resources. + * + *

Updates the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param body Neighbor Group properties to update. Only annotations are supported. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return defines the Neighbor Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NeighborGroupInner update( + String resourceGroupName, String neighborGroupName, NeighborGroupPatch body, Context context) { + return updateAsync(resourceGroupName, neighborGroupName, body, context).block(); + } + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String neighborGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (neighborGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter neighborGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + neighborGroupName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String neighborGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (neighborGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter neighborGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + neighborGroupName, + accept, + context); + } + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String neighborGroupName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, neighborGroupName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String neighborGroupName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, neighborGroupName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String neighborGroupName) { + return this.beginDeleteAsync(resourceGroupName, neighborGroupName).getSyncPoller(); + } + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String neighborGroupName, Context context) { + return this.beginDeleteAsync(resourceGroupName, neighborGroupName, context).getSyncPoller(); + } + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String neighborGroupName) { + return beginDeleteAsync(resourceGroupName, neighborGroupName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String neighborGroupName, Context context) { + return beginDeleteAsync(resourceGroupName, neighborGroupName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String neighborGroupName) { + deleteAsync(resourceGroupName, neighborGroupName).block(); + } + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String neighborGroupName, Context context) { + deleteAsync(resourceGroupName, neighborGroupName, context).block(); + } + + /** + * List Neighbor Groups by resource group. + * + *

Displays NeighborGroups list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Neighbor Groups by resource group. + * + *

Displays NeighborGroups list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Neighbor Groups by resource group. + * + *

Displays NeighborGroups list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List Neighbor Groups by resource group. + * + *

Displays NeighborGroups list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List Neighbor Groups by resource group. + * + *

Displays NeighborGroups list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List Neighbor Groups by resource group. + * + *

Displays NeighborGroups list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * List Neighbor Groups by subscription. + * + *

Displays NeighborGroups list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Neighbor Groups by subscription. + * + *

Displays NeighborGroups list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Neighbor Groups by subscription. + * + *

Displays NeighborGroups list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List Neighbor Groups by subscription. + * + *

Displays NeighborGroups list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List Neighbor Groups by subscription. + * + *

Displays NeighborGroups list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List Neighbor Groups by subscription. + * + *

Displays NeighborGroups list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsImpl.java new file mode 100644 index 0000000000000..930ddbc0fcb4a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NeighborGroupsImpl.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.fluent.NeighborGroupsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroups; + +public final class NeighborGroupsImpl implements NeighborGroups { + private static final ClientLogger LOGGER = new ClientLogger(NeighborGroupsImpl.class); + + private final NeighborGroupsClient innerClient; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public NeighborGroupsImpl( + NeighborGroupsClient innerClient, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String neighborGroupName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, neighborGroupName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new NeighborGroupImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NeighborGroup getByResourceGroup(String resourceGroupName, String neighborGroupName) { + NeighborGroupInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, neighborGroupName); + if (inner != null) { + return new NeighborGroupImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String neighborGroupName) { + this.serviceClient().delete(resourceGroupName, neighborGroupName); + } + + public void delete(String resourceGroupName, String neighborGroupName, Context context) { + this.serviceClient().delete(resourceGroupName, neighborGroupName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new NeighborGroupImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new NeighborGroupImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new NeighborGroupImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new NeighborGroupImpl(inner1, this.manager())); + } + + public NeighborGroup getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String neighborGroupName = Utils.getValueFromIdByName(id, "neighborGroups"); + if (neighborGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'neighborGroups'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, neighborGroupName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String neighborGroupName = Utils.getValueFromIdByName(id, "neighborGroups"); + if (neighborGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'neighborGroups'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, neighborGroupName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String neighborGroupName = Utils.getValueFromIdByName(id, "neighborGroups"); + if (neighborGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'neighborGroups'.", id))); + } + this.delete(resourceGroupName, neighborGroupName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String neighborGroupName = Utils.getValueFromIdByName(id, "neighborGroups"); + if (neighborGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'neighborGroups'.", id))); + } + this.delete(resourceGroupName, neighborGroupName, context); + } + + private NeighborGroupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + public NeighborGroupImpl define(String name) { + return new NeighborGroupImpl(name, this.manager()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceImpl.java index 047492ac65867..8f3bdf388a517 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceImpl.java @@ -8,18 +8,17 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; -import com.azure.resourcemanager.managednetworkfabric.models.GetDeviceStatusProperties; -import com.azure.resourcemanager.managednetworkfabric.models.GetDynamicInterfaceMapsPropertiesItem; -import com.azure.resourcemanager.managednetworkfabric.models.GetStaticInterfaceMapsPropertiesItem; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParameters; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleTypes; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRole; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.SupportPackageProperties; -import com.azure.resourcemanager.managednetworkfabric.models.UpdatePowerCycleProperties; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RebootProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; import java.util.Collections; -import java.util.List; import java.util.Map; public final class NetworkDeviceImpl implements NetworkDevice, NetworkDevice.Definition, NetworkDevice.Update { @@ -64,16 +63,32 @@ public String networkDeviceSku() { return this.innerModel().networkDeviceSku(); } - public NetworkDeviceRoleTypes networkDeviceRole() { + public NetworkDeviceRole networkDeviceRole() { return this.innerModel().networkDeviceRole(); } + public String networkRackId() { + return this.innerModel().networkRackId(); + } + + public String managementIpv4Address() { + return this.innerModel().managementIpv4Address(); + } + + public String managementIpv6Address() { + return this.innerModel().managementIpv6Address(); + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } - public String networkRackId() { - return this.innerModel().networkRackId(); + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); } public String hostname() { @@ -196,68 +211,39 @@ public NetworkDevice refresh(Context context) { return this; } - public void reboot() { - serviceManager.networkDevices().reboot(resourceGroupName, networkDeviceName); - } - - public void reboot(Context context) { - serviceManager.networkDevices().reboot(resourceGroupName, networkDeviceName, context); - } - - public void restoreConfig() { - serviceManager.networkDevices().restoreConfig(resourceGroupName, networkDeviceName); + public CommonPostActionResponseForStateUpdate reboot(RebootProperties body) { + return serviceManager.networkDevices().reboot(resourceGroupName, networkDeviceName, body); } - public void restoreConfig(Context context) { - serviceManager.networkDevices().restoreConfig(resourceGroupName, networkDeviceName, context); + public CommonPostActionResponseForStateUpdate reboot(RebootProperties body, Context context) { + return serviceManager.networkDevices().reboot(resourceGroupName, networkDeviceName, body, context); } - public void updateVersion(UpdateVersionProperties body) { - serviceManager.networkDevices().updateVersion(resourceGroupName, networkDeviceName, body); + public CommonPostActionResponseForStateUpdate refreshConfiguration() { + return serviceManager.networkDevices().refreshConfiguration(resourceGroupName, networkDeviceName); } - public void updateVersion(UpdateVersionProperties body, Context context) { - serviceManager.networkDevices().updateVersion(resourceGroupName, networkDeviceName, body, context); + public CommonPostActionResponseForStateUpdate refreshConfiguration(Context context) { + return serviceManager.networkDevices().refreshConfiguration(resourceGroupName, networkDeviceName, context); } - public SupportPackageProperties generateSupportPackage() { - return serviceManager.networkDevices().generateSupportPackage(resourceGroupName, networkDeviceName); + public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateDeviceAdministrativeState body) { + return serviceManager.networkDevices().updateAdministrativeState(resourceGroupName, networkDeviceName, body); } - public SupportPackageProperties generateSupportPackage(Context context) { - return serviceManager.networkDevices().generateSupportPackage(resourceGroupName, networkDeviceName, context); + public CommonPostActionResponseForStateUpdate updateAdministrativeState( + UpdateDeviceAdministrativeState body, Context context) { + return serviceManager + .networkDevices() + .updateAdministrativeState(resourceGroupName, networkDeviceName, body, context); } - public void updatePowerCycle(UpdatePowerCycleProperties body) { - serviceManager.networkDevices().updatePowerCycle(resourceGroupName, networkDeviceName, body); + public CommonPostActionResponseForStateUpdate upgrade(UpdateVersion body) { + return serviceManager.networkDevices().upgrade(resourceGroupName, networkDeviceName, body); } - public void updatePowerCycle(UpdatePowerCycleProperties body, Context context) { - serviceManager.networkDevices().updatePowerCycle(resourceGroupName, networkDeviceName, body, context); - } - - public GetDeviceStatusProperties getStatus() { - return serviceManager.networkDevices().getStatus(resourceGroupName, networkDeviceName); - } - - public GetDeviceStatusProperties getStatus(Context context) { - return serviceManager.networkDevices().getStatus(resourceGroupName, networkDeviceName, context); - } - - public List getStaticInterfaceMaps() { - return serviceManager.networkDevices().getStaticInterfaceMaps(resourceGroupName, networkDeviceName); - } - - public List getStaticInterfaceMaps(Context context) { - return serviceManager.networkDevices().getStaticInterfaceMaps(resourceGroupName, networkDeviceName, context); - } - - public List getDynamicInterfaceMaps() { - return serviceManager.networkDevices().getDynamicInterfaceMaps(resourceGroupName, networkDeviceName); - } - - public List getDynamicInterfaceMaps(Context context) { - return serviceManager.networkDevices().getDynamicInterfaceMaps(resourceGroupName, networkDeviceName, context); + public CommonPostActionResponseForStateUpdate upgrade(UpdateVersion body, Context context) { + return serviceManager.networkDevices().upgrade(resourceGroupName, networkDeviceName, body, context); } public NetworkDeviceImpl withRegion(Region location) { @@ -285,11 +271,6 @@ public NetworkDeviceImpl withNetworkDeviceSku(String networkDeviceSku) { return this; } - public NetworkDeviceImpl withNetworkDeviceRole(NetworkDeviceRoleTypes networkDeviceRole) { - this.innerModel().withNetworkDeviceRole(networkDeviceRole); - return this; - } - public NetworkDeviceImpl withHostname(String hostname) { if (isInCreateMode()) { this.innerModel().withHostname(hostname); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkuImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkuImpl.java index e0f295f8aa978..8b5180c4ea0ab 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkuImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkuImpl.java @@ -7,7 +7,6 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuInner; import com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceLimits; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSku; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; @@ -60,10 +59,6 @@ public List supportedVersions() { } } - public DeviceLimits limits() { - return this.innerModel().limits(); - } - public List supportedRoleTypes() { List inner = this.innerModel().supportedRoleTypes(); if (inner != null) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusClientImpl.java index e0de1f54158d5..9f694f6867c2b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDeviceSkusClientImpl.java @@ -94,13 +94,13 @@ Mono> listBySubscriptionNext( /** * Gets a Network Device Sku. * - *

Get Network Device SKU details. + *

Get a Network Device SKU details. * - * @param networkDeviceSkuName Name of the Network Device Sku. + * @param networkDeviceSkuName Name of the Network Device SKU. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Device SKU details along with {@link Response} on successful completion of {@link Mono}. + * @return a Network Device SKU details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String networkDeviceSkuName) { @@ -138,14 +138,14 @@ private Mono> getWithResponseAsync(String networ /** * Gets a Network Device Sku. * - *

Get Network Device SKU details. + *

Get a Network Device SKU details. * - * @param networkDeviceSkuName Name of the Network Device Sku. + * @param networkDeviceSkuName Name of the Network Device SKU. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Device SKU details along with {@link Response} on successful completion of {@link Mono}. + * @return a Network Device SKU details along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String networkDeviceSkuName, Context context) { @@ -180,13 +180,13 @@ private Mono> getWithResponseAsync(String networ /** * Gets a Network Device Sku. * - *

Get Network Device SKU details. + *

Get a Network Device SKU details. * - * @param networkDeviceSkuName Name of the Network Device Sku. + * @param networkDeviceSkuName Name of the Network Device SKU. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Device SKU details on successful completion of {@link Mono}. + * @return a Network Device SKU details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String networkDeviceSkuName) { @@ -196,14 +196,14 @@ private Mono getAsync(String networkDeviceSkuName) { /** * Gets a Network Device Sku. * - *

Get Network Device SKU details. + *

Get a Network Device SKU details. * - * @param networkDeviceSkuName Name of the Network Device Sku. + * @param networkDeviceSkuName Name of the Network Device SKU. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Device SKU details along with {@link Response}. + * @return a Network Device SKU details along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String networkDeviceSkuName, Context context) { @@ -213,13 +213,13 @@ public Response getWithResponse(String networkDeviceSkuNa /** * Gets a Network Device Sku. * - *

Get Network Device SKU details. + *

Get a Network Device SKU details. * - * @param networkDeviceSkuName Name of the Network Device Sku. + * @param networkDeviceSkuName Name of the Network Device SKU. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Device SKU details. + * @return a Network Device SKU details. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkDeviceSkuInner get(String networkDeviceSkuName) { @@ -227,13 +227,13 @@ public NetworkDeviceSkuInner get(String networkDeviceSkuName) { } /** - * List NetworkDeviceSkus by subscription. + * List Network Device SKUs by subscription. * *

List Network Device SKUs for the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDeviceSkus along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Device SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -273,7 +273,7 @@ private Mono> listSinglePageAsync() { } /** - * List NetworkDeviceSkus by subscription. + * List Network Device SKUs by subscription. * *

List Network Device SKUs for the given subscription. * @@ -281,7 +281,7 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDeviceSkus along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Device SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -318,13 +318,13 @@ private Mono> listSinglePageAsync(Context c } /** - * List NetworkDeviceSkus by subscription. + * List Network Device SKUs by subscription. * *

List Network Device SKUs for the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDeviceSkus as paginated response with {@link PagedFlux}. + * @return list of Network Device SKUs as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -333,7 +333,7 @@ private PagedFlux listAsync() { } /** - * List NetworkDeviceSkus by subscription. + * List Network Device SKUs by subscription. * *

List Network Device SKUs for the given subscription. * @@ -341,7 +341,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDeviceSkus as paginated response with {@link PagedFlux}. + * @return list of Network Device SKUs as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -350,13 +350,13 @@ private PagedFlux listAsync(Context context) { } /** - * List NetworkDeviceSkus by subscription. + * List Network Device SKUs by subscription. * *

List Network Device SKUs for the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDeviceSkus as paginated response with {@link PagedIterable}. + * @return list of Network Device SKUs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -364,7 +364,7 @@ public PagedIterable list() { } /** - * List NetworkDeviceSkus by subscription. + * List Network Device SKUs by subscription. * *

List Network Device SKUs for the given subscription. * @@ -372,7 +372,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDeviceSkus as paginated response with {@link PagedIterable}. + * @return list of Network Device SKUs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -387,7 +387,7 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDeviceSkus along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Device SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -425,7 +425,7 @@ private Mono> listBySubscriptionNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDeviceSkus along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Device SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesClientImpl.java index 1ef65d4f40708..ef4528c81fc8a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesClientImpl.java @@ -34,18 +34,14 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetDeviceStatusPropertiesInner; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetDynamicInterfaceMapsPropertiesItemInner; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetStaticInterfaceMapsPropertiesItemInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.SupportPackagePropertiesInner; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParameters; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicesListResult; -import com.azure.resourcemanager.managednetworkfabric.models.UpdatePowerCycleProperties; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersionProperties; -import com.fasterxml.jackson.core.type.TypeReference; +import com.azure.resourcemanager.managednetworkfabric.models.RebootProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; import java.nio.ByteBuffer; -import java.util.List; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -122,7 +118,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}") - @ExpectedResponses({200, 202, 204}) + @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @HostParam("$host") String endpoint, @@ -160,7 +156,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/reboot") - @ExpectedResponses({202}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> reboot( @HostParam("$host") String endpoint, @@ -168,73 +164,16 @@ Mono>> reboot( @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @PathParam("networkDeviceName") String networkDeviceName, + @BodyParam("application/json") RebootProperties body, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/restoreConfig") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restoreConfig( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("networkDeviceName") String networkDeviceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateVersion") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateVersion( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("networkDeviceName") String networkDeviceName, - @BodyParam("application/json") UpdateVersionProperties body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/generateSupportPackage") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> generateSupportPackage( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("networkDeviceName") String networkDeviceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updatePowerCycle") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updatePowerCycle( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("networkDeviceName") String networkDeviceName, - @BodyParam("application/json") UpdatePowerCycleProperties body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/getStatus") - @ExpectedResponses({202}) + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/refreshConfiguration") + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> getStatus( + Mono>> refreshConfiguration( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -245,29 +184,31 @@ Mono>> getStatus( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/getStaticInterfaceMaps") - @ExpectedResponses({202}) + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateAdministrativeState") + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> getStaticInterfaceMaps( + Mono>> updateAdministrativeState( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @PathParam("networkDeviceName") String networkDeviceName, + @BodyParam("application/json") UpdateDeviceAdministrativeState body, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/getDynamicInterfaceMaps") - @ExpectedResponses({202}) + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/upgrade") + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> getDynamicInterfaceMaps( + Mono>> upgrade( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @PathParam("networkDeviceName") String networkDeviceName, + @BodyParam("application/json") UpdateVersion body, @HeaderParam("Accept") String accept, Context context); @@ -303,7 +244,7 @@ Mono> listBySubscriptionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkDevice resource definition along with {@link Response} on successful completion of {@link + * @return the Network Device resource definition along with {@link Response} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -363,7 +304,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkDevice resource definition along with {@link Response} on successful completion of {@link + * @return the Network Device resource definition along with {@link Response} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -419,7 +360,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkDevice resource definition. + * @return the {@link PollerFlux} for polling of the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkDeviceInner> beginCreateAsync( @@ -447,7 +388,7 @@ private PollerFlux, NetworkDeviceInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkDevice resource definition. + * @return the {@link PollerFlux} for polling of the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkDeviceInner> beginCreateAsync( @@ -472,7 +413,7 @@ private PollerFlux, NetworkDeviceInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkDevice resource definition. + * @return the {@link SyncPoller} for polling of the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkDeviceInner> beginCreate( @@ -492,7 +433,7 @@ public SyncPoller, NetworkDeviceInner> beginCreat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkDevice resource definition. + * @return the {@link SyncPoller} for polling of the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkDeviceInner> beginCreate( @@ -511,7 +452,7 @@ public SyncPoller, NetworkDeviceInner> beginCreat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkDevice resource definition on successful completion of {@link Mono}. + * @return the Network Device resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -533,7 +474,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkDevice resource definition on successful completion of {@link Mono}. + * @return the Network Device resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -554,7 +495,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkDevice resource definition. + * @return the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkDeviceInner create(String resourceGroupName, String networkDeviceName, NetworkDeviceInner body) { @@ -573,7 +514,7 @@ public NetworkDeviceInner create(String resourceGroupName, String networkDeviceN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkDevice resource definition. + * @return the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkDeviceInner create( @@ -584,7 +525,7 @@ public NetworkDeviceInner create( /** * Gets a Network Device. * - *

Get the Network Device resource details. + *

Gets the Network Device resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. @@ -635,7 +576,7 @@ private Mono> getByResourceGroupWithResponseAsync( /** * Gets a Network Device. * - *

Get the Network Device resource details. + *

Gets the Network Device resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. @@ -684,7 +625,7 @@ private Mono> getByResourceGroupWithResponseAsync( /** * Gets a Network Device. * - *

Get the Network Device resource details. + *

Gets the Network Device resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. @@ -702,7 +643,7 @@ private Mono getByResourceGroupAsync(String resourceGroupNam /** * Gets a Network Device. * - *

Get the Network Device resource details. + *

Gets the Network Device resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. @@ -721,7 +662,7 @@ public Response getByResourceGroupWithResponse( /** * Gets a Network Device. * - *

Get the Network Device resource details. + *

Gets the Network Device resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. @@ -746,7 +687,7 @@ public NetworkDeviceInner getByResourceGroup(String resourceGroupName, String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkDevice resource definition along with {@link Response} on successful completion of {@link + * @return the Network Device resource definition along with {@link Response} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -806,7 +747,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkDevice resource definition along with {@link Response} on successful completion of {@link + * @return the Network Device resource definition along with {@link Response} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -862,7 +803,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkDevice resource definition. + * @return the {@link PollerFlux} for polling of the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkDeviceInner> beginUpdateAsync( @@ -890,7 +831,7 @@ private PollerFlux, NetworkDeviceInner> beginUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkDevice resource definition. + * @return the {@link PollerFlux} for polling of the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkDeviceInner> beginUpdateAsync( @@ -915,7 +856,7 @@ private PollerFlux, NetworkDeviceInner> beginUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkDevice resource definition. + * @return the {@link SyncPoller} for polling of the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkDeviceInner> beginUpdate( @@ -935,7 +876,7 @@ public SyncPoller, NetworkDeviceInner> beginUpdat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkDevice resource definition. + * @return the {@link SyncPoller} for polling of the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkDeviceInner> beginUpdate( @@ -954,7 +895,7 @@ public SyncPoller, NetworkDeviceInner> beginUpdat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkDevice resource definition on successful completion of {@link Mono}. + * @return the Network Device resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -976,7 +917,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkDevice resource definition on successful completion of {@link Mono}. + * @return the Network Device resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -997,7 +938,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkDevice resource definition. + * @return the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkDeviceInner update( @@ -1017,7 +958,7 @@ public NetworkDeviceInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkDevice resource definition. + * @return the Network Device resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkDeviceInner update( @@ -1611,15 +1552,17 @@ public PagedIterable list(Context context) { *

Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> rebootWithResponseAsync( - String resourceGroupName, String networkDeviceName) { + String resourceGroupName, String networkDeviceName, RebootProperties body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1640,6 +1583,11 @@ private Mono>> rebootWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } final String accept = "application/json"; return FluxUtil .withContext( @@ -1651,6 +1599,7 @@ private Mono>> rebootWithResponseAsync( resourceGroupName, this.client.getApiVersion(), networkDeviceName, + body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1662,16 +1611,18 @@ private Mono>> rebootWithResponseAsync( *

Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> rebootWithResponseAsync( - String resourceGroupName, String networkDeviceName, Context context) { + String resourceGroupName, String networkDeviceName, RebootProperties body, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1692,6 +1643,11 @@ private Mono>> rebootWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1701,6 +1657,7 @@ private Mono>> rebootWithResponseAsync( resourceGroupName, this.client.getApiVersion(), networkDeviceName, + body, accept, context); } @@ -1711,19 +1668,26 @@ private Mono>> rebootWithResponseAsync( *

Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRebootAsync(String resourceGroupName, String networkDeviceName) { - Mono>> mono = rebootWithResponseAsync(resourceGroupName, networkDeviceName); + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginRebootAsync(String resourceGroupName, String networkDeviceName, RebootProperties body) { + Mono>> mono = rebootWithResponseAsync(resourceGroupName, networkDeviceName, body); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); } /** @@ -1732,21 +1696,29 @@ private PollerFlux, Void> beginRebootAsync(String resourceGroup *

Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRebootAsync( - String resourceGroupName, String networkDeviceName, Context context) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginRebootAsync(String resourceGroupName, String networkDeviceName, RebootProperties body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = rebootWithResponseAsync(resourceGroupName, networkDeviceName, context); + Mono>> mono = + rebootWithResponseAsync(resourceGroupName, networkDeviceName, body, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); } /** @@ -1755,15 +1727,18 @@ private PollerFlux, Void> beginRebootAsync( *

Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginReboot(String resourceGroupName, String networkDeviceName) { - return this.beginRebootAsync(resourceGroupName, networkDeviceName).getSyncPoller(); + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginReboot(String resourceGroupName, String networkDeviceName, RebootProperties body) { + return this.beginRebootAsync(resourceGroupName, networkDeviceName, body).getSyncPoller(); } /** @@ -1772,17 +1747,19 @@ public SyncPoller, Void> beginReboot(String resourceGroupName, *

Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginReboot( - String resourceGroupName, String networkDeviceName, Context context) { - return this.beginRebootAsync(resourceGroupName, networkDeviceName, context).getSyncPoller(); + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginReboot(String resourceGroupName, String networkDeviceName, RebootProperties body, Context context) { + return this.beginRebootAsync(resourceGroupName, networkDeviceName, body, context).getSyncPoller(); } /** @@ -1791,15 +1768,17 @@ public SyncPoller, Void> beginReboot( *

Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono rebootAsync(String resourceGroupName, String networkDeviceName) { - return beginRebootAsync(resourceGroupName, networkDeviceName) + private Mono rebootAsync( + String resourceGroupName, String networkDeviceName, RebootProperties body) { + return beginRebootAsync(resourceGroupName, networkDeviceName, body) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1810,16 +1789,18 @@ private Mono rebootAsync(String resourceGroupName, String networkDeviceNam *

Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono rebootAsync(String resourceGroupName, String networkDeviceName, Context context) { - return beginRebootAsync(resourceGroupName, networkDeviceName, context) + private Mono rebootAsync( + String resourceGroupName, String networkDeviceName, RebootProperties body, Context context) { + return beginRebootAsync(resourceGroupName, networkDeviceName, body, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1830,14 +1811,17 @@ private Mono rebootAsync(String resourceGroupName, String networkDeviceNam *

Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void reboot(String resourceGroupName, String networkDeviceName) { - rebootAsync(resourceGroupName, networkDeviceName).block(); + public CommonPostActionResponseForStateUpdateInner reboot( + String resourceGroupName, String networkDeviceName, RebootProperties body) { + return rebootAsync(resourceGroupName, networkDeviceName, body).block(); } /** @@ -1846,31 +1830,35 @@ public void reboot(String resourceGroupName, String networkDeviceName) { *

Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void reboot(String resourceGroupName, String networkDeviceName, Context context) { - rebootAsync(resourceGroupName, networkDeviceName, context).block(); + public CommonPostActionResponseForStateUpdateInner reboot( + String resourceGroupName, String networkDeviceName, RebootProperties body, Context context) { + return rebootAsync(resourceGroupName, networkDeviceName, body, context).block(); } /** - * Restores the configuration to last applied good configuration from Azure. + * Implements the operation to the underlying resources. * - *

Restore the configuration of the Network Device resource to last known good configuration. + *

Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restoreConfigWithResponseAsync( + private Mono>> refreshConfigurationWithResponseAsync( String resourceGroupName, String networkDeviceName) { if (this.client.getEndpoint() == null) { return Mono @@ -1897,7 +1885,7 @@ private Mono>> restoreConfigWithResponseAsync( .withContext( context -> service - .restoreConfig( + .refreshConfiguration( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1909,20 +1897,21 @@ private Mono>> restoreConfigWithResponseAsync( } /** - * Restores the configuration to last applied good configuration from Azure. + * Implements the operation to the underlying resources. * - *

Restore the configuration of the Network Device resource to last known good configuration. + *

Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restoreConfigWithResponseAsync( + private Mono>> refreshConfigurationWithResponseAsync( String resourceGroupName, String networkDeviceName, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1947,7 +1936,7 @@ private Mono>> restoreConfigWithResponseAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .restoreConfig( + .refreshConfiguration( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1958,175 +1947,197 @@ private Mono>> restoreConfigWithResponseAsync( } /** - * Restores the configuration to last applied good configuration from Azure. + * Implements the operation to the underlying resources. * - *

Restore the configuration of the Network Device resource to last known good configuration. + *

Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestoreConfigAsync( - String resourceGroupName, String networkDeviceName) { - Mono>> mono = restoreConfigWithResponseAsync(resourceGroupName, networkDeviceName); + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginRefreshConfigurationAsync(String resourceGroupName, String networkDeviceName) { + Mono>> mono = + refreshConfigurationWithResponseAsync(resourceGroupName, networkDeviceName); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); } /** - * Restores the configuration to last applied good configuration from Azure. + * Implements the operation to the underlying resources. * - *

Restore the configuration of the Network Device resource to last known good configuration. + *

Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestoreConfigAsync( - String resourceGroupName, String networkDeviceName, Context context) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginRefreshConfigurationAsync(String resourceGroupName, String networkDeviceName, Context context) { context = this.client.mergeContext(context); Mono>> mono = - restoreConfigWithResponseAsync(resourceGroupName, networkDeviceName, context); + refreshConfigurationWithResponseAsync(resourceGroupName, networkDeviceName, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); } /** - * Restores the configuration to last applied good configuration from Azure. + * Implements the operation to the underlying resources. * - *

Restore the configuration of the Network Device resource to last known good configuration. + *

Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestoreConfig(String resourceGroupName, String networkDeviceName) { - return this.beginRestoreConfigAsync(resourceGroupName, networkDeviceName).getSyncPoller(); + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginRefreshConfiguration(String resourceGroupName, String networkDeviceName) { + return this.beginRefreshConfigurationAsync(resourceGroupName, networkDeviceName).getSyncPoller(); } /** - * Restores the configuration to last applied good configuration from Azure. + * Implements the operation to the underlying resources. * - *

Restore the configuration of the Network Device resource to last known good configuration. + *

Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestoreConfig( - String resourceGroupName, String networkDeviceName, Context context) { - return this.beginRestoreConfigAsync(resourceGroupName, networkDeviceName, context).getSyncPoller(); + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginRefreshConfiguration(String resourceGroupName, String networkDeviceName, Context context) { + return this.beginRefreshConfigurationAsync(resourceGroupName, networkDeviceName, context).getSyncPoller(); } /** - * Restores the configuration to last applied good configuration from Azure. + * Implements the operation to the underlying resources. * - *

Restore the configuration of the Network Device resource to last known good configuration. + *

Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restoreConfigAsync(String resourceGroupName, String networkDeviceName) { - return beginRestoreConfigAsync(resourceGroupName, networkDeviceName) + private Mono refreshConfigurationAsync( + String resourceGroupName, String networkDeviceName) { + return beginRefreshConfigurationAsync(resourceGroupName, networkDeviceName) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Restores the configuration to last applied good configuration from Azure. + * Implements the operation to the underlying resources. * - *

Restore the configuration of the Network Device resource to last known good configuration. + *

Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restoreConfigAsync(String resourceGroupName, String networkDeviceName, Context context) { - return beginRestoreConfigAsync(resourceGroupName, networkDeviceName, context) + private Mono refreshConfigurationAsync( + String resourceGroupName, String networkDeviceName, Context context) { + return beginRefreshConfigurationAsync(resourceGroupName, networkDeviceName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Restores the configuration to last applied good configuration from Azure. + * Implements the operation to the underlying resources. * - *

Restore the configuration of the Network Device resource to last known good configuration. + *

Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void restoreConfig(String resourceGroupName, String networkDeviceName) { - restoreConfigAsync(resourceGroupName, networkDeviceName).block(); + public CommonPostActionResponseForStateUpdateInner refreshConfiguration( + String resourceGroupName, String networkDeviceName) { + return refreshConfigurationAsync(resourceGroupName, networkDeviceName).block(); } /** - * Restores the configuration to last applied good configuration from Azure. + * Implements the operation to the underlying resources. * - *

Restore the configuration of the Network Device resource to last known good configuration. + *

Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void restoreConfig(String resourceGroupName, String networkDeviceName, Context context) { - restoreConfigAsync(resourceGroupName, networkDeviceName, context).block(); + public CommonPostActionResponseForStateUpdateInner refreshConfiguration( + String resourceGroupName, String networkDeviceName, Context context) { + return refreshConfigurationAsync(resourceGroupName, networkDeviceName, context).block(); } /** - * Implements SKU version upgrade of network device. + * Implements the operation to the underlying resources. * - *

Update the SKU version of the Network Device resource. + *

Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateVersionWithResponseAsync( - String resourceGroupName, String networkDeviceName, UpdateVersionProperties body) { + private Mono>> updateAdministrativeStateWithResponseAsync( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -2157,7 +2168,7 @@ private Mono>> updateVersionWithResponseAsync( .withContext( context -> service - .updateVersion( + .updateAdministrativeState( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -2170,22 +2181,23 @@ private Mono>> updateVersionWithResponseAsync( } /** - * Implements SKU version upgrade of network device. + * Implements the operation to the underlying resources. * - *

Update the SKU version of the Network Device resource. + *

Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateVersionWithResponseAsync( - String resourceGroupName, String networkDeviceName, UpdateVersionProperties body, Context context) { + private Mono>> updateAdministrativeStateWithResponseAsync( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -2214,7 +2226,7 @@ private Mono>> updateVersionWithResponseAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .updateVersion( + .updateAdministrativeState( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -2226,188 +2238,211 @@ private Mono>> updateVersionWithResponseAsync( } /** - * Implements SKU version upgrade of network device. + * Implements the operation to the underlying resources. * - *

Update the SKU version of the Network Device resource. + *

Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateVersionAsync( - String resourceGroupName, String networkDeviceName, UpdateVersionProperties body) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body) { Mono>> mono = - updateVersionWithResponseAsync(resourceGroupName, networkDeviceName, body); + updateAdministrativeStateWithResponseAsync(resourceGroupName, networkDeviceName, body); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); } /** - * Implements SKU version upgrade of network device. + * Implements the operation to the underlying resources. * - *

Update the SKU version of the Network Device resource. + *

Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateVersionAsync( - String resourceGroupName, String networkDeviceName, UpdateVersionProperties body, Context context) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body, Context context) { context = this.client.mergeContext(context); Mono>> mono = - updateVersionWithResponseAsync(resourceGroupName, networkDeviceName, body, context); + updateAdministrativeStateWithResponseAsync(resourceGroupName, networkDeviceName, body, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); } /** - * Implements SKU version upgrade of network device. + * Implements the operation to the underlying resources. * - *

Update the SKU version of the Network Device resource. + *

Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateVersion( - String resourceGroupName, String networkDeviceName, UpdateVersionProperties body) { - return this.beginUpdateVersionAsync(resourceGroupName, networkDeviceName, body).getSyncPoller(); + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body) { + return this.beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body).getSyncPoller(); } /** - * Implements SKU version upgrade of network device. + * Implements the operation to the underlying resources. * - *

Update the SKU version of the Network Device resource. + *

Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateVersion( - String resourceGroupName, String networkDeviceName, UpdateVersionProperties body, Context context) { - return this.beginUpdateVersionAsync(resourceGroupName, networkDeviceName, body, context).getSyncPoller(); + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body, Context context) { + return this + .beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body, context) + .getSyncPoller(); } /** - * Implements SKU version upgrade of network device. + * Implements the operation to the underlying resources. * - *

Update the SKU version of the Network Device resource. + *

Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateVersionAsync( - String resourceGroupName, String networkDeviceName, UpdateVersionProperties body) { - return beginUpdateVersionAsync(resourceGroupName, networkDeviceName, body) + private Mono updateAdministrativeStateAsync( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements SKU version upgrade of network device. + * Implements the operation to the underlying resources. * - *

Update the SKU version of the Network Device resource. + *

Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateVersionAsync( - String resourceGroupName, String networkDeviceName, UpdateVersionProperties body, Context context) { - return beginUpdateVersionAsync(resourceGroupName, networkDeviceName, body, context) + private Mono updateAdministrativeStateAsync( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body, Context context) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body, context) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Implements SKU version upgrade of network device. + * Implements the operation to the underlying resources. * - *

Update the SKU version of the Network Device resource. + *

Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateVersion(String resourceGroupName, String networkDeviceName, UpdateVersionProperties body) { - updateVersionAsync(resourceGroupName, networkDeviceName, body).block(); + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body) { + return updateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body).block(); } /** - * Implements SKU version upgrade of network device. + * Implements the operation to the underlying resources. * - *

Update the SKU version of the Network Device resource. + *

Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateVersion( - String resourceGroupName, String networkDeviceName, UpdateVersionProperties body, Context context) { - updateVersionAsync(resourceGroupName, networkDeviceName, body, context).block(); + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body, Context context) { + return updateAdministrativeStateAsync(resourceGroupName, networkDeviceName, body, context).block(); } /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return generate support package post action properties along with {@link Response} on successful completion of - * {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> generateSupportPackageWithResponseAsync( - String resourceGroupName, String networkDeviceName) { + private Mono>> upgradeWithResponseAsync( + String resourceGroupName, String networkDeviceName, UpdateVersion body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -2428,17 +2463,23 @@ private Mono>> generateSupportPackageWithResponseAsync return Mono .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .generateSupportPackage( + .upgrade( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), networkDeviceName, + body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -2447,20 +2488,21 @@ private Mono>> generateSupportPackageWithResponseAsync /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return generate support package post action properties along with {@link Response} on successful completion of - * {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> generateSupportPackageWithResponseAsync( - String resourceGroupName, String networkDeviceName, Context context) { + private Mono>> upgradeWithResponseAsync( + String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -2481,15 +2523,21 @@ private Mono>> generateSupportPackageWithResponseAsync return Mono .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .generateSupportPackage( + .upgrade( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), networkDeviceName, + body, accept, context); } @@ -2497,112 +2545,120 @@ private Mono>> generateSupportPackageWithResponseAsync /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of generate support package post action properties. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SupportPackagePropertiesInner> - beginGenerateSupportPackageAsync(String resourceGroupName, String networkDeviceName) { - Mono>> mono = - generateSupportPackageWithResponseAsync(resourceGroupName, networkDeviceName); + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpgradeAsync(String resourceGroupName, String networkDeviceName, UpdateVersion body) { + Mono>> mono = upgradeWithResponseAsync(resourceGroupName, networkDeviceName, body); return this .client - .getLroResult( + .getLroResult( mono, this.client.getHttpPipeline(), - SupportPackagePropertiesInner.class, - SupportPackagePropertiesInner.class, + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, this.client.getContext()); } /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of generate support package post action properties. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SupportPackagePropertiesInner> - beginGenerateSupportPackageAsync(String resourceGroupName, String networkDeviceName, Context context) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpgradeAsync(String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context) { context = this.client.mergeContext(context); Mono>> mono = - generateSupportPackageWithResponseAsync(resourceGroupName, networkDeviceName, context); + upgradeWithResponseAsync(resourceGroupName, networkDeviceName, body, context); return this .client - .getLroResult( + .getLroResult( mono, this.client.getHttpPipeline(), - SupportPackagePropertiesInner.class, - SupportPackagePropertiesInner.class, + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, context); } /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of generate support package post action properties. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SupportPackagePropertiesInner> - beginGenerateSupportPackage(String resourceGroupName, String networkDeviceName) { - return this.beginGenerateSupportPackageAsync(resourceGroupName, networkDeviceName).getSyncPoller(); + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body) { + return this.beginUpgradeAsync(resourceGroupName, networkDeviceName, body).getSyncPoller(); } /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of generate support package post action properties. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SupportPackagePropertiesInner> - beginGenerateSupportPackage(String resourceGroupName, String networkDeviceName, Context context) { - return this.beginGenerateSupportPackageAsync(resourceGroupName, networkDeviceName, context).getSyncPoller(); + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpgrade(String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context) { + return this.beginUpgradeAsync(resourceGroupName, networkDeviceName, body, context).getSyncPoller(); } /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return generate support package post action properties on successful completion of {@link Mono}. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateSupportPackageAsync( - String resourceGroupName, String networkDeviceName) { - return beginGenerateSupportPackageAsync(resourceGroupName, networkDeviceName) + private Mono upgradeAsync( + String resourceGroupName, String networkDeviceName, UpdateVersion body) { + return beginUpgradeAsync(resourceGroupName, networkDeviceName, body) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2610,20 +2666,21 @@ private Mono generateSupportPackageAsync( /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return generate support package post action properties on successful completion of {@link Mono}. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateSupportPackageAsync( - String resourceGroupName, String networkDeviceName, Context context) { - return beginGenerateSupportPackageAsync(resourceGroupName, networkDeviceName, context) + private Mono upgradeAsync( + String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context) { + return beginUpgradeAsync(resourceGroupName, networkDeviceName, body, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2631,1162 +2688,40 @@ private Mono generateSupportPackageAsync( /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return generate support package post action properties. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SupportPackagePropertiesInner generateSupportPackage(String resourceGroupName, String networkDeviceName) { - return generateSupportPackageAsync(resourceGroupName, networkDeviceName).block(); + public CommonPostActionResponseForStateUpdateInner upgrade( + String resourceGroupName, String networkDeviceName, UpdateVersion body) { + return upgradeAsync(resourceGroupName, networkDeviceName, body).block(); } /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return generate support package post action properties. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SupportPackagePropertiesInner generateSupportPackage( - String resourceGroupName, String networkDeviceName, Context context) { - return generateSupportPackageAsync(resourceGroupName, networkDeviceName, context).block(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Update PDU power cycle of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updatePowerCycleWithResponseAsync( - String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .updatePowerCycle( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - networkDeviceName, - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Implements the operation to the underlying resources. - * - *

Update PDU power cycle of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updatePowerCycleWithResponseAsync( - String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .updatePowerCycle( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - networkDeviceName, - body, - accept, - context); - } - - /** - * Implements the operation to the underlying resources. - * - *

Update PDU power cycle of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdatePowerCycleAsync( - String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body) { - Mono>> mono = - updatePowerCycleWithResponseAsync(resourceGroupName, networkDeviceName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Implements the operation to the underlying resources. - * - *

Update PDU power cycle of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdatePowerCycleAsync( - String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updatePowerCycleWithResponseAsync(resourceGroupName, networkDeviceName, body, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Implements the operation to the underlying resources. - * - *

Update PDU power cycle of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdatePowerCycle( - String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body) { - return this.beginUpdatePowerCycleAsync(resourceGroupName, networkDeviceName, body).getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Update PDU power cycle of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdatePowerCycle( - String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body, Context context) { - return this.beginUpdatePowerCycleAsync(resourceGroupName, networkDeviceName, body, context).getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Update PDU power cycle of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updatePowerCycleAsync( - String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body) { - return beginUpdatePowerCycleAsync(resourceGroupName, networkDeviceName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - *

Update PDU power cycle of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updatePowerCycleAsync( - String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body, Context context) { - return beginUpdatePowerCycleAsync(resourceGroupName, networkDeviceName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - *

Update PDU power cycle of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void updatePowerCycle(String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body) { - updatePowerCycleAsync(resourceGroupName, networkDeviceName, body).block(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Update PDU power cycle of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void updatePowerCycle( - String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body, Context context) { - updatePowerCycleAsync(resourceGroupName, networkDeviceName, body, context).block(); - } - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Device along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getStatusWithResponseAsync( - String resourceGroupName, String networkDeviceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getStatus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - networkDeviceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Device along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getStatusWithResponseAsync( - String resourceGroupName, String networkDeviceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getStatus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - networkDeviceName, - accept, - context); - } - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the running status of the Network Device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, GetDeviceStatusPropertiesInner> beginGetStatusAsync( - String resourceGroupName, String networkDeviceName) { - Mono>> mono = getStatusWithResponseAsync(resourceGroupName, networkDeviceName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - GetDeviceStatusPropertiesInner.class, - GetDeviceStatusPropertiesInner.class, - this.client.getContext()); - } - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the running status of the Network Device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, GetDeviceStatusPropertiesInner> beginGetStatusAsync( - String resourceGroupName, String networkDeviceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - getStatusWithResponseAsync(resourceGroupName, networkDeviceName, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - GetDeviceStatusPropertiesInner.class, - GetDeviceStatusPropertiesInner.class, - context); - } - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the running status of the Network Device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, GetDeviceStatusPropertiesInner> beginGetStatus( - String resourceGroupName, String networkDeviceName) { - return this.beginGetStatusAsync(resourceGroupName, networkDeviceName).getSyncPoller(); - } - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the running status of the Network Device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, GetDeviceStatusPropertiesInner> beginGetStatus( - String resourceGroupName, String networkDeviceName, Context context) { - return this.beginGetStatusAsync(resourceGroupName, networkDeviceName, context).getSyncPoller(); - } - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Device on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getStatusAsync(String resourceGroupName, String networkDeviceName) { - return beginGetStatusAsync(resourceGroupName, networkDeviceName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Device on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getStatusAsync( - String resourceGroupName, String networkDeviceName, Context context) { - return beginGetStatusAsync(resourceGroupName, networkDeviceName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GetDeviceStatusPropertiesInner getStatus(String resourceGroupName, String networkDeviceName) { - return getStatusAsync(resourceGroupName, networkDeviceName).block(); - } - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GetDeviceStatusPropertiesInner getStatus( - String resourceGroupName, String networkDeviceName, Context context) { - return getStatusAsync(resourceGroupName, networkDeviceName, context).block(); - } - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the static interface maps for the given Network Device along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getStaticInterfaceMapsWithResponseAsync( - String resourceGroupName, String networkDeviceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getStaticInterfaceMaps( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - networkDeviceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the static interface maps for the given Network Device along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getStaticInterfaceMapsWithResponseAsync( - String resourceGroupName, String networkDeviceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getStaticInterfaceMaps( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - networkDeviceName, - accept, - context); - } - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the static interface maps for the given Network Device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult>, - List> - beginGetStaticInterfaceMapsAsync(String resourceGroupName, String networkDeviceName) { - Mono>> mono = - getStaticInterfaceMapsWithResponseAsync(resourceGroupName, networkDeviceName); - return this - .client - ., List> - getLroResult( - mono, - this.client.getHttpPipeline(), - new TypeReference>() { - }.getType(), - new TypeReference>() { - }.getType(), - this.client.getContext()); - } - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the static interface maps for the given Network Device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult>, - List> - beginGetStaticInterfaceMapsAsync(String resourceGroupName, String networkDeviceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - getStaticInterfaceMapsWithResponseAsync(resourceGroupName, networkDeviceName, context); - return this - .client - ., List> - getLroResult( - mono, - this.client.getHttpPipeline(), - new TypeReference>() { - }.getType(), - new TypeReference>() { - }.getType(), - context); - } - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the static interface maps for the given Network Device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult>, - List> - beginGetStaticInterfaceMaps(String resourceGroupName, String networkDeviceName) { - return this.beginGetStaticInterfaceMapsAsync(resourceGroupName, networkDeviceName).getSyncPoller(); - } - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the static interface maps for the given Network Device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult>, - List> - beginGetStaticInterfaceMaps(String resourceGroupName, String networkDeviceName, Context context) { - return this.beginGetStaticInterfaceMapsAsync(resourceGroupName, networkDeviceName, context).getSyncPoller(); - } - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the static interface maps for the given Network Device on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getStaticInterfaceMapsAsync( - String resourceGroupName, String networkDeviceName) { - return beginGetStaticInterfaceMapsAsync(resourceGroupName, networkDeviceName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the static interface maps for the given Network Device on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getStaticInterfaceMapsAsync( - String resourceGroupName, String networkDeviceName, Context context) { - return beginGetStaticInterfaceMapsAsync(resourceGroupName, networkDeviceName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the static interface maps for the given Network Device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List getStaticInterfaceMaps( - String resourceGroupName, String networkDeviceName) { - return getStaticInterfaceMapsAsync(resourceGroupName, networkDeviceName).block(); - } - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the static interface maps for the given Network Device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List getStaticInterfaceMaps( - String resourceGroupName, String networkDeviceName, Context context) { - return getStaticInterfaceMapsAsync(resourceGroupName, networkDeviceName, context).block(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the dynamic interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the dynamic interface maps for the given Network Device along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getDynamicInterfaceMapsWithResponseAsync( - String resourceGroupName, String networkDeviceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getDynamicInterfaceMaps( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - networkDeviceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the dynamic interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the dynamic interface maps for the given Network Device along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getDynamicInterfaceMapsWithResponseAsync( - String resourceGroupName, String networkDeviceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getDynamicInterfaceMaps( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - networkDeviceName, - accept, - context); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the dynamic interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the dynamic interface maps for the given Network Device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult>, - List> - beginGetDynamicInterfaceMapsAsync(String resourceGroupName, String networkDeviceName) { - Mono>> mono = - getDynamicInterfaceMapsWithResponseAsync(resourceGroupName, networkDeviceName); - return this - .client - ., List> - getLroResult( - mono, - this.client.getHttpPipeline(), - new TypeReference>() { - }.getType(), - new TypeReference>() { - }.getType(), - this.client.getContext()); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the dynamic interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the dynamic interface maps for the given Network Device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux< - PollResult>, - List> - beginGetDynamicInterfaceMapsAsync(String resourceGroupName, String networkDeviceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - getDynamicInterfaceMapsWithResponseAsync(resourceGroupName, networkDeviceName, context); - return this - .client - ., List> - getLroResult( - mono, - this.client.getHttpPipeline(), - new TypeReference>() { - }.getType(), - new TypeReference>() { - }.getType(), - context); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the dynamic interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the dynamic interface maps for the given Network Device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult>, - List> - beginGetDynamicInterfaceMaps(String resourceGroupName, String networkDeviceName) { - return this.beginGetDynamicInterfaceMapsAsync(resourceGroupName, networkDeviceName).getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the dynamic interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the dynamic interface maps for the given Network Device. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller< - PollResult>, - List> - beginGetDynamicInterfaceMaps(String resourceGroupName, String networkDeviceName, Context context) { - return this.beginGetDynamicInterfaceMapsAsync(resourceGroupName, networkDeviceName, context).getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the dynamic interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the dynamic interface maps for the given Network Device on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDynamicInterfaceMapsAsync( - String resourceGroupName, String networkDeviceName) { - return beginGetDynamicInterfaceMapsAsync(resourceGroupName, networkDeviceName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the dynamic interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the dynamic interface maps for the given Network Device on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDynamicInterfaceMapsAsync( - String resourceGroupName, String networkDeviceName, Context context) { - return beginGetDynamicInterfaceMapsAsync(resourceGroupName, networkDeviceName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the dynamic interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the dynamic interface maps for the given Network Device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List getDynamicInterfaceMaps( - String resourceGroupName, String networkDeviceName) { - return getDynamicInterfaceMapsAsync(resourceGroupName, networkDeviceName).block(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the dynamic interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the dynamic interface maps for the given Network Device. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List getDynamicInterfaceMaps( - String resourceGroupName, String networkDeviceName, Context context) { - return getDynamicInterfaceMapsAsync(resourceGroupName, networkDeviceName, context).block(); + public CommonPostActionResponseForStateUpdateInner upgrade( + String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context) { + return upgradeAsync(resourceGroupName, networkDeviceName, body, context).block(); } /** diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesImpl.java index 8a1e2948358b6..1a80fdb08c86d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkDevicesImpl.java @@ -10,22 +10,14 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkDevicesClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetDeviceStatusPropertiesInner; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetDynamicInterfaceMapsPropertiesItemInner; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetStaticInterfaceMapsPropertiesItemInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.SupportPackagePropertiesInner; -import com.azure.resourcemanager.managednetworkfabric.models.GetDeviceStatusProperties; -import com.azure.resourcemanager.managednetworkfabric.models.GetDynamicInterfaceMapsPropertiesItem; -import com.azure.resourcemanager.managednetworkfabric.models.GetStaticInterfaceMapsPropertiesItem; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevices; -import com.azure.resourcemanager.managednetworkfabric.models.SupportPackageProperties; -import com.azure.resourcemanager.managednetworkfabric.models.UpdatePowerCycleProperties; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersionProperties; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; +import com.azure.resourcemanager.managednetworkfabric.models.RebootProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; public final class NetworkDevicesImpl implements NetworkDevices { private static final ClientLogger LOGGER = new ClientLogger(NetworkDevicesImpl.class); @@ -93,141 +85,91 @@ public PagedIterable list(Context context) { return Utils.mapPage(inner, inner1 -> new NetworkDeviceImpl(inner1, this.manager())); } - public void reboot(String resourceGroupName, String networkDeviceName) { - this.serviceClient().reboot(resourceGroupName, networkDeviceName); - } - - public void reboot(String resourceGroupName, String networkDeviceName, Context context) { - this.serviceClient().reboot(resourceGroupName, networkDeviceName, context); - } - - public void restoreConfig(String resourceGroupName, String networkDeviceName) { - this.serviceClient().restoreConfig(resourceGroupName, networkDeviceName); - } - - public void restoreConfig(String resourceGroupName, String networkDeviceName, Context context) { - this.serviceClient().restoreConfig(resourceGroupName, networkDeviceName, context); - } - - public void updateVersion(String resourceGroupName, String networkDeviceName, UpdateVersionProperties body) { - this.serviceClient().updateVersion(resourceGroupName, networkDeviceName, body); - } - - public void updateVersion( - String resourceGroupName, String networkDeviceName, UpdateVersionProperties body, Context context) { - this.serviceClient().updateVersion(resourceGroupName, networkDeviceName, body, context); - } - - public SupportPackageProperties generateSupportPackage(String resourceGroupName, String networkDeviceName) { - SupportPackagePropertiesInner inner = - this.serviceClient().generateSupportPackage(resourceGroupName, networkDeviceName); + public CommonPostActionResponseForStateUpdate reboot( + String resourceGroupName, String networkDeviceName, RebootProperties body) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().reboot(resourceGroupName, networkDeviceName, body); if (inner != null) { - return new SupportPackagePropertiesImpl(inner, this.manager()); + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); } else { return null; } } - public SupportPackageProperties generateSupportPackage( - String resourceGroupName, String networkDeviceName, Context context) { - SupportPackagePropertiesInner inner = - this.serviceClient().generateSupportPackage(resourceGroupName, networkDeviceName, context); + public CommonPostActionResponseForStateUpdate reboot( + String resourceGroupName, String networkDeviceName, RebootProperties body, Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().reboot(resourceGroupName, networkDeviceName, body, context); if (inner != null) { - return new SupportPackagePropertiesImpl(inner, this.manager()); + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); } else { return null; } } - public void updatePowerCycle(String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body) { - this.serviceClient().updatePowerCycle(resourceGroupName, networkDeviceName, body); - } - - public void updatePowerCycle( - String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body, Context context) { - this.serviceClient().updatePowerCycle(resourceGroupName, networkDeviceName, body, context); - } - - public GetDeviceStatusProperties getStatus(String resourceGroupName, String networkDeviceName) { - GetDeviceStatusPropertiesInner inner = this.serviceClient().getStatus(resourceGroupName, networkDeviceName); + public CommonPostActionResponseForStateUpdate refreshConfiguration( + String resourceGroupName, String networkDeviceName) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().refreshConfiguration(resourceGroupName, networkDeviceName); if (inner != null) { - return new GetDeviceStatusPropertiesImpl(inner, this.manager()); + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); } else { return null; } } - public GetDeviceStatusProperties getStatus(String resourceGroupName, String networkDeviceName, Context context) { - GetDeviceStatusPropertiesInner inner = - this.serviceClient().getStatus(resourceGroupName, networkDeviceName, context); + public CommonPostActionResponseForStateUpdate refreshConfiguration( + String resourceGroupName, String networkDeviceName, Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().refreshConfiguration(resourceGroupName, networkDeviceName, context); if (inner != null) { - return new GetDeviceStatusPropertiesImpl(inner, this.manager()); + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); } else { return null; } } - public List getStaticInterfaceMaps( - String resourceGroupName, String networkDeviceName) { - List inner = - this.serviceClient().getStaticInterfaceMaps(resourceGroupName, networkDeviceName); + public CommonPostActionResponseForStateUpdate updateAdministrativeState( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().updateAdministrativeState(resourceGroupName, networkDeviceName, body); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new GetStaticInterfaceMapsPropertiesItemImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); } else { - return Collections.emptyList(); + return null; } } - public List getStaticInterfaceMaps( - String resourceGroupName, String networkDeviceName, Context context) { - List inner = - this.serviceClient().getStaticInterfaceMaps(resourceGroupName, networkDeviceName, context); + public CommonPostActionResponseForStateUpdate updateAdministrativeState( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body, Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().updateAdministrativeState(resourceGroupName, networkDeviceName, body, context); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new GetStaticInterfaceMapsPropertiesItemImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); } else { - return Collections.emptyList(); + return null; } } - public List getDynamicInterfaceMaps( - String resourceGroupName, String networkDeviceName) { - List inner = - this.serviceClient().getDynamicInterfaceMaps(resourceGroupName, networkDeviceName); + public CommonPostActionResponseForStateUpdate upgrade( + String resourceGroupName, String networkDeviceName, UpdateVersion body) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().upgrade(resourceGroupName, networkDeviceName, body); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new GetDynamicInterfaceMapsPropertiesItemImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); } else { - return Collections.emptyList(); + return null; } } - public List getDynamicInterfaceMaps( - String resourceGroupName, String networkDeviceName, Context context) { - List inner = - this.serviceClient().getDynamicInterfaceMaps(resourceGroupName, networkDeviceName, context); + public CommonPostActionResponseForStateUpdate upgrade( + String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().upgrade(resourceGroupName, networkDeviceName, body, context); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new GetDynamicInterfaceMapsPropertiesItemImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); } else { - return Collections.emptyList(); + return null; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllerImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllerImpl.java index 1a2e66f1dbf4b..45e208e206bf6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllerImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllerImpl.java @@ -8,14 +8,14 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricControllerInner; +import com.azure.resourcemanager.managednetworkfabric.models.ControllerServices; import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; -import com.azure.resourcemanager.managednetworkfabric.models.InfrastructureServices; +import com.azure.resourcemanager.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled; import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricController; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerOperationalState; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllerPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NfcSku; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import com.azure.resourcemanager.managednetworkfabric.models.WorkloadServices; import java.util.Collections; import java.util.List; import java.util.Map; @@ -55,11 +55,11 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public InfrastructureServices infrastructureServices() { + public ControllerServices infrastructureServices() { return this.innerModel().infrastructureServices(); } - public WorkloadServices workloadServices() { + public ControllerServices workloadServices() { return this.innerModel().workloadServices(); } @@ -80,6 +80,19 @@ public Boolean workloadManagementNetwork() { return this.innerModel().workloadManagementNetwork(); } + public IsWorkloadManagementNetworkEnabled isWorkloadManagementNetworkEnabled() { + return this.innerModel().isWorkloadManagementNetworkEnabled(); + } + + public List tenantInternetGatewayIds() { + List inner = this.innerModel().tenantInternetGatewayIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public String ipv4AddressSpace() { return this.innerModel().ipv4AddressSpace(); } @@ -88,8 +101,8 @@ public String ipv6AddressSpace() { return this.innerModel().ipv6AddressSpace(); } - public NetworkFabricControllerOperationalState operationalState() { - return this.innerModel().operationalState(); + public NfcSku nfcSku() { + return this.innerModel().nfcSku(); } public ProvisioningState provisioningState() { @@ -226,30 +239,6 @@ public NetworkFabricController refresh(Context context) { return this; } - public void enableWorkloadManagementNetwork() { - serviceManager - .networkFabricControllers() - .enableWorkloadManagementNetwork(resourceGroupName, networkFabricControllerName); - } - - public void enableWorkloadManagementNetwork(Context context) { - serviceManager - .networkFabricControllers() - .enableWorkloadManagementNetwork(resourceGroupName, networkFabricControllerName, context); - } - - public void disableWorkloadManagementNetwork() { - serviceManager - .networkFabricControllers() - .disableWorkloadManagementNetwork(resourceGroupName, networkFabricControllerName); - } - - public void disableWorkloadManagementNetwork(Context context) { - serviceManager - .networkFabricControllers() - .disableWorkloadManagementNetwork(resourceGroupName, networkFabricControllerName, context); - } - public NetworkFabricControllerImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -276,6 +265,12 @@ public NetworkFabricControllerImpl withManagedResourceGroupConfiguration( return this; } + public NetworkFabricControllerImpl withIsWorkloadManagementNetworkEnabled( + IsWorkloadManagementNetworkEnabled isWorkloadManagementNetworkEnabled) { + this.innerModel().withIsWorkloadManagementNetworkEnabled(isWorkloadManagementNetworkEnabled); + return this; + } + public NetworkFabricControllerImpl withIpv4AddressSpace(String ipv4AddressSpace) { this.innerModel().withIpv4AddressSpace(ipv4AddressSpace); return this; @@ -286,6 +281,11 @@ public NetworkFabricControllerImpl withIpv6AddressSpace(String ipv6AddressSpace) return this; } + public NetworkFabricControllerImpl withNfcSku(NfcSku nfcSku) { + this.innerModel().withNfcSku(nfcSku); + return this; + } + public NetworkFabricControllerImpl withInfrastructureExpressRouteConnections( List infrastructureExpressRouteConnections) { if (isInCreateMode()) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersClientImpl.java index a2c58e55b2fd0..c20db1e5789d8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersClientImpl.java @@ -14,7 +14,6 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -115,7 +114,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}") - @ExpectedResponses({200, 202, 204}) + @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @HostParam("$host") String endpoint, @@ -150,34 +149,6 @@ Mono> list( @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}/enableWorkloadManagementNetwork") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> enableWorkloadManagementNetwork( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("networkFabricControllerName") String networkFabricControllerName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}/disableWorkloadManagementNetwork") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> disableWorkloadManagementNetwork( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("networkFabricControllerName") String networkFabricControllerName, - @HeaderParam("Accept") String accept, - Context context); - @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -210,7 +181,7 @@ Mono> listBySubscriptionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition along with {@link Response} on successful completion of + * @return the Network Fabric Controller resource definition along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -272,7 +243,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition along with {@link Response} on successful completion of + * @return the Network Fabric Controller resource definition along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -333,7 +304,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkFabricController resource definition. + * @return the {@link PollerFlux} for polling of the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkFabricControllerInner> beginCreateAsync( @@ -362,7 +333,7 @@ private PollerFlux, NetworkFabricContro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkFabricController resource definition. + * @return the {@link PollerFlux} for polling of the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkFabricControllerInner> beginCreateAsync( @@ -394,7 +365,7 @@ private PollerFlux, NetworkFabricContro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkFabricController resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkFabricControllerInner> beginCreate( @@ -414,7 +385,7 @@ public SyncPoller, NetworkFabricControl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkFabricController resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkFabricControllerInner> beginCreate( @@ -436,7 +407,7 @@ public SyncPoller, NetworkFabricControl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition on successful completion of {@link Mono}. + * @return the Network Fabric Controller resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -458,7 +429,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition on successful completion of {@link Mono}. + * @return the Network Fabric Controller resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -482,7 +453,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition. + * @return the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkFabricControllerInner create( @@ -502,7 +473,7 @@ public NetworkFabricControllerInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition. + * @return the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkFabricControllerInner create( @@ -523,7 +494,7 @@ public NetworkFabricControllerInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition along with {@link Response} on successful completion of + * @return the Network Fabric Controller resource definition along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -578,7 +549,7 @@ private Mono> getByResourceGroupWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition along with {@link Response} on successful completion of + * @return the Network Fabric Controller resource definition along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -629,7 +600,7 @@ private Mono> getByResourceGroupWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition on successful completion of {@link Mono}. + * @return the Network Fabric Controller resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync( @@ -649,7 +620,7 @@ private Mono getByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition along with {@link Response}. + * @return the Network Fabric Controller resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -667,7 +638,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition. + * @return the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkFabricControllerInner getByResourceGroup( @@ -686,7 +657,7 @@ public NetworkFabricControllerInner getByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition along with {@link Response} on successful completion of + * @return the Network Fabric Controller resource definition along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -748,7 +719,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition along with {@link Response} on successful completion of + * @return the Network Fabric Controller resource definition along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -809,7 +780,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkFabricController resource definition. + * @return the {@link PollerFlux} for polling of the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkFabricControllerInner> beginUpdateAsync( @@ -838,7 +809,7 @@ private PollerFlux, NetworkFabricContro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkFabricController resource definition. + * @return the {@link PollerFlux} for polling of the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkFabricControllerInner> beginUpdateAsync( @@ -870,7 +841,7 @@ private PollerFlux, NetworkFabricContro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkFabricController resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkFabricControllerInner> beginUpdate( @@ -890,7 +861,7 @@ public SyncPoller, NetworkFabricControl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkFabricController resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkFabricControllerInner> beginUpdate( @@ -912,7 +883,7 @@ public SyncPoller, NetworkFabricControl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition on successful completion of {@link Mono}. + * @return the Network Fabric Controller resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -934,7 +905,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition on successful completion of {@link Mono}. + * @return the Network Fabric Controller resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -958,7 +929,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition. + * @return the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkFabricControllerInner update( @@ -978,7 +949,7 @@ public NetworkFabricControllerInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition. + * @return the Network Fabric Controller resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkFabricControllerInner update( @@ -1257,7 +1228,7 @@ public void delete(String resourceGroupName, String networkFabricControllerName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers along with {@link PagedResponse} on successful completion of {@link + * @return list of Network Fabric Controllers along with {@link PagedResponse} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1313,7 +1284,7 @@ private Mono> listByResourceGroupSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers along with {@link PagedResponse} on successful completion of {@link + * @return list of Network Fabric Controllers along with {@link PagedResponse} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1365,7 +1336,7 @@ private Mono> listByResourceGroupSin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers as paginated response with {@link PagedFlux}. + * @return list of Network Fabric Controllers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1384,7 +1355,7 @@ private PagedFlux listByResourceGroupAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers as paginated response with {@link PagedFlux}. + * @return list of Network Fabric Controllers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -1403,7 +1374,7 @@ private PagedFlux listByResourceGroupAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers as paginated response with {@link PagedIterable}. + * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1420,7 +1391,7 @@ public PagedIterable listByResourceGroup(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers as paginated response with {@link PagedIterable}. + * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -1434,7 +1405,7 @@ public PagedIterable listByResourceGroup(String re * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers along with {@link PagedResponse} on successful completion of {@link + * @return list of Network Fabric Controllers along with {@link PagedResponse} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1483,7 +1454,7 @@ private Mono> listSinglePageAsync() * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers along with {@link PagedResponse} on successful completion of {@link + * @return list of Network Fabric Controllers along with {@link PagedResponse} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1527,7 +1498,7 @@ private Mono> listSinglePageAsync(Co * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers as paginated response with {@link PagedFlux}. + * @return list of Network Fabric Controllers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1544,7 +1515,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers as paginated response with {@link PagedFlux}. + * @return list of Network Fabric Controllers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1559,7 +1530,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers as paginated response with {@link PagedIterable}. + * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1575,547 +1546,13 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers as paginated response with {@link PagedIterable}. + * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { return new PagedIterable<>(listAsync(context)); } - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> enableWorkloadManagementNetworkWithResponseAsync( - String resourceGroupName, String networkFabricControllerName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricControllerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter networkFabricControllerName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .enableWorkloadManagementNetwork( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - networkFabricControllerName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> enableWorkloadManagementNetworkWithResponseAsync( - String resourceGroupName, String networkFabricControllerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricControllerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter networkFabricControllerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .enableWorkloadManagementNetwork( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - networkFabricControllerName, - accept, - context); - } - - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginEnableWorkloadManagementNetworkAsync( - String resourceGroupName, String networkFabricControllerName) { - Mono>> mono = - enableWorkloadManagementNetworkWithResponseAsync(resourceGroupName, networkFabricControllerName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginEnableWorkloadManagementNetworkAsync( - String resourceGroupName, String networkFabricControllerName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - enableWorkloadManagementNetworkWithResponseAsync(resourceGroupName, networkFabricControllerName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginEnableWorkloadManagementNetwork( - String resourceGroupName, String networkFabricControllerName) { - return this - .beginEnableWorkloadManagementNetworkAsync(resourceGroupName, networkFabricControllerName) - .getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginEnableWorkloadManagementNetwork( - String resourceGroupName, String networkFabricControllerName, Context context) { - return this - .beginEnableWorkloadManagementNetworkAsync(resourceGroupName, networkFabricControllerName, context) - .getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono enableWorkloadManagementNetworkAsync( - String resourceGroupName, String networkFabricControllerName) { - return beginEnableWorkloadManagementNetworkAsync(resourceGroupName, networkFabricControllerName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono enableWorkloadManagementNetworkAsync( - String resourceGroupName, String networkFabricControllerName, Context context) { - return beginEnableWorkloadManagementNetworkAsync(resourceGroupName, networkFabricControllerName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void enableWorkloadManagementNetwork(String resourceGroupName, String networkFabricControllerName) { - enableWorkloadManagementNetworkAsync(resourceGroupName, networkFabricControllerName).block(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void enableWorkloadManagementNetwork( - String resourceGroupName, String networkFabricControllerName, Context context) { - enableWorkloadManagementNetworkAsync(resourceGroupName, networkFabricControllerName, context).block(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> disableWorkloadManagementNetworkWithResponseAsync( - String resourceGroupName, String networkFabricControllerName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricControllerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter networkFabricControllerName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .disableWorkloadManagementNetwork( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - networkFabricControllerName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> disableWorkloadManagementNetworkWithResponseAsync( - String resourceGroupName, String networkFabricControllerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkFabricControllerName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter networkFabricControllerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .disableWorkloadManagementNetwork( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - networkFabricControllerName, - accept, - context); - } - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDisableWorkloadManagementNetworkAsync( - String resourceGroupName, String networkFabricControllerName) { - Mono>> mono = - disableWorkloadManagementNetworkWithResponseAsync(resourceGroupName, networkFabricControllerName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDisableWorkloadManagementNetworkAsync( - String resourceGroupName, String networkFabricControllerName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - disableWorkloadManagementNetworkWithResponseAsync(resourceGroupName, networkFabricControllerName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDisableWorkloadManagementNetwork( - String resourceGroupName, String networkFabricControllerName) { - return this - .beginDisableWorkloadManagementNetworkAsync(resourceGroupName, networkFabricControllerName) - .getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDisableWorkloadManagementNetwork( - String resourceGroupName, String networkFabricControllerName, Context context) { - return this - .beginDisableWorkloadManagementNetworkAsync(resourceGroupName, networkFabricControllerName, context) - .getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono disableWorkloadManagementNetworkAsync( - String resourceGroupName, String networkFabricControllerName) { - return beginDisableWorkloadManagementNetworkAsync(resourceGroupName, networkFabricControllerName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono disableWorkloadManagementNetworkAsync( - String resourceGroupName, String networkFabricControllerName, Context context) { - return beginDisableWorkloadManagementNetworkAsync(resourceGroupName, networkFabricControllerName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void disableWorkloadManagementNetwork(String resourceGroupName, String networkFabricControllerName) { - disableWorkloadManagementNetworkAsync(resourceGroupName, networkFabricControllerName).block(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void disableWorkloadManagementNetwork( - String resourceGroupName, String networkFabricControllerName, Context context) { - disableWorkloadManagementNetworkAsync(resourceGroupName, networkFabricControllerName, context).block(); - } - /** * Get the next page of items. * @@ -2124,7 +1561,7 @@ public void disableWorkloadManagementNetwork( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers along with {@link PagedResponse} on successful completion of {@link + * @return list of Network Fabric Controllers along with {@link PagedResponse} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -2163,7 +1600,7 @@ private Mono> listByResourceGroupNex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers along with {@link PagedResponse} on successful completion of {@link + * @return list of Network Fabric Controllers along with {@link PagedResponse} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -2201,7 +1638,7 @@ private Mono> listByResourceGroupNex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers along with {@link PagedResponse} on successful completion of {@link + * @return list of Network Fabric Controllers along with {@link PagedResponse} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -2240,7 +1677,7 @@ private Mono> listBySubscriptionNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers along with {@link PagedResponse} on successful completion of {@link + * @return list of Network Fabric Controllers along with {@link PagedResponse} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersImpl.java index faec4ee24aa34..5c6059aac7241 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricControllersImpl.java @@ -84,24 +84,6 @@ public PagedIterable list(Context context) { return Utils.mapPage(inner, inner1 -> new NetworkFabricControllerImpl(inner1, this.manager())); } - public void enableWorkloadManagementNetwork(String resourceGroupName, String networkFabricControllerName) { - this.serviceClient().enableWorkloadManagementNetwork(resourceGroupName, networkFabricControllerName); - } - - public void enableWorkloadManagementNetwork( - String resourceGroupName, String networkFabricControllerName, Context context) { - this.serviceClient().enableWorkloadManagementNetwork(resourceGroupName, networkFabricControllerName, context); - } - - public void disableWorkloadManagementNetwork(String resourceGroupName, String networkFabricControllerName) { - this.serviceClient().disableWorkloadManagementNetwork(resourceGroupName, networkFabricControllerName); - } - - public void disableWorkloadManagementNetwork( - String resourceGroupName, String networkFabricControllerName, Context context) { - this.serviceClient().disableWorkloadManagementNetwork(resourceGroupName, networkFabricControllerName, context); - } - public NetworkFabricController getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricImpl.java index 9888eceda6733..db62db6ae8306 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricImpl.java @@ -8,13 +8,21 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner; -import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabric; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricOperationalState; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatchParameters; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; import java.util.Collections; import java.util.List; import java.util.Map; @@ -57,7 +65,24 @@ public String networkFabricSku() { return this.innerModel().networkFabricSku(); } - public int rackCount() { + public String fabricVersion() { + return this.innerModel().fabricVersion(); + } + + public List routerIds() { + List inner = this.innerModel().routerIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String networkFabricControllerId() { + return this.innerModel().networkFabricControllerId(); + } + + public Integer rackCount() { return this.innerModel().rackCount(); } @@ -73,34 +98,18 @@ public String ipv6Prefix() { return this.innerModel().ipv6Prefix(); } - public String routerId() { - return this.innerModel().routerId(); - } - - public int fabricAsn() { + public long fabricAsn() { return this.innerModel().fabricAsn(); } - public String networkFabricControllerId() { - return this.innerModel().networkFabricControllerId(); - } - public TerminalServerConfiguration terminalServerConfiguration() { return this.innerModel().terminalServerConfiguration(); } - public ManagementNetworkConfiguration managementNetworkConfiguration() { + public ManagementNetworkConfigurationProperties managementNetworkConfiguration() { return this.innerModel().managementNetworkConfiguration(); } - public NetworkFabricOperationalState operationalState() { - return this.innerModel().operationalState(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public List racks() { List inner = this.innerModel().racks(); if (inner != null) { @@ -128,6 +137,18 @@ public List l3IsolationDomains() { } } + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + public String annotation() { return this.innerModel().annotation(); } @@ -156,7 +177,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String networkFabricName; - private NetworkFabricPatchParameters updateBody; + private NetworkFabricPatch updateBody; public NetworkFabricImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -189,7 +210,7 @@ public NetworkFabric create(Context context) { } public NetworkFabricImpl update() { - this.updateBody = new NetworkFabricPatchParameters(); + this.updateBody = new NetworkFabricPatch(); return this; } @@ -240,20 +261,90 @@ public NetworkFabric refresh(Context context) { return this; } - public void provision() { - serviceManager.networkFabrics().provision(resourceGroupName, networkFabricName); + public CommonPostActionResponseForDeviceUpdate provision() { + return serviceManager.networkFabrics().provision(resourceGroupName, networkFabricName); + } + + public CommonPostActionResponseForDeviceUpdate provision(Context context) { + return serviceManager.networkFabrics().provision(resourceGroupName, networkFabricName, context); + } + + public CommonPostActionResponseForDeviceUpdate deprovision() { + return serviceManager.networkFabrics().deprovision(resourceGroupName, networkFabricName); + } + + public CommonPostActionResponseForDeviceUpdate deprovision(Context context) { + return serviceManager.networkFabrics().deprovision(resourceGroupName, networkFabricName, context); + } + + public CommonPostActionResponseForStateUpdate upgrade(UpdateVersion body) { + return serviceManager.networkFabrics().upgrade(resourceGroupName, networkFabricName, body); + } + + public CommonPostActionResponseForStateUpdate upgrade(UpdateVersion body, Context context) { + return serviceManager.networkFabrics().upgrade(resourceGroupName, networkFabricName, body, context); + } + + public CommonPostActionResponseForStateUpdate refreshConfiguration() { + return serviceManager.networkFabrics().refreshConfiguration(resourceGroupName, networkFabricName); + } + + public CommonPostActionResponseForStateUpdate refreshConfiguration(Context context) { + return serviceManager.networkFabrics().refreshConfiguration(resourceGroupName, networkFabricName, context); } - public void provision(Context context) { - serviceManager.networkFabrics().provision(resourceGroupName, networkFabricName, context); + public CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration( + UpdateAdministrativeState body) { + return serviceManager + .networkFabrics() + .updateWorkloadManagementBfdConfiguration(resourceGroupName, networkFabricName, body); } - public void deprovision() { - serviceManager.networkFabrics().deprovision(resourceGroupName, networkFabricName); + public CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration( + UpdateAdministrativeState body, Context context) { + return serviceManager + .networkFabrics() + .updateWorkloadManagementBfdConfiguration(resourceGroupName, networkFabricName, body, context); } - public void deprovision(Context context) { - serviceManager.networkFabrics().deprovision(resourceGroupName, networkFabricName, context); + public CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration( + UpdateAdministrativeState body) { + return serviceManager + .networkFabrics() + .updateInfraManagementBfdConfiguration(resourceGroupName, networkFabricName, body); + } + + public CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration( + UpdateAdministrativeState body, Context context) { + return serviceManager + .networkFabrics() + .updateInfraManagementBfdConfiguration(resourceGroupName, networkFabricName, body, context); + } + + public ValidateConfigurationResponse validateConfiguration(ValidateConfigurationProperties body) { + return serviceManager.networkFabrics().validateConfiguration(resourceGroupName, networkFabricName, body); + } + + public ValidateConfigurationResponse validateConfiguration(ValidateConfigurationProperties body, Context context) { + return serviceManager + .networkFabrics() + .validateConfiguration(resourceGroupName, networkFabricName, body, context); + } + + public ValidateConfigurationResponse getTopology() { + return serviceManager.networkFabrics().getTopology(resourceGroupName, networkFabricName); + } + + public ValidateConfigurationResponse getTopology(Context context) { + return serviceManager.networkFabrics().getTopology(resourceGroupName, networkFabricName, context); + } + + public CommonPostActionResponseForStateUpdate commitConfiguration() { + return serviceManager.networkFabrics().commitConfiguration(resourceGroupName, networkFabricName); + } + + public CommonPostActionResponseForStateUpdate commitConfiguration(Context context) { + return serviceManager.networkFabrics().commitConfiguration(resourceGroupName, networkFabricName, context); } public NetworkFabricImpl withRegion(Region location) { @@ -266,23 +357,13 @@ public NetworkFabricImpl withRegion(String location) { return this; } - public NetworkFabricImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - public NetworkFabricImpl withNetworkFabricSku(String networkFabricSku) { this.innerModel().withNetworkFabricSku(networkFabricSku); return this; } - public NetworkFabricImpl withRackCount(int rackCount) { - this.innerModel().withRackCount(rackCount); + public NetworkFabricImpl withNetworkFabricControllerId(String networkFabricControllerId) { + this.innerModel().withNetworkFabricControllerId(networkFabricControllerId); return this; } @@ -292,36 +373,61 @@ public NetworkFabricImpl withServerCountPerRack(int serverCountPerRack) { } public NetworkFabricImpl withIpv4Prefix(String ipv4Prefix) { - this.innerModel().withIpv4Prefix(ipv4Prefix); - return this; - } - - public NetworkFabricImpl withIpv6Prefix(String ipv6Prefix) { - this.innerModel().withIpv6Prefix(ipv6Prefix); - return this; + if (isInCreateMode()) { + this.innerModel().withIpv4Prefix(ipv4Prefix); + return this; + } else { + this.updateBody.withIpv4Prefix(ipv4Prefix); + return this; + } } - public NetworkFabricImpl withFabricAsn(int fabricAsn) { + public NetworkFabricImpl withFabricAsn(long fabricAsn) { this.innerModel().withFabricAsn(fabricAsn); return this; } - public NetworkFabricImpl withNetworkFabricControllerId(String networkFabricControllerId) { - this.innerModel().withNetworkFabricControllerId(networkFabricControllerId); - return this; - } - public NetworkFabricImpl withTerminalServerConfiguration(TerminalServerConfiguration terminalServerConfiguration) { this.innerModel().withTerminalServerConfiguration(terminalServerConfiguration); return this; } public NetworkFabricImpl withManagementNetworkConfiguration( - ManagementNetworkConfiguration managementNetworkConfiguration) { + ManagementNetworkConfigurationProperties managementNetworkConfiguration) { this.innerModel().withManagementNetworkConfiguration(managementNetworkConfiguration); return this; } + public NetworkFabricImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public NetworkFabricImpl withRackCount(Integer rackCount) { + if (isInCreateMode()) { + this.innerModel().withRackCount(rackCount); + return this; + } else { + this.updateBody.withRackCount(rackCount); + return this; + } + } + + public NetworkFabricImpl withIpv6Prefix(String ipv6Prefix) { + if (isInCreateMode()) { + this.innerModel().withIpv6Prefix(ipv6Prefix); + return this; + } else { + this.updateBody.withIpv6Prefix(ipv6Prefix); + return this; + } + } + public NetworkFabricImpl withAnnotation(String annotation) { if (isInCreateMode()) { this.innerModel().withAnnotation(annotation); @@ -332,12 +438,28 @@ public NetworkFabricImpl withAnnotation(String annotation) { } } + public NetworkFabricImpl withServerCountPerRack(Integer serverCountPerRack) { + this.updateBody.withServerCountPerRack(serverCountPerRack); + return this; + } + + public NetworkFabricImpl withFabricAsn(Long fabricAsn) { + this.updateBody.withFabricAsn(fabricAsn); + return this; + } + public NetworkFabricImpl withTerminalServerConfiguration( - TerminalServerPatchableProperties terminalServerConfiguration) { + NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration) { this.updateBody.withTerminalServerConfiguration(terminalServerConfiguration); return this; } + public NetworkFabricImpl withManagementNetworkConfiguration( + ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration) { + this.updateBody.withManagementNetworkConfiguration(managementNetworkConfiguration); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkuImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkuImpl.java index 60e89f4926278..794b3d3e51c0b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkuImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkuImpl.java @@ -6,8 +6,11 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuInner; +import com.azure.resourcemanager.managednetworkfabric.models.FabricSkuType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSku; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import java.util.Collections; +import java.util.List; public final class NetworkFabricSkuImpl implements NetworkFabricSku { private NetworkFabricSkuInner innerObject; @@ -37,7 +40,7 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public String typePropertiesType() { + public FabricSkuType typePropertiesType() { return this.innerModel().typePropertiesType(); } @@ -45,16 +48,21 @@ public Integer maxComputeRacks() { return this.innerModel().maxComputeRacks(); } - public String minSupportedVer() { - return this.innerModel().minSupportedVer(); + public Integer maximumServerCount() { + return this.innerModel().maximumServerCount(); } - public String maxSupportedVer() { - return this.innerModel().maxSupportedVer(); + public List supportedVersions() { + List inner = this.innerModel().supportedVersions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } - public String detailsUri() { - return this.innerModel().detailsUri(); + public String details() { + return this.innerModel().details(); } public ProvisioningState provisioningState() { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusClientImpl.java index ba9706b94a501..6d32b1f329b6f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricSkusClientImpl.java @@ -94,13 +94,13 @@ Mono> listBySubscriptionNext( /** * Gets a Network Fabric Sku. * - *

Implements Network Fabric Sku GET method. + *

Implements Network Fabric SKU GET method. * - * @param networkFabricSkuName Name of the Network Fabric Sku. + * @param networkFabricSkuName Name of the Network Fabric SKU. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricSku resource definition along with {@link Response} on successful completion of {@link + * @return the Network Fabric SKU resource definition along with {@link Response} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -139,14 +139,14 @@ private Mono> getWithResponseAsync(String networ /** * Gets a Network Fabric Sku. * - *

Implements Network Fabric Sku GET method. + *

Implements Network Fabric SKU GET method. * - * @param networkFabricSkuName Name of the Network Fabric Sku. + * @param networkFabricSkuName Name of the Network Fabric SKU. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricSku resource definition along with {@link Response} on successful completion of {@link + * @return the Network Fabric SKU resource definition along with {@link Response} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -182,13 +182,13 @@ private Mono> getWithResponseAsync(String networ /** * Gets a Network Fabric Sku. * - *

Implements Network Fabric Sku GET method. + *

Implements Network Fabric SKU GET method. * - * @param networkFabricSkuName Name of the Network Fabric Sku. + * @param networkFabricSkuName Name of the Network Fabric SKU. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricSku resource definition on successful completion of {@link Mono}. + * @return the Network Fabric SKU resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String networkFabricSkuName) { @@ -198,14 +198,14 @@ private Mono getAsync(String networkFabricSkuName) { /** * Gets a Network Fabric Sku. * - *

Implements Network Fabric Sku GET method. + *

Implements Network Fabric SKU GET method. * - * @param networkFabricSkuName Name of the Network Fabric Sku. + * @param networkFabricSkuName Name of the Network Fabric SKU. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricSku resource definition along with {@link Response}. + * @return the Network Fabric SKU resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String networkFabricSkuName, Context context) { @@ -215,13 +215,13 @@ public Response getWithResponse(String networkFabricSkuNa /** * Gets a Network Fabric Sku. * - *

Implements Network Fabric Sku GET method. + *

Implements Network Fabric SKU GET method. * - * @param networkFabricSkuName Name of the Network Fabric Sku. + * @param networkFabricSkuName Name of the Network Fabric SKU. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricSku resource definition. + * @return the Network Fabric SKU resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkFabricSkuInner get(String networkFabricSkuName) { @@ -229,13 +229,13 @@ public NetworkFabricSkuInner get(String networkFabricSkuName) { } /** - * List NetworkFabricSkus by subscription. + * List Network Fabric SKUs by subscription. * - *

Implements NetworkFabricSkus list by subscription GET method. + *

Implements Network Fabric SKUs list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricSkus along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Fabric SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -275,15 +275,15 @@ private Mono> listSinglePageAsync() { } /** - * List NetworkFabricSkus by subscription. + * List Network Fabric SKUs by subscription. * - *

Implements NetworkFabricSkus list by subscription GET method. + *

Implements Network Fabric SKUs list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricSkus along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Fabric SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -320,13 +320,13 @@ private Mono> listSinglePageAsync(Context c } /** - * List NetworkFabricSkus by subscription. + * List Network Fabric SKUs by subscription. * - *

Implements NetworkFabricSkus list by subscription GET method. + *

Implements Network Fabric SKUs list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricSkus as paginated response with {@link PagedFlux}. + * @return list of Network Fabric SKUs as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -335,15 +335,15 @@ private PagedFlux listAsync() { } /** - * List NetworkFabricSkus by subscription. + * List Network Fabric SKUs by subscription. * - *

Implements NetworkFabricSkus list by subscription GET method. + *

Implements Network Fabric SKUs list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricSkus as paginated response with {@link PagedFlux}. + * @return list of Network Fabric SKUs as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -352,13 +352,13 @@ private PagedFlux listAsync(Context context) { } /** - * List NetworkFabricSkus by subscription. + * List Network Fabric SKUs by subscription. * - *

Implements NetworkFabricSkus list by subscription GET method. + *

Implements Network Fabric SKUs list by subscription GET method. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricSkus as paginated response with {@link PagedIterable}. + * @return list of Network Fabric SKUs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -366,15 +366,15 @@ public PagedIterable list() { } /** - * List NetworkFabricSkus by subscription. + * List Network Fabric SKUs by subscription. * - *

Implements NetworkFabricSkus list by subscription GET method. + *

Implements Network Fabric SKUs list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricSkus as paginated response with {@link PagedIterable}. + * @return list of Network Fabric SKUs as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -389,7 +389,7 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricSkus along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Fabric SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -427,7 +427,7 @@ private Mono> listBySubscriptionNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricSkus along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Fabric SKUs along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsClientImpl.java index 71b01910401bc..c3c6d7ac6e682 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsClientImpl.java @@ -34,9 +34,15 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatchParameters; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatch; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricsListResult; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -107,14 +113,14 @@ Mono>> update( @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @PathParam("networkFabricName") String networkFabricName, - @BodyParam("application/json") NetworkFabricPatchParameters body, + @BodyParam("application/json") NetworkFabricPatch body, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}") - @ExpectedResponses({200, 202, 204}) + @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @HostParam("$host") String endpoint, @@ -152,7 +158,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/provision") - @ExpectedResponses({202}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> provision( @HostParam("$host") String endpoint, @@ -166,7 +172,7 @@ Mono>> provision( @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/deprovision") - @ExpectedResponses({202}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> deprovision( @HostParam("$host") String endpoint, @@ -177,6 +183,108 @@ Mono>> deprovision( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/upgrade") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> upgrade( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkFabricName") String networkFabricName, + @BodyParam("application/json") UpdateVersion body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/refreshConfiguration") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> refreshConfiguration( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkFabricName") String networkFabricName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateWorkloadManagementBfdConfiguration") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateWorkloadManagementBfdConfiguration( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkFabricName") String networkFabricName, + @BodyParam("application/json") UpdateAdministrativeState body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateInfraManagementBfdConfiguration") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateInfraManagementBfdConfiguration( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkFabricName") String networkFabricName, + @BodyParam("application/json") UpdateAdministrativeState body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/validateConfiguration") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> validateConfiguration( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkFabricName") String networkFabricName, + @BodyParam("application/json") ValidateConfigurationProperties body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/getTopology") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> getTopology( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkFabricName") String networkFabricName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitConfiguration") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> commitConfiguration( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkFabricName") String networkFabricName, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -209,7 +317,7 @@ Mono> listBySubscriptionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabric resource definition along with {@link Response} on successful completion of {@link + * @return the Network Fabric resource definition along with {@link Response} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -269,7 +377,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabric resource definition along with {@link Response} on successful completion of {@link + * @return the Network Fabric resource definition along with {@link Response} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -325,7 +433,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkFabric resource definition. + * @return the {@link PollerFlux} for polling of the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkFabricInner> beginCreateAsync( @@ -353,7 +461,7 @@ private PollerFlux, NetworkFabricInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkFabric resource definition. + * @return the {@link PollerFlux} for polling of the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkFabricInner> beginCreateAsync( @@ -378,7 +486,7 @@ private PollerFlux, NetworkFabricInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkFabric resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkFabricInner> beginCreate( @@ -398,7 +506,7 @@ public SyncPoller, NetworkFabricInner> beginCreat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkFabric resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkFabricInner> beginCreate( @@ -417,7 +525,7 @@ public SyncPoller, NetworkFabricInner> beginCreat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabric resource definition on successful completion of {@link Mono}. + * @return the Network Fabric resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -439,7 +547,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabric resource definition on successful completion of {@link Mono}. + * @return the Network Fabric resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -460,7 +568,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabric resource definition. + * @return the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkFabricInner create(String resourceGroupName, String networkFabricName, NetworkFabricInner body) { @@ -479,7 +587,7 @@ public NetworkFabricInner create(String resourceGroupName, String networkFabricN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabric resource definition. + * @return the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkFabricInner create( @@ -652,12 +760,12 @@ public NetworkFabricInner getByResourceGroup(String resourceGroupName, String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabric resource definition along with {@link Response} on successful completion of {@link + * @return the Network Fabric resource definition along with {@link Response} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( - String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body) { + String resourceGroupName, String networkFabricName, NetworkFabricPatch body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -712,12 +820,12 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabric resource definition along with {@link Response} on successful completion of {@link + * @return the Network Fabric resource definition along with {@link Response} on successful completion of {@link * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( - String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body, Context context) { + String resourceGroupName, String networkFabricName, NetworkFabricPatch body, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -768,11 +876,11 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkFabric resource definition. + * @return the {@link PollerFlux} for polling of the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkFabricInner> beginUpdateAsync( - String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body) { + String resourceGroupName, String networkFabricName, NetworkFabricPatch body) { Mono>> mono = updateWithResponseAsync(resourceGroupName, networkFabricName, body); return this .client @@ -796,11 +904,11 @@ private PollerFlux, NetworkFabricInner> beginUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkFabric resource definition. + * @return the {@link PollerFlux} for polling of the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkFabricInner> beginUpdateAsync( - String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body, Context context) { + String resourceGroupName, String networkFabricName, NetworkFabricPatch body, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateWithResponseAsync(resourceGroupName, networkFabricName, body, context); @@ -821,11 +929,11 @@ private PollerFlux, NetworkFabricInner> beginUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkFabric resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkFabricInner> beginUpdate( - String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body) { + String resourceGroupName, String networkFabricName, NetworkFabricPatch body) { return this.beginUpdateAsync(resourceGroupName, networkFabricName, body).getSyncPoller(); } @@ -841,11 +949,11 @@ public SyncPoller, NetworkFabricInner> beginUpdat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkFabric resource definition. + * @return the {@link SyncPoller} for polling of the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkFabricInner> beginUpdate( - String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body, Context context) { + String resourceGroupName, String networkFabricName, NetworkFabricPatch body, Context context) { return this.beginUpdateAsync(resourceGroupName, networkFabricName, body, context).getSyncPoller(); } @@ -860,11 +968,11 @@ public SyncPoller, NetworkFabricInner> beginUpdat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabric resource definition on successful completion of {@link Mono}. + * @return the Network Fabric resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( - String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body) { + String resourceGroupName, String networkFabricName, NetworkFabricPatch body) { return beginUpdateAsync(resourceGroupName, networkFabricName, body) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -882,11 +990,11 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabric resource definition on successful completion of {@link Mono}. + * @return the Network Fabric resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( - String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body, Context context) { + String resourceGroupName, String networkFabricName, NetworkFabricPatch body, Context context) { return beginUpdateAsync(resourceGroupName, networkFabricName, body, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -903,11 +1011,10 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabric resource definition. + * @return the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkFabricInner update( - String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body) { + public NetworkFabricInner update(String resourceGroupName, String networkFabricName, NetworkFabricPatch body) { return updateAsync(resourceGroupName, networkFabricName, body).block(); } @@ -923,11 +1030,11 @@ public NetworkFabricInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabric resource definition. + * @return the Network Fabric resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkFabricInner update( - String resourceGroupName, String networkFabricName, NetworkFabricPatchParameters body, Context context) { + String resourceGroupName, String networkFabricName, NetworkFabricPatch body, Context context) { return updateAsync(resourceGroupName, networkFabricName, body, context).block(); } @@ -1184,7 +1291,7 @@ public void delete(String resourceGroupName, String networkFabricName, Context c } /** - * List NetworkFabrics by resource group. + * List Network Fabrics by resource group. * *

List all the Network Fabric resources in the given resource group. * @@ -1192,7 +1299,7 @@ public void delete(String resourceGroupName, String networkFabricName, Context c * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -1237,7 +1344,7 @@ private Mono> listByResourceGroupSinglePageAsy } /** - * List NetworkFabrics by resource group. + * List Network Fabrics by resource group. * *

List all the Network Fabric resources in the given resource group. * @@ -1246,7 +1353,7 @@ private Mono> listByResourceGroupSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1289,7 +1396,7 @@ private Mono> listByResourceGroupSinglePageAsy } /** - * List NetworkFabrics by resource group. + * List Network Fabrics by resource group. * *

List all the Network Fabric resources in the given resource group. * @@ -1297,7 +1404,7 @@ private Mono> listByResourceGroupSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics as paginated response with {@link PagedFlux}. + * @return list of Network Fabrics as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1307,7 +1414,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGr } /** - * List NetworkFabrics by resource group. + * List Network Fabrics by resource group. * *

List all the Network Fabric resources in the given resource group. * @@ -1316,7 +1423,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics as paginated response with {@link PagedFlux}. + * @return list of Network Fabrics as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -1326,7 +1433,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGr } /** - * List NetworkFabrics by resource group. + * List Network Fabrics by resource group. * *

List all the Network Fabric resources in the given resource group. * @@ -1334,7 +1441,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics as paginated response with {@link PagedIterable}. + * @return list of Network Fabrics as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1342,7 +1449,7 @@ public PagedIterable listByResourceGroup(String resourceGrou } /** - * List NetworkFabrics by resource group. + * List Network Fabrics by resource group. * *

List all the Network Fabric resources in the given resource group. * @@ -1351,7 +1458,7 @@ public PagedIterable listByResourceGroup(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics as paginated response with {@link PagedIterable}. + * @return list of Network Fabrics as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -1359,13 +1466,13 @@ public PagedIterable listByResourceGroup(String resourceGrou } /** - * List NetworkFabrics by subscription. + * List Network Fabrics by subscription. * *

List all the Network Fabric resources in the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1405,7 +1512,7 @@ private Mono> listSinglePageAsync() { } /** - * List NetworkFabrics by subscription. + * List Network Fabrics by subscription. * *

List all the Network Fabric resources in the given subscription. * @@ -1413,7 +1520,7 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1450,13 +1557,13 @@ private Mono> listSinglePageAsync(Context cont } /** - * List NetworkFabrics by subscription. + * List Network Fabrics by subscription. * *

List all the Network Fabric resources in the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics as paginated response with {@link PagedFlux}. + * @return list of Network Fabrics as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1465,7 +1572,7 @@ private PagedFlux listAsync() { } /** - * List NetworkFabrics by subscription. + * List Network Fabrics by subscription. * *

List all the Network Fabric resources in the given subscription. * @@ -1473,7 +1580,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics as paginated response with {@link PagedFlux}. + * @return list of Network Fabrics as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1482,13 +1589,13 @@ private PagedFlux listAsync(Context context) { } /** - * List NetworkFabrics by subscription. + * List Network Fabrics by subscription. * *

List all the Network Fabric resources in the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics as paginated response with {@link PagedIterable}. + * @return list of Network Fabrics as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1496,7 +1603,7 @@ public PagedIterable list() { } /** - * List NetworkFabrics by subscription. + * List Network Fabrics by subscription. * *

List all the Network Fabric resources in the given subscription. * @@ -1504,7 +1611,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics as paginated response with {@link PagedIterable}. + * @return list of Network Fabrics as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -1517,11 +1624,11 @@ public PagedIterable list(Context context) { *

Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> provisionWithResponseAsync( @@ -1568,12 +1675,12 @@ private Mono>> provisionWithResponseAsync( *

Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> provisionWithResponseAsync( @@ -1617,19 +1724,25 @@ private Mono>> provisionWithResponseAsync( *

Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginProvisionAsync(String resourceGroupName, String networkFabricName) { + private PollerFlux< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginProvisionAsync(String resourceGroupName, String networkFabricName) { Mono>> mono = provisionWithResponseAsync(resourceGroupName, networkFabricName); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, + this.client.getContext()); } /** @@ -1638,22 +1751,28 @@ private PollerFlux, Void> beginProvisionAsync(String resourceGr *

Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginProvisionAsync( - String resourceGroupName, String networkFabricName, Context context) { + private PollerFlux< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginProvisionAsync(String resourceGroupName, String networkFabricName, Context context) { context = this.client.mergeContext(context); Mono>> mono = provisionWithResponseAsync(resourceGroupName, networkFabricName, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, + context); } /** @@ -1662,14 +1781,16 @@ private PollerFlux, Void> beginProvisionAsync( *

Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginProvision(String resourceGroupName, String networkFabricName) { + public SyncPoller< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginProvision(String resourceGroupName, String networkFabricName) { return this.beginProvisionAsync(resourceGroupName, networkFabricName).getSyncPoller(); } @@ -1679,16 +1800,17 @@ public SyncPoller, Void> beginProvision(String resourceGroupNam *

Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginProvision( - String resourceGroupName, String networkFabricName, Context context) { + public SyncPoller< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginProvision(String resourceGroupName, String networkFabricName, Context context) { return this.beginProvisionAsync(resourceGroupName, networkFabricName, context).getSyncPoller(); } @@ -1698,14 +1820,15 @@ public SyncPoller, Void> beginProvision( *

Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for device updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono provisionAsync(String resourceGroupName, String networkFabricName) { + private Mono provisionAsync( + String resourceGroupName, String networkFabricName) { return beginProvisionAsync(resourceGroupName, networkFabricName) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1717,15 +1840,16 @@ private Mono provisionAsync(String resourceGroupName, String networkFabric *

Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for device updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono provisionAsync(String resourceGroupName, String networkFabricName, Context context) { + private Mono provisionAsync( + String resourceGroupName, String networkFabricName, Context context) { return beginProvisionAsync(resourceGroupName, networkFabricName, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1737,14 +1861,15 @@ private Mono provisionAsync(String resourceGroupName, String networkFabric *

Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void provision(String resourceGroupName, String networkFabricName) { - provisionAsync(resourceGroupName, networkFabricName).block(); + public CommonPostActionResponseForDeviceUpdateInner provision(String resourceGroupName, String networkFabricName) { + return provisionAsync(resourceGroupName, networkFabricName).block(); } /** @@ -1753,15 +1878,17 @@ public void provision(String resourceGroupName, String networkFabricName) { *

Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void provision(String resourceGroupName, String networkFabricName, Context context) { - provisionAsync(resourceGroupName, networkFabricName, context).block(); + public CommonPostActionResponseForDeviceUpdateInner provision( + String resourceGroupName, String networkFabricName, Context context) { + return provisionAsync(resourceGroupName, networkFabricName, context).block(); } /** @@ -1770,11 +1897,11 @@ public void provision(String resourceGroupName, String networkFabricName, Contex *

Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deprovisionWithResponseAsync( @@ -1821,12 +1948,12 @@ private Mono>> deprovisionWithResponseAsync( *

Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deprovisionWithResponseAsync( @@ -1870,20 +1997,25 @@ private Mono>> deprovisionWithResponseAsync( *

Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeprovisionAsync( - String resourceGroupName, String networkFabricName) { + private PollerFlux< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginDeprovisionAsync(String resourceGroupName, String networkFabricName) { Mono>> mono = deprovisionWithResponseAsync(resourceGroupName, networkFabricName); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, + this.client.getContext()); } /** @@ -1892,22 +2024,28 @@ private PollerFlux, Void> beginDeprovisionAsync( *

Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeprovisionAsync( - String resourceGroupName, String networkFabricName, Context context) { + private PollerFlux< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginDeprovisionAsync(String resourceGroupName, String networkFabricName, Context context) { context = this.client.mergeContext(context); Mono>> mono = deprovisionWithResponseAsync(resourceGroupName, networkFabricName, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, + context); } /** @@ -1916,14 +2054,16 @@ private PollerFlux, Void> beginDeprovisionAsync( *

Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeprovision(String resourceGroupName, String networkFabricName) { + public SyncPoller< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginDeprovision(String resourceGroupName, String networkFabricName) { return this.beginDeprovisionAsync(resourceGroupName, networkFabricName).getSyncPoller(); } @@ -1933,16 +2073,17 @@ public SyncPoller, Void> beginDeprovision(String resourceGroupN *

Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for device updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeprovision( - String resourceGroupName, String networkFabricName, Context context) { + public SyncPoller< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginDeprovision(String resourceGroupName, String networkFabricName, Context context) { return this.beginDeprovisionAsync(resourceGroupName, networkFabricName, context).getSyncPoller(); } @@ -1952,14 +2093,15 @@ public SyncPoller, Void> beginDeprovision( *

Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for device updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deprovisionAsync(String resourceGroupName, String networkFabricName) { + private Mono deprovisionAsync( + String resourceGroupName, String networkFabricName) { return beginDeprovisionAsync(resourceGroupName, networkFabricName) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1971,15 +2113,16 @@ private Mono deprovisionAsync(String resourceGroupName, String networkFabr *

Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for device updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deprovisionAsync(String resourceGroupName, String networkFabricName, Context context) { + private Mono deprovisionAsync( + String resourceGroupName, String networkFabricName, Context context) { return beginDeprovisionAsync(resourceGroupName, networkFabricName, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -1991,14 +2134,16 @@ private Mono deprovisionAsync(String resourceGroupName, String networkFabr *

Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deprovision(String resourceGroupName, String networkFabricName) { - deprovisionAsync(resourceGroupName, networkFabricName).block(); + public CommonPostActionResponseForDeviceUpdateInner deprovision( + String resourceGroupName, String networkFabricName) { + return deprovisionAsync(resourceGroupName, networkFabricName).block(); } /** @@ -2007,15 +2152,2083 @@ public void deprovision(String resourceGroupName, String networkFabricName) { *

Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForDeviceUpdateInner deprovision( + String resourceGroupName, String networkFabricName, Context context) { + return deprovisionAsync(resourceGroupName, networkFabricName, context).block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> upgradeWithResponseAsync( + String resourceGroupName, String networkFabricName, UpdateVersion body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .upgrade( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deprovision(String resourceGroupName, String networkFabricName, Context context) { - deprovisionAsync(resourceGroupName, networkFabricName, context).block(); + private Mono>> upgradeWithResponseAsync( + String resourceGroupName, String networkFabricName, UpdateVersion body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .upgrade( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + body, + accept, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpgradeAsync(String resourceGroupName, String networkFabricName, UpdateVersion body) { + Mono>> mono = upgradeWithResponseAsync(resourceGroupName, networkFabricName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); + } + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpgradeAsync(String resourceGroupName, String networkFabricName, UpdateVersion body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + upgradeWithResponseAsync(resourceGroupName, networkFabricName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpgrade(String resourceGroupName, String networkFabricName, UpdateVersion body) { + return this.beginUpgradeAsync(resourceGroupName, networkFabricName, body).getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpgrade(String resourceGroupName, String networkFabricName, UpdateVersion body, Context context) { + return this.beginUpgradeAsync(resourceGroupName, networkFabricName, body, context).getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono upgradeAsync( + String resourceGroupName, String networkFabricName, UpdateVersion body) { + return beginUpgradeAsync(resourceGroupName, networkFabricName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono upgradeAsync( + String resourceGroupName, String networkFabricName, UpdateVersion body, Context context) { + return beginUpgradeAsync(resourceGroupName, networkFabricName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner upgrade( + String resourceGroupName, String networkFabricName, UpdateVersion body) { + return upgradeAsync(resourceGroupName, networkFabricName, body).block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner upgrade( + String resourceGroupName, String networkFabricName, UpdateVersion body, Context context) { + return upgradeAsync(resourceGroupName, networkFabricName, body, context).block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> refreshConfigurationWithResponseAsync( + String resourceGroupName, String networkFabricName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .refreshConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> refreshConfigurationWithResponseAsync( + String resourceGroupName, String networkFabricName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .refreshConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + accept, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginRefreshConfigurationAsync(String resourceGroupName, String networkFabricName) { + Mono>> mono = + refreshConfigurationWithResponseAsync(resourceGroupName, networkFabricName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); + } + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginRefreshConfigurationAsync(String resourceGroupName, String networkFabricName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + refreshConfigurationWithResponseAsync(resourceGroupName, networkFabricName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginRefreshConfiguration(String resourceGroupName, String networkFabricName) { + return this.beginRefreshConfigurationAsync(resourceGroupName, networkFabricName).getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginRefreshConfiguration(String resourceGroupName, String networkFabricName, Context context) { + return this.beginRefreshConfigurationAsync(resourceGroupName, networkFabricName, context).getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono refreshConfigurationAsync( + String resourceGroupName, String networkFabricName) { + return beginRefreshConfigurationAsync(resourceGroupName, networkFabricName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono refreshConfigurationAsync( + String resourceGroupName, String networkFabricName, Context context) { + return beginRefreshConfigurationAsync(resourceGroupName, networkFabricName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner refreshConfiguration( + String resourceGroupName, String networkFabricName) { + return refreshConfigurationAsync(resourceGroupName, networkFabricName).block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner refreshConfiguration( + String resourceGroupName, String networkFabricName, Context context) { + return refreshConfigurationAsync(resourceGroupName, networkFabricName, context).block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWorkloadManagementBfdConfigurationWithResponseAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateWorkloadManagementBfdConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWorkloadManagementBfdConfigurationWithResponseAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateWorkloadManagementBfdConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + body, + accept, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateWorkloadManagementBfdConfigurationAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + Mono>> mono = + updateWorkloadManagementBfdConfigurationWithResponseAsync(resourceGroupName, networkFabricName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateWorkloadManagementBfdConfigurationAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWorkloadManagementBfdConfigurationWithResponseAsync( + resourceGroupName, networkFabricName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateWorkloadManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + return this + .beginUpdateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body) + .getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateWorkloadManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { + return this + .beginUpdateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body, context) + .getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateWorkloadManagementBfdConfigurationAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + return beginUpdateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateWorkloadManagementBfdConfigurationAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { + return beginUpdateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + return updateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body).block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateWorkloadManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { + return updateWorkloadManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body, context) + .block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateInfraManagementBfdConfigurationWithResponseAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateInfraManagementBfdConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateInfraManagementBfdConfigurationWithResponseAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateInfraManagementBfdConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + body, + accept, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateInfraManagementBfdConfigurationAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + Mono>> mono = + updateInfraManagementBfdConfigurationWithResponseAsync(resourceGroupName, networkFabricName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateInfraManagementBfdConfigurationAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateInfraManagementBfdConfigurationWithResponseAsync(resourceGroupName, networkFabricName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateInfraManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + return this + .beginUpdateInfraManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body) + .getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateInfraManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { + return this + .beginUpdateInfraManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body, context) + .getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateInfraManagementBfdConfigurationAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + return beginUpdateInfraManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateInfraManagementBfdConfigurationAsync( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { + return beginUpdateInfraManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + return updateInfraManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body).block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateInfraManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { + return updateInfraManagementBfdConfigurationAsync(resourceGroupName, networkFabricName, body, context).block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateConfigurationWithResponseAsync( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .validateConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateConfigurationWithResponseAsync( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .validateConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + body, + accept, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ValidateConfigurationResponseInner> + beginValidateConfigurationAsync( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body) { + Mono>> mono = + validateConfigurationWithResponseAsync(resourceGroupName, networkFabricName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ValidateConfigurationResponseInner.class, + ValidateConfigurationResponseInner.class, + this.client.getContext()); + } + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ValidateConfigurationResponseInner> + beginValidateConfigurationAsync( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + validateConfigurationWithResponseAsync(resourceGroupName, networkFabricName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ValidateConfigurationResponseInner.class, + ValidateConfigurationResponseInner.class, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body) { + return this.beginValidateConfigurationAsync(resourceGroupName, networkFabricName, body).getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body, Context context) { + return this + .beginValidateConfigurationAsync(resourceGroupName, networkFabricName, body, context) + .getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateConfigurationAsync( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body) { + return beginValidateConfigurationAsync(resourceGroupName, networkFabricName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateConfigurationAsync( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body, Context context) { + return beginValidateConfigurationAsync(resourceGroupName, networkFabricName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body) { + return validateConfigurationAsync(resourceGroupName, networkFabricName, body).block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body, Context context) { + return validateConfigurationAsync(resourceGroupName, networkFabricName, body, context).block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return topology of the underlying resources in the given Network Fabric instance along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getTopologyWithResponseAsync( + String resourceGroupName, String networkFabricName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getTopology( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return topology of the underlying resources in the given Network Fabric instance along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getTopologyWithResponseAsync( + String resourceGroupName, String networkFabricName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getTopology( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + accept, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of topology of the underlying resources in the given Network Fabric + * instance. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ValidateConfigurationResponseInner> + beginGetTopologyAsync(String resourceGroupName, String networkFabricName) { + Mono>> mono = getTopologyWithResponseAsync(resourceGroupName, networkFabricName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ValidateConfigurationResponseInner.class, + ValidateConfigurationResponseInner.class, + this.client.getContext()); + } + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of topology of the underlying resources in the given Network Fabric + * instance. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ValidateConfigurationResponseInner> + beginGetTopologyAsync(String resourceGroupName, String networkFabricName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + getTopologyWithResponseAsync(resourceGroupName, networkFabricName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ValidateConfigurationResponseInner.class, + ValidateConfigurationResponseInner.class, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of topology of the underlying resources in the given Network Fabric + * instance. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ValidateConfigurationResponseInner> + beginGetTopology(String resourceGroupName, String networkFabricName) { + return this.beginGetTopologyAsync(resourceGroupName, networkFabricName).getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of topology of the underlying resources in the given Network Fabric + * instance. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ValidateConfigurationResponseInner> + beginGetTopology(String resourceGroupName, String networkFabricName, Context context) { + return this.beginGetTopologyAsync(resourceGroupName, networkFabricName, context).getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return topology of the underlying resources in the given Network Fabric instance on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getTopologyAsync( + String resourceGroupName, String networkFabricName) { + return beginGetTopologyAsync(resourceGroupName, networkFabricName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return topology of the underlying resources in the given Network Fabric instance on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getTopologyAsync( + String resourceGroupName, String networkFabricName, Context context) { + return beginGetTopologyAsync(resourceGroupName, networkFabricName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return topology of the underlying resources in the given Network Fabric instance. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidateConfigurationResponseInner getTopology(String resourceGroupName, String networkFabricName) { + return getTopologyAsync(resourceGroupName, networkFabricName).block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return topology of the underlying resources in the given Network Fabric instance. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidateConfigurationResponseInner getTopology( + String resourceGroupName, String networkFabricName, Context context) { + return getTopologyAsync(resourceGroupName, networkFabricName, context).block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> commitConfigurationWithResponseAsync( + String resourceGroupName, String networkFabricName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .commitConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> commitConfigurationWithResponseAsync( + String resourceGroupName, String networkFabricName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .commitConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + accept, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginCommitConfigurationAsync(String resourceGroupName, String networkFabricName) { + Mono>> mono = + commitConfigurationWithResponseAsync(resourceGroupName, networkFabricName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); + } + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginCommitConfigurationAsync(String resourceGroupName, String networkFabricName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + commitConfigurationWithResponseAsync(resourceGroupName, networkFabricName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginCommitConfiguration(String resourceGroupName, String networkFabricName) { + return this.beginCommitConfigurationAsync(resourceGroupName, networkFabricName).getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginCommitConfiguration(String resourceGroupName, String networkFabricName, Context context) { + return this.beginCommitConfigurationAsync(resourceGroupName, networkFabricName, context).getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono commitConfigurationAsync( + String resourceGroupName, String networkFabricName) { + return beginCommitConfigurationAsync(resourceGroupName, networkFabricName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono commitConfigurationAsync( + String resourceGroupName, String networkFabricName, Context context) { + return beginCommitConfigurationAsync(resourceGroupName, networkFabricName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner commitConfiguration( + String resourceGroupName, String networkFabricName) { + return commitConfigurationAsync(resourceGroupName, networkFabricName).block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner commitConfiguration( + String resourceGroupName, String networkFabricName, Context context) { + return commitConfigurationAsync(resourceGroupName, networkFabricName, context).block(); } /** @@ -2026,7 +4239,7 @@ public void deprovision(String resourceGroupName, String networkFabricName, Cont * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -2064,7 +4277,7 @@ private Mono> listByResourceGroupNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( @@ -2101,7 +4314,7 @@ private Mono> listByResourceGroupNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -2139,7 +4352,7 @@ private Mono> listBySubscriptionNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Fabrics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsImpl.java index 418f8f1dcc468..1033d27012399 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkFabricsImpl.java @@ -10,9 +10,18 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkFabricsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabric; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabrics; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; public final class NetworkFabricsImpl implements NetworkFabrics { private static final ClientLogger LOGGER = new ClientLogger(NetworkFabricsImpl.class); @@ -80,20 +89,203 @@ public PagedIterable list(Context context) { return Utils.mapPage(inner, inner1 -> new NetworkFabricImpl(inner1, this.manager())); } - public void provision(String resourceGroupName, String networkFabricName) { - this.serviceClient().provision(resourceGroupName, networkFabricName); + public CommonPostActionResponseForDeviceUpdate provision(String resourceGroupName, String networkFabricName) { + CommonPostActionResponseForDeviceUpdateInner inner = + this.serviceClient().provision(resourceGroupName, networkFabricName); + if (inner != null) { + return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void provision(String resourceGroupName, String networkFabricName, Context context) { - this.serviceClient().provision(resourceGroupName, networkFabricName, context); + public CommonPostActionResponseForDeviceUpdate provision( + String resourceGroupName, String networkFabricName, Context context) { + CommonPostActionResponseForDeviceUpdateInner inner = + this.serviceClient().provision(resourceGroupName, networkFabricName, context); + if (inner != null) { + return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void deprovision(String resourceGroupName, String networkFabricName) { - this.serviceClient().deprovision(resourceGroupName, networkFabricName); + public CommonPostActionResponseForDeviceUpdate deprovision(String resourceGroupName, String networkFabricName) { + CommonPostActionResponseForDeviceUpdateInner inner = + this.serviceClient().deprovision(resourceGroupName, networkFabricName); + if (inner != null) { + return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void deprovision(String resourceGroupName, String networkFabricName, Context context) { - this.serviceClient().deprovision(resourceGroupName, networkFabricName, context); + public CommonPostActionResponseForDeviceUpdate deprovision( + String resourceGroupName, String networkFabricName, Context context) { + CommonPostActionResponseForDeviceUpdateInner inner = + this.serviceClient().deprovision(resourceGroupName, networkFabricName, context); + if (inner != null) { + return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate upgrade( + String resourceGroupName, String networkFabricName, UpdateVersion body) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().upgrade(resourceGroupName, networkFabricName, body); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate upgrade( + String resourceGroupName, String networkFabricName, UpdateVersion body, Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().upgrade(resourceGroupName, networkFabricName, body, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate refreshConfiguration( + String resourceGroupName, String networkFabricName) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().refreshConfiguration(resourceGroupName, networkFabricName); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate refreshConfiguration( + String resourceGroupName, String networkFabricName, Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().refreshConfiguration(resourceGroupName, networkFabricName, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().updateWorkloadManagementBfdConfiguration(resourceGroupName, networkFabricName, body); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateWorkloadManagementBfdConfiguration(resourceGroupName, networkFabricName, body, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().updateInfraManagementBfdConfiguration(resourceGroupName, networkFabricName, body); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateInfraManagementBfdConfiguration(resourceGroupName, networkFabricName, body, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public ValidateConfigurationResponse validateConfiguration( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body) { + ValidateConfigurationResponseInner inner = + this.serviceClient().validateConfiguration(resourceGroupName, networkFabricName, body); + if (inner != null) { + return new ValidateConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ValidateConfigurationResponse validateConfiguration( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body, Context context) { + ValidateConfigurationResponseInner inner = + this.serviceClient().validateConfiguration(resourceGroupName, networkFabricName, body, context); + if (inner != null) { + return new ValidateConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ValidateConfigurationResponse getTopology(String resourceGroupName, String networkFabricName) { + ValidateConfigurationResponseInner inner = + this.serviceClient().getTopology(resourceGroupName, networkFabricName); + if (inner != null) { + return new ValidateConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ValidateConfigurationResponse getTopology( + String resourceGroupName, String networkFabricName, Context context) { + ValidateConfigurationResponseInner inner = + this.serviceClient().getTopology(resourceGroupName, networkFabricName, context); + if (inner != null) { + return new ValidateConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate commitConfiguration( + String resourceGroupName, String networkFabricName) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().commitConfiguration(resourceGroupName, networkFabricName); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate commitConfiguration( + String resourceGroupName, String networkFabricName, Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().commitConfiguration(resourceGroupName, networkFabricName, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } } public NetworkFabric getById(String id) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfaceImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfaceImpl.java index a9af60d85b476..94cc501e73871 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfaceImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfaceImpl.java @@ -7,8 +7,8 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; -import com.azure.resourcemanager.managednetworkfabric.models.InterfaceStatus; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.InterfaceType; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatch; @@ -41,14 +41,6 @@ public String physicalIdentifier() { return this.innerModel().physicalIdentifier(); } - public EnabledDisabledState administrativeState() { - return this.innerModel().administrativeState(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public String connectedTo() { return this.innerModel().connectedTo(); } @@ -65,6 +57,14 @@ public String ipv6Address() { return this.innerModel().ipv6Address(); } + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + public String annotation() { return this.innerModel().annotation(); } @@ -173,24 +173,15 @@ public NetworkInterface refresh(Context context) { return this; } - public InterfaceStatus getStatus() { - return serviceManager.networkInterfaces().getStatus(resourceGroupName, networkDeviceName, networkInterfaceName); - } - - public InterfaceStatus getStatus(Context context) { + public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body) { return serviceManager - .networkInterfaces() - .getStatus(resourceGroupName, networkDeviceName, networkInterfaceName, context); - } - - public void updateAdministrativeState(UpdateAdministrativeState body) { - serviceManager .networkInterfaces() .updateAdministrativeState(resourceGroupName, networkDeviceName, networkInterfaceName, body); } - public void updateAdministrativeState(UpdateAdministrativeState body, Context context) { - serviceManager + public CommonPostActionResponseForStateUpdate updateAdministrativeState( + UpdateAdministrativeState body, Context context) { + return serviceManager .networkInterfaces() .updateAdministrativeState(resourceGroupName, networkDeviceName, networkInterfaceName, body, context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesClientImpl.java index 6409c7680fc6a..4589096b50125 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesClientImpl.java @@ -34,7 +34,7 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InterfaceStatusInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatch; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacesList; @@ -119,7 +119,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}") - @ExpectedResponses({200, 202, 204}) + @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @HostParam("$host") String endpoint, @@ -136,7 +136,7 @@ Mono>> delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( + Mono> listByNetworkDevice( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -145,25 +145,10 @@ Mono> list( @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/getStatus") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> getStatus( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("networkDeviceName") String networkDeviceName, - @PathParam("networkInterfaceName") String networkInterfaceName, - @HeaderParam("Accept") String accept, - Context context); - @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/updateAdministrativeState") - @ExpectedResponses({202}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateAdministrativeState( @HostParam("$host") String endpoint, @@ -180,7 +165,7 @@ Mono>> updateAdministrativeState( @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( + Mono> listByNetworkDeviceNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, @@ -193,8 +178,8 @@ Mono> listNext( *

Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -258,8 +243,8 @@ private Mono>> createWithResponseAsync( *

Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -325,8 +310,8 @@ private Mono>> createWithResponseAsync( *

Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -354,8 +339,8 @@ private PollerFlux, NetworkInterfaceInner> beg *

Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -385,8 +370,8 @@ private PollerFlux, NetworkInterfaceInner> beg *

Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -405,8 +390,8 @@ public SyncPoller, NetworkInterfaceInner> begi *

Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -432,8 +417,8 @@ public SyncPoller, NetworkInterfaceInner> begi *

Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -454,8 +439,8 @@ private Mono createAsync( *

Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -481,8 +466,8 @@ private Mono createAsync( *

Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -501,8 +486,8 @@ public NetworkInterfaceInner create( *

Create a Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -526,8 +511,8 @@ public NetworkInterfaceInner create( *

Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -584,8 +569,8 @@ private Mono> getWithResponseAsync( *

Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -640,8 +625,8 @@ private Mono> getWithResponseAsync( *

Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -660,8 +645,8 @@ private Mono getAsync( *

Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -680,8 +665,8 @@ public Response getWithResponse( *

Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -698,8 +683,8 @@ public NetworkInterfaceInner get(String resourceGroupName, String networkDeviceN *

Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -763,8 +748,8 @@ private Mono>> updateWithResponseAsync( *

Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -830,8 +815,8 @@ private Mono>> updateWithResponseAsync( *

Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -859,8 +844,8 @@ private PollerFlux, NetworkInterfaceInner> beg *

Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -890,8 +875,8 @@ private PollerFlux, NetworkInterfaceInner> beg *

Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -910,8 +895,8 @@ public SyncPoller, NetworkInterfaceInner> begi *

Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -937,8 +922,8 @@ public SyncPoller, NetworkInterfaceInner> begi *

Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -959,8 +944,8 @@ private Mono updateAsync( *

Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -986,8 +971,8 @@ private Mono updateAsync( *

Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1006,8 +991,8 @@ public NetworkInterfaceInner update( *

Update certain properties of the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body NetworkInterface properties to update. Only tags are supported. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1031,8 +1016,8 @@ public NetworkInterfaceInner update( *

Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1088,8 +1073,8 @@ private Mono>> deleteWithResponseAsync( *

Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1143,8 +1128,8 @@ private Mono>> deleteWithResponseAsync( *

Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1167,8 +1152,8 @@ private PollerFlux, Void> beginDeleteAsync( *

Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1192,8 +1177,8 @@ private PollerFlux, Void> beginDeleteAsync( *

Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1211,8 +1196,8 @@ public SyncPoller, Void> beginDelete( *

Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1233,8 +1218,8 @@ public SyncPoller, Void> beginDelete( *

Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1253,8 +1238,8 @@ private Mono deleteAsync(String resourceGroupName, String networkDeviceNam *

Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1275,8 +1260,8 @@ private Mono deleteAsync( *

Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1292,8 +1277,8 @@ public void delete(String resourceGroupName, String networkDeviceName, String ne *

Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1311,14 +1296,14 @@ public void delete( *

List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of NetworkInterfaces along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listByNetworkDeviceSinglePageAsync( String resourceGroupName, String networkDeviceName) { if (this.client.getEndpoint() == null) { return Mono @@ -1345,7 +1330,7 @@ private Mono> listSinglePageAsync( .withContext( context -> service - .list( + .listByNetworkDevice( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1371,7 +1356,7 @@ private Mono> listSinglePageAsync( *

List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1379,7 +1364,7 @@ private Mono> listSinglePageAsync( * @return list of NetworkInterfaces along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( + private Mono> listByNetworkDeviceSinglePageAsync( String resourceGroupName, String networkDeviceName, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1404,7 +1389,7 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( + .listByNetworkDevice( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1429,17 +1414,18 @@ private Mono> listSinglePageAsync( *

List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of NetworkInterfaces as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String networkDeviceName) { + private PagedFlux listByNetworkDeviceAsync( + String resourceGroupName, String networkDeviceName) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, networkDeviceName), - nextLink -> listNextSinglePageAsync(nextLink)); + () -> listByNetworkDeviceSinglePageAsync(resourceGroupName, networkDeviceName), + nextLink -> listByNetworkDeviceNextSinglePageAsync(nextLink)); } /** @@ -1448,7 +1434,7 @@ private PagedFlux listAsync(String resourceGroupName, Str *

List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1456,11 +1442,11 @@ private PagedFlux listAsync(String resourceGroupName, Str * @return list of NetworkInterfaces as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( + private PagedFlux listByNetworkDeviceAsync( String resourceGroupName, String networkDeviceName, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, networkDeviceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + () -> listByNetworkDeviceSinglePageAsync(resourceGroupName, networkDeviceName, context), + nextLink -> listByNetworkDeviceNextSinglePageAsync(nextLink, context)); } /** @@ -1469,15 +1455,16 @@ private PagedFlux listAsync( *

List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of NetworkInterfaces as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String networkDeviceName) { - return new PagedIterable<>(listAsync(resourceGroupName, networkDeviceName)); + public PagedIterable listByNetworkDevice( + String resourceGroupName, String networkDeviceName) { + return new PagedIterable<>(listByNetworkDeviceAsync(resourceGroupName, networkDeviceName)); } /** @@ -1486,7 +1473,7 @@ public PagedIterable list(String resourceGroupName, Strin *

List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1494,300 +1481,9 @@ public PagedIterable list(String resourceGroupName, Strin * @return list of NetworkInterfaces as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( + public PagedIterable listByNetworkDevice( String resourceGroupName, String networkDeviceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, networkDeviceName, context)); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Interface along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getStatusWithResponseAsync( - String resourceGroupName, String networkDeviceName, String networkInterfaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (networkInterfaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getStatus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - networkDeviceName, - networkInterfaceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Interface along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> getStatusWithResponseAsync( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (networkDeviceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkDeviceName is required and cannot be null.")); - } - if (networkInterfaceName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getStatus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - networkDeviceName, - networkInterfaceName, - accept, - context); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the running status of the Network Interface. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InterfaceStatusInner> beginGetStatusAsync( - String resourceGroupName, String networkDeviceName, String networkInterfaceName) { - Mono>> mono = - getStatusWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - InterfaceStatusInner.class, - InterfaceStatusInner.class, - this.client.getContext()); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the running status of the Network Interface. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, InterfaceStatusInner> beginGetStatusAsync( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - getStatusWithResponseAsync(resourceGroupName, networkDeviceName, networkInterfaceName, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), InterfaceStatusInner.class, InterfaceStatusInner.class, context); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the running status of the Network Interface. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InterfaceStatusInner> beginGetStatus( - String resourceGroupName, String networkDeviceName, String networkInterfaceName) { - return this.beginGetStatusAsync(resourceGroupName, networkDeviceName, networkInterfaceName).getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the running status of the Network Interface. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, InterfaceStatusInner> beginGetStatus( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context) { - return this - .beginGetStatusAsync(resourceGroupName, networkDeviceName, networkInterfaceName, context) - .getSyncPoller(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Interface on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getStatusAsync( - String resourceGroupName, String networkDeviceName, String networkInterfaceName) { - return beginGetStatusAsync(resourceGroupName, networkDeviceName, networkInterfaceName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Interface on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getStatusAsync( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context) { - return beginGetStatusAsync(resourceGroupName, networkDeviceName, networkInterfaceName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Interface. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InterfaceStatusInner getStatus( - String resourceGroupName, String networkDeviceName, String networkInterfaceName) { - return getStatusAsync(resourceGroupName, networkDeviceName, networkInterfaceName).block(); - } - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Interface. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public InterfaceStatusInner getStatus( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context) { - return getStatusAsync(resourceGroupName, networkDeviceName, networkInterfaceName, context).block(); + return new PagedIterable<>(listByNetworkDeviceAsync(resourceGroupName, networkDeviceName, context)); } /** @@ -1796,13 +1492,14 @@ public InterfaceStatusInner getStatus( *

Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync( @@ -1863,14 +1560,15 @@ private Mono>> updateAdministrativeStateWithResponseAs *

Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateAdministrativeStateWithResponseAsync( @@ -1929,27 +1627,33 @@ private Mono>> updateAdministrativeStateWithResponseAs *

Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAdministrativeStateAsync( - String resourceGroupName, - String networkDeviceName, - String networkInterfaceName, - UpdateAdministrativeState body) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, + String networkDeviceName, + String networkInterfaceName, + UpdateAdministrativeState body) { Mono>> mono = updateAdministrativeStateWithResponseAsync( resourceGroupName, networkDeviceName, networkInterfaceName, body); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); } /** @@ -1958,29 +1662,36 @@ private PollerFlux, Void> beginUpdateAdministrativeStateAsync( *

Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAdministrativeStateAsync( - String resourceGroupName, - String networkDeviceName, - String networkInterfaceName, - UpdateAdministrativeState body, - Context context) { + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, + String networkDeviceName, + String networkInterfaceName, + UpdateAdministrativeState body, + Context context) { context = this.client.mergeContext(context); Mono>> mono = updateAdministrativeStateWithResponseAsync( resourceGroupName, networkDeviceName, networkInterfaceName, body, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); } /** @@ -1989,20 +1700,22 @@ private PollerFlux, Void> beginUpdateAdministrativeStateAsync( *

Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, - String networkDeviceName, - String networkInterfaceName, - UpdateAdministrativeState body) { + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, + String networkDeviceName, + String networkInterfaceName, + UpdateAdministrativeState body) { return this .beginUpdateAdministrativeStateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body) .getSyncPoller(); @@ -2014,22 +1727,24 @@ public SyncPoller, Void> beginUpdateAdministrativeState( *

Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of common response for the state updates. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdateAdministrativeState( - String resourceGroupName, - String networkDeviceName, - String networkInterfaceName, - UpdateAdministrativeState body, - Context context) { + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, + String networkDeviceName, + String networkInterfaceName, + UpdateAdministrativeState body, + Context context) { return this .beginUpdateAdministrativeStateAsync( resourceGroupName, networkDeviceName, networkInterfaceName, body, context) @@ -2042,16 +1757,16 @@ public SyncPoller, Void> beginUpdateAdministrativeState( *

Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync( + private Mono updateAdministrativeStateAsync( String resourceGroupName, String networkDeviceName, String networkInterfaceName, @@ -2067,17 +1782,17 @@ private Mono updateAdministrativeStateAsync( *

Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return common response for the state updates on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAdministrativeStateAsync( + private Mono updateAdministrativeStateAsync( String resourceGroupName, String networkDeviceName, String networkInterfaceName, @@ -2095,20 +1810,21 @@ private Mono updateAdministrativeStateAsync( *

Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateAdministrativeState( + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState( String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body) { - updateAdministrativeStateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body).block(); + return updateAdministrativeStateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body).block(); } /** @@ -2117,22 +1833,23 @@ public void updateAdministrativeState( *

Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void updateAdministrativeState( + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState( String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body, Context context) { - updateAdministrativeStateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context) + return updateAdministrativeStateAsync(resourceGroupName, networkDeviceName, networkInterfaceName, body, context) .block(); } @@ -2147,7 +1864,7 @@ public void updateAdministrativeState( * @return list of NetworkInterfaces along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listByNetworkDeviceNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2159,7 +1876,8 @@ private Mono> listNextSinglePageAsync(Strin } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext( + context -> service.listByNetworkDeviceNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( res -> new PagedResponseBase<>( @@ -2184,7 +1902,8 @@ private Mono> listNextSinglePageAsync(Strin * @return list of NetworkInterfaces along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByNetworkDeviceNextSinglePageAsync( + String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2197,7 +1916,7 @@ private Mono> listNextSinglePageAsync(Strin final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) + .listByNetworkDeviceNext(nextLink, this.client.getEndpoint(), accept, context) .map( res -> new PagedResponseBase<>( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesImpl.java index 06b30775d217c..49cdc0a1d4b96 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkInterfacesImpl.java @@ -10,9 +10,9 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkInterfacesClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InterfaceStatusInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner; -import com.azure.resourcemanager.managednetworkfabric.models.InterfaceStatus; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfaces; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; @@ -65,57 +65,50 @@ public void delete( this.serviceClient().delete(resourceGroupName, networkDeviceName, networkInterfaceName, context); } - public PagedIterable list(String resourceGroupName, String networkDeviceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, networkDeviceName); + public PagedIterable listByNetworkDevice(String resourceGroupName, String networkDeviceName) { + PagedIterable inner = + this.serviceClient().listByNetworkDevice(resourceGroupName, networkDeviceName); return Utils.mapPage(inner, inner1 -> new NetworkInterfaceImpl(inner1, this.manager())); } - public PagedIterable list(String resourceGroupName, String networkDeviceName, Context context) { + public PagedIterable listByNetworkDevice( + String resourceGroupName, String networkDeviceName, Context context) { PagedIterable inner = - this.serviceClient().list(resourceGroupName, networkDeviceName, context); + this.serviceClient().listByNetworkDevice(resourceGroupName, networkDeviceName, context); return Utils.mapPage(inner, inner1 -> new NetworkInterfaceImpl(inner1, this.manager())); } - public InterfaceStatus getStatus(String resourceGroupName, String networkDeviceName, String networkInterfaceName) { - InterfaceStatusInner inner = - this.serviceClient().getStatus(resourceGroupName, networkDeviceName, networkInterfaceName); - if (inner != null) { - return new InterfaceStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public InterfaceStatus getStatus( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context) { - InterfaceStatusInner inner = - this.serviceClient().getStatus(resourceGroupName, networkDeviceName, networkInterfaceName, context); - if (inner != null) { - return new InterfaceStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public void updateAdministrativeState( + public CommonPostActionResponseForStateUpdate updateAdministrativeState( String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body) { - this - .serviceClient() - .updateAdministrativeState(resourceGroupName, networkDeviceName, networkInterfaceName, body); + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateAdministrativeState(resourceGroupName, networkDeviceName, networkInterfaceName, body); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } } - public void updateAdministrativeState( + public CommonPostActionResponseForStateUpdate updateAdministrativeState( String resourceGroupName, String networkDeviceName, String networkInterfaceName, UpdateAdministrativeState body, Context context) { - this - .serviceClient() - .updateAdministrativeState(resourceGroupName, networkDeviceName, networkInterfaceName, body, context); + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateAdministrativeState(resourceGroupName, networkDeviceName, networkInterfaceName, body, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } } public NetworkInterface getById(String id) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokerImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokerImpl.java new file mode 100644 index 0000000000000..049b8220d1359 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokerImpl.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBroker; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerPatch; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class NetworkPacketBrokerImpl + implements NetworkPacketBroker, NetworkPacketBroker.Definition, NetworkPacketBroker.Update { + private NetworkPacketBrokerInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String networkFabricId() { + return this.innerModel().networkFabricId(); + } + + public List networkDeviceIds() { + List inner = this.innerModel().networkDeviceIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List sourceInterfaceIds() { + List inner = this.innerModel().sourceInterfaceIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List networkTapIds() { + List inner = this.innerModel().networkTapIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List neighborGroupIds() { + List inner = this.innerModel().neighborGroupIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public NetworkPacketBrokerInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String networkPacketBrokerName; + + private NetworkPacketBrokerPatch updateBody; + + public NetworkPacketBrokerImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public NetworkPacketBroker create() { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkPacketBrokers() + .create(resourceGroupName, networkPacketBrokerName, this.innerModel(), Context.NONE); + return this; + } + + public NetworkPacketBroker create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkPacketBrokers() + .create(resourceGroupName, networkPacketBrokerName, this.innerModel(), context); + return this; + } + + NetworkPacketBrokerImpl( + String name, com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = new NetworkPacketBrokerInner(); + this.serviceManager = serviceManager; + this.networkPacketBrokerName = name; + } + + public NetworkPacketBrokerImpl update() { + this.updateBody = new NetworkPacketBrokerPatch(); + return this; + } + + public NetworkPacketBroker apply() { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkPacketBrokers() + .update(resourceGroupName, networkPacketBrokerName, updateBody, Context.NONE); + return this; + } + + public NetworkPacketBroker apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkPacketBrokers() + .update(resourceGroupName, networkPacketBrokerName, updateBody, context); + return this; + } + + NetworkPacketBrokerImpl( + NetworkPacketBrokerInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.networkPacketBrokerName = Utils.getValueFromIdByName(innerObject.id(), "networkPacketBrokers"); + } + + public NetworkPacketBroker refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkPacketBrokers() + .getByResourceGroupWithResponse(resourceGroupName, networkPacketBrokerName, Context.NONE) + .getValue(); + return this; + } + + public NetworkPacketBroker refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkPacketBrokers() + .getByResourceGroupWithResponse(resourceGroupName, networkPacketBrokerName, context) + .getValue(); + return this; + } + + public NetworkPacketBrokerImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public NetworkPacketBrokerImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public NetworkPacketBrokerImpl withNetworkFabricId(String networkFabricId) { + this.innerModel().withNetworkFabricId(networkFabricId); + return this; + } + + public NetworkPacketBrokerImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersClientImpl.java new file mode 100644 index 0000000000000..9b7282179bc17 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersClientImpl.java @@ -0,0 +1,1659 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokerPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokersListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in NetworkPacketBrokersClient. */ +public final class NetworkPacketBrokersClientImpl implements NetworkPacketBrokersClient { + /** The proxy service used to perform REST calls. */ + private final NetworkPacketBrokersService service; + + /** The service client containing this operation class. */ + private final AzureNetworkFabricManagementServiceApiImpl client; + + /** + * Initializes an instance of NetworkPacketBrokersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NetworkPacketBrokersClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + this.service = + RestProxy + .create(NetworkPacketBrokersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkPacketBrokers to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureNetworkFabricMa") + public interface NetworkPacketBrokersService { + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkPacketBrokerName") String networkPacketBrokerName, + @BodyParam("application/json") NetworkPacketBrokerInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkPacketBrokerName") String networkPacketBrokerName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkPacketBrokerName") String networkPacketBrokerName, + @BodyParam("application/json") NetworkPacketBrokerPatch body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkPacketBrokerName") String networkPacketBrokerName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Create Network Packet Broker. + * + *

Creates a Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkPacketBrokerName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter networkPacketBrokerName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .create( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkPacketBrokerName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create Network Packet Broker. + * + *

Creates a Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkPacketBrokerName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter networkPacketBrokerName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .create( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkPacketBrokerName, + body, + accept, + context); + } + + /** + * Create Network Packet Broker. + * + *

Creates a Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkPacketBrokerInner> beginCreateAsync( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body) { + Mono>> mono = + createWithResponseAsync(resourceGroupName, networkPacketBrokerName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NetworkPacketBrokerInner.class, + NetworkPacketBrokerInner.class, + this.client.getContext()); + } + + /** + * Create Network Packet Broker. + * + *

Creates a Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkPacketBrokerInner> beginCreateAsync( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createWithResponseAsync(resourceGroupName, networkPacketBrokerName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NetworkPacketBrokerInner.class, + NetworkPacketBrokerInner.class, + context); + } + + /** + * Create Network Packet Broker. + * + *

Creates a Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkPacketBrokerInner> beginCreate( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body) { + return this.beginCreateAsync(resourceGroupName, networkPacketBrokerName, body).getSyncPoller(); + } + + /** + * Create Network Packet Broker. + * + *

Creates a Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkPacketBrokerInner> beginCreate( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body, Context context) { + return this.beginCreateAsync(resourceGroupName, networkPacketBrokerName, body, context).getSyncPoller(); + } + + /** + * Create Network Packet Broker. + * + *

Creates a Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body) { + return beginCreateAsync(resourceGroupName, networkPacketBrokerName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create Network Packet Broker. + * + *

Creates a Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body, Context context) { + return beginCreateAsync(resourceGroupName, networkPacketBrokerName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create Network Packet Broker. + * + *

Creates a Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkPacketBrokerInner create( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body) { + return createAsync(resourceGroupName, networkPacketBrokerName, body).block(); + } + + /** + * Create Network Packet Broker. + * + *

Creates a Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkPacketBrokerInner create( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerInner body, Context context) { + return createAsync(resourceGroupName, networkPacketBrokerName, body, context).block(); + } + + /** + * Gets a Network Packet Broker. + * + *

Retrieves details of this Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String networkPacketBrokerName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkPacketBrokerName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter networkPacketBrokerName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkPacketBrokerName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a Network Packet Broker. + * + *

Retrieves details of this Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String networkPacketBrokerName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkPacketBrokerName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter networkPacketBrokerName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkPacketBrokerName, + accept, + context); + } + + /** + * Gets a Network Packet Broker. + * + *

Retrieves details of this Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync( + String resourceGroupName, String networkPacketBrokerName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkPacketBrokerName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a Network Packet Broker. + * + *

Retrieves details of this Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String networkPacketBrokerName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkPacketBrokerName, context).block(); + } + + /** + * Gets a Network Packet Broker. + * + *

Retrieves details of this Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkPacketBrokerInner getByResourceGroup(String resourceGroupName, String networkPacketBrokerName) { + return getByResourceGroupWithResponse(resourceGroupName, networkPacketBrokerName, Context.NONE).getValue(); + } + + /** + * Updates the Network Packet Broker. + * + *

API to update certain properties of the Network Packet Broker resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Network Packet Broker properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkPacketBrokerName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter networkPacketBrokerName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkPacketBrokerName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the Network Packet Broker. + * + *

API to update certain properties of the Network Packet Broker resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Network Packet Broker properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkPacketBrokerName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter networkPacketBrokerName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkPacketBrokerName, + body, + accept, + context); + } + + /** + * Updates the Network Packet Broker. + * + *

API to update certain properties of the Network Packet Broker resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Network Packet Broker properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkPacketBrokerInner> beginUpdateAsync( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body) { + Mono>> mono = + updateWithResponseAsync(resourceGroupName, networkPacketBrokerName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NetworkPacketBrokerInner.class, + NetworkPacketBrokerInner.class, + this.client.getContext()); + } + + /** + * Updates the Network Packet Broker. + * + *

API to update certain properties of the Network Packet Broker resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Network Packet Broker properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkPacketBrokerInner> beginUpdateAsync( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, networkPacketBrokerName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NetworkPacketBrokerInner.class, + NetworkPacketBrokerInner.class, + context); + } + + /** + * Updates the Network Packet Broker. + * + *

API to update certain properties of the Network Packet Broker resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Network Packet Broker properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkPacketBrokerInner> beginUpdate( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body) { + return this.beginUpdateAsync(resourceGroupName, networkPacketBrokerName, body).getSyncPoller(); + } + + /** + * Updates the Network Packet Broker. + * + *

API to update certain properties of the Network Packet Broker resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Network Packet Broker properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkPacketBrokerInner> beginUpdate( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body, Context context) { + return this.beginUpdateAsync(resourceGroupName, networkPacketBrokerName, body, context).getSyncPoller(); + } + + /** + * Updates the Network Packet Broker. + * + *

API to update certain properties of the Network Packet Broker resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Network Packet Broker properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body) { + return beginUpdateAsync(resourceGroupName, networkPacketBrokerName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates the Network Packet Broker. + * + *

API to update certain properties of the Network Packet Broker resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Network Packet Broker properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body, Context context) { + return beginUpdateAsync(resourceGroupName, networkPacketBrokerName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates the Network Packet Broker. + * + *

API to update certain properties of the Network Packet Broker resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Network Packet Broker properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkPacketBrokerInner update( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body) { + return updateAsync(resourceGroupName, networkPacketBrokerName, body).block(); + } + + /** + * Updates the Network Packet Broker. + * + *

API to update certain properties of the Network Packet Broker resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param body Network Packet Broker properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkPacketBrokerInner update( + String resourceGroupName, String networkPacketBrokerName, NetworkPacketBrokerPatch body, Context context) { + return updateAsync(resourceGroupName, networkPacketBrokerName, body, context).block(); + } + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String networkPacketBrokerName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkPacketBrokerName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter networkPacketBrokerName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkPacketBrokerName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String networkPacketBrokerName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkPacketBrokerName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter networkPacketBrokerName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkPacketBrokerName, + accept, + context); + } + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String networkPacketBrokerName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkPacketBrokerName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String networkPacketBrokerName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, networkPacketBrokerName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String networkPacketBrokerName) { + return this.beginDeleteAsync(resourceGroupName, networkPacketBrokerName).getSyncPoller(); + } + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String networkPacketBrokerName, Context context) { + return this.beginDeleteAsync(resourceGroupName, networkPacketBrokerName, context).getSyncPoller(); + } + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String networkPacketBrokerName) { + return beginDeleteAsync(resourceGroupName, networkPacketBrokerName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String networkPacketBrokerName, Context context) { + return beginDeleteAsync(resourceGroupName, networkPacketBrokerName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkPacketBrokerName) { + deleteAsync(resourceGroupName, networkPacketBrokerName).block(); + } + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkPacketBrokerName, Context context) { + deleteAsync(resourceGroupName, networkPacketBrokerName, context).block(); + } + + /** + * List all Network Packet Brokers under resource group. + * + *

Displays NetworkPacketBrokers list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all Network Packet Brokers under resource group. + * + *

Displays NetworkPacketBrokers list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List all Network Packet Brokers under resource group. + * + *

Displays NetworkPacketBrokers list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List all Network Packet Brokers under resource group. + * + *

Displays NetworkPacketBrokers list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List all Network Packet Brokers under resource group. + * + *

Displays NetworkPacketBrokers list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List all Network Packet Brokers under resource group. + * + *

Displays NetworkPacketBrokers list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * List Network Packet Brokers by subscription. + * + *

Displays Network Packet Brokers list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Network Packet Brokers by subscription. + * + *

Displays Network Packet Brokers list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Network Packet Brokers by subscription. + * + *

Displays Network Packet Brokers list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List Network Packet Brokers by subscription. + * + *

Displays Network Packet Brokers list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List Network Packet Brokers by subscription. + * + *

Displays Network Packet Brokers list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List Network Packet Brokers by subscription. + * + *

Displays Network Packet Brokers list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersImpl.java new file mode 100644 index 0000000000000..e2fbf44f2f0ea --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkPacketBrokersImpl.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkPacketBrokersClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBroker; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBrokers; + +public final class NetworkPacketBrokersImpl implements NetworkPacketBrokers { + private static final ClientLogger LOGGER = new ClientLogger(NetworkPacketBrokersImpl.class); + + private final NetworkPacketBrokersClient innerClient; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public NetworkPacketBrokersImpl( + NetworkPacketBrokersClient innerClient, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String networkPacketBrokerName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, networkPacketBrokerName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new NetworkPacketBrokerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NetworkPacketBroker getByResourceGroup(String resourceGroupName, String networkPacketBrokerName) { + NetworkPacketBrokerInner inner = + this.serviceClient().getByResourceGroup(resourceGroupName, networkPacketBrokerName); + if (inner != null) { + return new NetworkPacketBrokerImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String networkPacketBrokerName) { + this.serviceClient().delete(resourceGroupName, networkPacketBrokerName); + } + + public void delete(String resourceGroupName, String networkPacketBrokerName, Context context) { + this.serviceClient().delete(resourceGroupName, networkPacketBrokerName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new NetworkPacketBrokerImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new NetworkPacketBrokerImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new NetworkPacketBrokerImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new NetworkPacketBrokerImpl(inner1, this.manager())); + } + + public NetworkPacketBroker getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkPacketBrokerName = Utils.getValueFromIdByName(id, "networkPacketBrokers"); + if (networkPacketBrokerName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'networkPacketBrokers'.", + id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, networkPacketBrokerName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkPacketBrokerName = Utils.getValueFromIdByName(id, "networkPacketBrokers"); + if (networkPacketBrokerName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'networkPacketBrokers'.", + id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, networkPacketBrokerName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkPacketBrokerName = Utils.getValueFromIdByName(id, "networkPacketBrokers"); + if (networkPacketBrokerName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'networkPacketBrokers'.", + id))); + } + this.delete(resourceGroupName, networkPacketBrokerName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkPacketBrokerName = Utils.getValueFromIdByName(id, "networkPacketBrokers"); + if (networkPacketBrokerName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'networkPacketBrokers'.", + id))); + } + this.delete(resourceGroupName, networkPacketBrokerName, context); + } + + private NetworkPacketBrokersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + public NetworkPacketBrokerImpl define(String name) { + return new NetworkPacketBrokerImpl(name, this.manager()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackImpl.java index 6fd943e1cfb76..7ac8cd71300fc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackImpl.java @@ -9,8 +9,9 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.TagsUpdate; import java.util.Collections; import java.util.List; import java.util.Map; @@ -49,8 +50,8 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public String networkRackSku() { - return this.innerModel().networkRackSku(); + public NetworkRackType networkRackType() { + return this.innerModel().networkRackType(); } public String networkFabricId() { @@ -98,7 +99,7 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String networkRackName; - private NetworkRackPatch updateBody; + private TagsUpdate updateBody; public NetworkRackImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -131,7 +132,7 @@ public NetworkRack create(Context context) { } public NetworkRackImpl update() { - this.updateBody = new NetworkRackPatch(); + this.updateBody = new TagsUpdate(); return this; } @@ -192,11 +193,6 @@ public NetworkRackImpl withRegion(String location) { return this; } - public NetworkRackImpl withNetworkRackSku(String networkRackSku) { - this.innerModel().withNetworkRackSku(networkRackSku); - return this; - } - public NetworkRackImpl withNetworkFabricId(String networkFabricId) { this.innerModel().withNetworkFabricId(networkFabricId); return this; @@ -212,13 +208,13 @@ public NetworkRackImpl withTags(Map tags) { } } - public NetworkRackImpl withAnnotation(String annotation) { - this.innerModel().withAnnotation(annotation); + public NetworkRackImpl withNetworkRackType(NetworkRackType networkRackType) { + this.innerModel().withNetworkRackType(networkRackType); return this; } - public NetworkRackImpl withProperties(Object properties) { - this.updateBody.withProperties(properties); + public NetworkRackImpl withAnnotation(String annotation) { + this.innerModel().withAnnotation(annotation); return this; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackSkuImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackSkuImpl.java deleted file mode 100644 index f4272c47ea0be..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackSkuImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackSkuInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackSku; -import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; -import java.util.Collections; -import java.util.List; - -public final class NetworkRackSkuImpl implements NetworkRackSku { - private NetworkRackSkuInner innerObject; - - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; - - NetworkRackSkuImpl( - NetworkRackSkuInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public NetworkRackRoleName roleName() { - return this.innerModel().roleName(); - } - - public Integer maximumServerCount() { - return this.innerModel().maximumServerCount(); - } - - public Integer maximumStorageCount() { - return this.innerModel().maximumStorageCount(); - } - - public Integer maximumUplinks() { - return this.innerModel().maximumUplinks(); - } - - public List networkDevices() { - List inner = this.innerModel().networkDevices(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public NetworkRackSkuInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackSkusClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackSkusClientImpl.java deleted file mode 100644 index 1ea3284d081d9..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackSkusClientImpl.java +++ /dev/null @@ -1,456 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRackSkusClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackSkuInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackSkusListResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in NetworkRackSkusClient. */ -public final class NetworkRackSkusClientImpl implements NetworkRackSkusClient { - /** The proxy service used to perform REST calls. */ - private final NetworkRackSkusService service; - - /** The service client containing this operation class. */ - private final AzureNetworkFabricManagementServiceApiImpl client; - - /** - * Initializes an instance of NetworkRackSkusClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - NetworkRackSkusClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { - this.service = - RestProxy.create(NetworkRackSkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkRackSkus to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureNetworkFabricMa") - public interface NetworkRackSkusService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus/{networkRackSkuName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @PathParam("networkRackSkuName") String networkRackSkuName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets a Network Rack Sku. - * - *

Get Network Rack SKU resource. - * - * @param networkRackSkuName Name of the Network Rack Sku. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Rack SKU resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String networkRackSkuName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (networkRackSkuName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackSkuName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - networkRackSkuName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a Network Rack Sku. - * - *

Get Network Rack SKU resource. - * - * @param networkRackSkuName Name of the Network Rack Sku. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Rack SKU resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String networkRackSkuName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (networkRackSkuName == null) { - return Mono - .error(new IllegalArgumentException("Parameter networkRackSkuName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - networkRackSkuName, - accept, - context); - } - - /** - * Gets a Network Rack Sku. - * - *

Get Network Rack SKU resource. - * - * @param networkRackSkuName Name of the Network Rack Sku. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Rack SKU resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String networkRackSkuName) { - return getWithResponseAsync(networkRackSkuName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a Network Rack Sku. - * - *

Get Network Rack SKU resource. - * - * @param networkRackSkuName Name of the Network Rack Sku. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Rack SKU resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String networkRackSkuName, Context context) { - return getWithResponseAsync(networkRackSkuName, context).block(); - } - - /** - * Gets a Network Rack Sku. - * - *

Get Network Rack SKU resource. - * - * @param networkRackSkuName Name of the Network Rack Sku. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Rack SKU resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkRackSkuInner get(String networkRackSkuName) { - return getWithResponse(networkRackSkuName, Context.NONE).getValue(); - } - - /** - * List NetworkRackSkus by subscription. - * - *

List all Network Rack SKUs in the given subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRackSkus along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List NetworkRackSkus by subscription. - * - *

List all Network Rack SKUs in the given subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRackSkus along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List NetworkRackSkus by subscription. - * - *

List all Network Rack SKUs in the given subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRackSkus as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List NetworkRackSkus by subscription. - * - *

List all Network Rack SKUs in the given subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRackSkus as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * List NetworkRackSkus by subscription. - * - *

List all Network Rack SKUs in the given subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRackSkus as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * List NetworkRackSkus by subscription. - * - *

List all Network Rack SKUs in the given subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRackSkus as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRackSkus along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRackSkus along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackSkusImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackSkusImpl.java deleted file mode 100644 index df3c1e233ba45..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRackSkusImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRackSkusClient; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackSkuInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackSku; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackSkus; - -public final class NetworkRackSkusImpl implements NetworkRackSkus { - private static final ClientLogger LOGGER = new ClientLogger(NetworkRackSkusImpl.class); - - private final NetworkRackSkusClient innerClient; - - private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; - - public NetworkRackSkusImpl( - NetworkRackSkusClient innerClient, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String networkRackSkuName, Context context) { - Response inner = this.serviceClient().getWithResponse(networkRackSkuName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new NetworkRackSkuImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public NetworkRackSku get(String networkRackSkuName) { - NetworkRackSkuInner inner = this.serviceClient().get(networkRackSkuName); - if (inner != null) { - return new NetworkRackSkuImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new NetworkRackSkuImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new NetworkRackSkuImpl(inner1, this.manager())); - } - - private NetworkRackSkusClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksClientImpl.java index 708d569561a05..6be95e5b2c9d8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkRacksClientImpl.java @@ -34,8 +34,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkRacksClient; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackPatch; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRacksListResult; +import com.azure.resourcemanager.managednetworkfabric.models.TagsUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -106,7 +106,7 @@ Mono>> update( @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @PathParam("networkRackName") String networkRackName, - @BodyParam("application/json") NetworkRackPatch body, + @BodyParam("application/json") TagsUpdate body, @HeaderParam("Accept") String accept, Context context); @@ -180,7 +180,8 @@ Mono> listBySubscriptionNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkRack resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the Network Rack resource definition along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -239,7 +240,8 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkRack resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the Network Rack resource definition along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -294,7 +296,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkRack resource definition. + * @return the {@link PollerFlux} for polling of the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkRackInner> beginCreateAsync( @@ -322,7 +324,7 @@ private PollerFlux, NetworkRackInner> beginCreateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkRack resource definition. + * @return the {@link PollerFlux} for polling of the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkRackInner> beginCreateAsync( @@ -347,7 +349,7 @@ private PollerFlux, NetworkRackInner> beginCreateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkRack resource definition. + * @return the {@link SyncPoller} for polling of the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkRackInner> beginCreate( @@ -367,7 +369,7 @@ public SyncPoller, NetworkRackInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkRack resource definition. + * @return the {@link SyncPoller} for polling of the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkRackInner> beginCreate( @@ -386,7 +388,7 @@ public SyncPoller, NetworkRackInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkRack resource definition on successful completion of {@link Mono}. + * @return the Network Rack resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -408,7 +410,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkRack resource definition on successful completion of {@link Mono}. + * @return the Network Rack resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -429,7 +431,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkRack resource definition. + * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkRackInner create(String resourceGroupName, String networkRackName, NetworkRackInner body) { @@ -448,7 +450,7 @@ public NetworkRackInner create(String resourceGroupName, String networkRackName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkRack resource definition. + * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkRackInner create( @@ -621,11 +623,12 @@ public NetworkRackInner getByResourceGroup(String resourceGroupName, String netw * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkRack resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the Network Rack resource definition along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( - String resourceGroupName, String networkRackName, NetworkRackPatch body) { + String resourceGroupName, String networkRackName, TagsUpdate body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -680,11 +683,12 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkRack resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the Network Rack resource definition along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( - String resourceGroupName, String networkRackName, NetworkRackPatch body, Context context) { + String resourceGroupName, String networkRackName, TagsUpdate body, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -735,11 +739,11 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkRack resource definition. + * @return the {@link PollerFlux} for polling of the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkRackInner> beginUpdateAsync( - String resourceGroupName, String networkRackName, NetworkRackPatch body) { + String resourceGroupName, String networkRackName, TagsUpdate body) { Mono>> mono = updateWithResponseAsync(resourceGroupName, networkRackName, body); return this .client @@ -763,11 +767,11 @@ private PollerFlux, NetworkRackInner> beginUpdateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkRack resource definition. + * @return the {@link PollerFlux} for polling of the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkRackInner> beginUpdateAsync( - String resourceGroupName, String networkRackName, NetworkRackPatch body, Context context) { + String resourceGroupName, String networkRackName, TagsUpdate body, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateWithResponseAsync(resourceGroupName, networkRackName, body, context); @@ -788,11 +792,11 @@ private PollerFlux, NetworkRackInner> beginUpdateAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkRack resource definition. + * @return the {@link SyncPoller} for polling of the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkRackInner> beginUpdate( - String resourceGroupName, String networkRackName, NetworkRackPatch body) { + String resourceGroupName, String networkRackName, TagsUpdate body) { return this.beginUpdateAsync(resourceGroupName, networkRackName, body).getSyncPoller(); } @@ -808,11 +812,11 @@ public SyncPoller, NetworkRackInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkRack resource definition. + * @return the {@link SyncPoller} for polling of the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkRackInner> beginUpdate( - String resourceGroupName, String networkRackName, NetworkRackPatch body, Context context) { + String resourceGroupName, String networkRackName, TagsUpdate body, Context context) { return this.beginUpdateAsync(resourceGroupName, networkRackName, body, context).getSyncPoller(); } @@ -827,11 +831,10 @@ public SyncPoller, NetworkRackInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkRack resource definition on successful completion of {@link Mono}. + * @return the Network Rack resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String networkRackName, NetworkRackPatch body) { + private Mono updateAsync(String resourceGroupName, String networkRackName, TagsUpdate body) { return beginUpdateAsync(resourceGroupName, networkRackName, body) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -849,11 +852,11 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkRack resource definition on successful completion of {@link Mono}. + * @return the Network Rack resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( - String resourceGroupName, String networkRackName, NetworkRackPatch body, Context context) { + String resourceGroupName, String networkRackName, TagsUpdate body, Context context) { return beginUpdateAsync(resourceGroupName, networkRackName, body, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -870,10 +873,10 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkRack resource definition. + * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkRackInner update(String resourceGroupName, String networkRackName, NetworkRackPatch body) { + public NetworkRackInner update(String resourceGroupName, String networkRackName, TagsUpdate body) { return updateAsync(resourceGroupName, networkRackName, body).block(); } @@ -889,11 +892,10 @@ public NetworkRackInner update(String resourceGroupName, String networkRackName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkRack resource definition. + * @return the Network Rack resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkRackInner update( - String resourceGroupName, String networkRackName, NetworkRackPatch body, Context context) { + public NetworkRackInner update(String resourceGroupName, String networkRackName, TagsUpdate body, Context context) { return updateAsync(resourceGroupName, networkRackName, body, context).block(); } @@ -1149,7 +1151,7 @@ public void delete(String resourceGroupName, String networkRackName, Context con } /** - * List NetworkRacks by resource group. + * List Network Racks by resource group. * *

List all Network Rack resources in the given resource group. * @@ -1157,7 +1159,7 @@ public void delete(String resourceGroupName, String networkRackName, Context con * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -1202,7 +1204,7 @@ private Mono> listByResourceGroupSinglePageAsync } /** - * List NetworkRacks by resource group. + * List Network Racks by resource group. * *

List all Network Rack resources in the given resource group. * @@ -1211,7 +1213,7 @@ private Mono> listByResourceGroupSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1254,7 +1256,7 @@ private Mono> listByResourceGroupSinglePageAsync } /** - * List NetworkRacks by resource group. + * List Network Racks by resource group. * *

List all Network Rack resources in the given resource group. * @@ -1262,7 +1264,7 @@ private Mono> listByResourceGroupSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks as paginated response with {@link PagedFlux}. + * @return list of Network Racks as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1272,7 +1274,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou } /** - * List NetworkRacks by resource group. + * List Network Racks by resource group. * *

List all Network Rack resources in the given resource group. * @@ -1281,7 +1283,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks as paginated response with {@link PagedFlux}. + * @return list of Network Racks as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -1291,7 +1293,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou } /** - * List NetworkRacks by resource group. + * List Network Racks by resource group. * *

List all Network Rack resources in the given resource group. * @@ -1299,7 +1301,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks as paginated response with {@link PagedIterable}. + * @return list of Network Racks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1307,7 +1309,7 @@ public PagedIterable listByResourceGroup(String resourceGroupN } /** - * List NetworkRacks by resource group. + * List Network Racks by resource group. * *

List all Network Rack resources in the given resource group. * @@ -1316,7 +1318,7 @@ public PagedIterable listByResourceGroup(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks as paginated response with {@link PagedIterable}. + * @return list of Network Racks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -1324,13 +1326,13 @@ public PagedIterable listByResourceGroup(String resourceGroupN } /** - * List NetworkRacks by subscription. + * List Network Racks by subscription. * *

List all Network Rack resources in the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1370,7 +1372,7 @@ private Mono> listSinglePageAsync() { } /** - * List NetworkRacks by subscription. + * List Network Racks by subscription. * *

List all Network Rack resources in the given subscription. * @@ -1378,7 +1380,7 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1415,13 +1417,13 @@ private Mono> listSinglePageAsync(Context contex } /** - * List NetworkRacks by subscription. + * List Network Racks by subscription. * *

List all Network Rack resources in the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks as paginated response with {@link PagedFlux}. + * @return list of Network Racks as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1430,7 +1432,7 @@ private PagedFlux listAsync() { } /** - * List NetworkRacks by subscription. + * List Network Racks by subscription. * *

List all Network Rack resources in the given subscription. * @@ -1438,7 +1440,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks as paginated response with {@link PagedFlux}. + * @return list of Network Racks as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1447,13 +1449,13 @@ private PagedFlux listAsync(Context context) { } /** - * List NetworkRacks by subscription. + * List Network Racks by subscription. * *

List all Network Rack resources in the given subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks as paginated response with {@link PagedIterable}. + * @return list of Network Racks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1461,7 +1463,7 @@ public PagedIterable list() { } /** - * List NetworkRacks by subscription. + * List Network Racks by subscription. * *

List all Network Rack resources in the given subscription. * @@ -1469,7 +1471,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks as paginated response with {@link PagedIterable}. + * @return list of Network Racks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -1484,7 +1486,7 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1522,7 +1524,7 @@ private Mono> listByResourceGroupNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( @@ -1559,7 +1561,7 @@ private Mono> listByResourceGroupNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1597,7 +1599,7 @@ private Mono> listBySubscriptionNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Network Racks along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapImpl.java new file mode 100644 index 0000000000000..74ada8dc54ff5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapImpl.java @@ -0,0 +1,280 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class NetworkTapImpl implements NetworkTap, NetworkTap.Definition, NetworkTap.Update { + private NetworkTapInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String networkPacketBrokerId() { + return this.innerModel().networkPacketBrokerId(); + } + + public String sourceTapRuleId() { + return this.innerModel().sourceTapRuleId(); + } + + public List destinations() { + List inner = this.innerModel().destinations(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PollingType pollingType() { + return this.innerModel().pollingType(); + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + + public String annotation() { + return this.innerModel().annotation(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public NetworkTapInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String networkTapName; + + private NetworkTapPatch updateBody; + + public NetworkTapImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public NetworkTap create() { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkTaps() + .create(resourceGroupName, networkTapName, this.innerModel(), Context.NONE); + return this; + } + + public NetworkTap create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkTaps() + .create(resourceGroupName, networkTapName, this.innerModel(), context); + return this; + } + + NetworkTapImpl( + String name, com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = new NetworkTapInner(); + this.serviceManager = serviceManager; + this.networkTapName = name; + } + + public NetworkTapImpl update() { + this.updateBody = new NetworkTapPatch(); + return this; + } + + public NetworkTap apply() { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkTaps() + .update(resourceGroupName, networkTapName, updateBody, Context.NONE); + return this; + } + + public NetworkTap apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkTaps() + .update(resourceGroupName, networkTapName, updateBody, context); + return this; + } + + NetworkTapImpl( + NetworkTapInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.networkTapName = Utils.getValueFromIdByName(innerObject.id(), "networkTaps"); + } + + public NetworkTap refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkTaps() + .getByResourceGroupWithResponse(resourceGroupName, networkTapName, Context.NONE) + .getValue(); + return this; + } + + public NetworkTap refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkTaps() + .getByResourceGroupWithResponse(resourceGroupName, networkTapName, context) + .getValue(); + return this; + } + + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body) { + return serviceManager.networkTaps().updateAdministrativeState(resourceGroupName, networkTapName, body); + } + + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState( + UpdateAdministrativeState body, Context context) { + return serviceManager.networkTaps().updateAdministrativeState(resourceGroupName, networkTapName, body, context); + } + + public CommonPostActionResponseForStateUpdate resync() { + return serviceManager.networkTaps().resync(resourceGroupName, networkTapName); + } + + public CommonPostActionResponseForStateUpdate resync(Context context) { + return serviceManager.networkTaps().resync(resourceGroupName, networkTapName, context); + } + + public NetworkTapImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public NetworkTapImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public NetworkTapImpl withNetworkPacketBrokerId(String networkPacketBrokerId) { + this.innerModel().withNetworkPacketBrokerId(networkPacketBrokerId); + return this; + } + + public NetworkTapImpl withDestinations(List destinations) { + this.innerModel().withDestinations(destinations); + return this; + } + + public NetworkTapImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public NetworkTapImpl withPollingType(PollingType pollingType) { + if (isInCreateMode()) { + this.innerModel().withPollingType(pollingType); + return this; + } else { + this.updateBody.withPollingType(pollingType); + return this; + } + } + + public NetworkTapImpl withAnnotation(String annotation) { + if (isInCreateMode()) { + this.innerModel().withAnnotation(annotation); + return this; + } else { + this.updateBody.withAnnotation(annotation); + return this; + } + } + + public NetworkTapImpl withDestinationsForUpdate(List destinations) { + this.updateBody.withDestinations(destinations); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRuleImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRuleImpl.java new file mode 100644 index 0000000000000..9bcfdd1d42847 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRuleImpl.java @@ -0,0 +1,330 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRule; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatch; +import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; +import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class NetworkTapRuleImpl implements NetworkTapRule, NetworkTapRule.Definition, NetworkTapRule.Update { + private NetworkTapRuleInner innerObject; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String networkTapId() { + return this.innerModel().networkTapId(); + } + + public PollingIntervalInSeconds pollingIntervalInSeconds() { + return this.innerModel().pollingIntervalInSeconds(); + } + + public OffsetDateTime lastSyncedTime() { + return this.innerModel().lastSyncedTime(); + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + + public ConfigurationType configurationType() { + return this.innerModel().configurationType(); + } + + public String tapRulesUrl() { + return this.innerModel().tapRulesUrl(); + } + + public List matchConfigurations() { + List inner = this.innerModel().matchConfigurations(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List dynamicMatchConfigurations() { + List inner = this.innerModel().dynamicMatchConfigurations(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String annotation() { + return this.innerModel().annotation(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public NetworkTapRuleInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String networkTapRuleName; + + private NetworkTapRulePatch updateBody; + + public NetworkTapRuleImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public NetworkTapRule create() { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkTapRules() + .create(resourceGroupName, networkTapRuleName, this.innerModel(), Context.NONE); + return this; + } + + public NetworkTapRule create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkTapRules() + .create(resourceGroupName, networkTapRuleName, this.innerModel(), context); + return this; + } + + NetworkTapRuleImpl( + String name, com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = new NetworkTapRuleInner(); + this.serviceManager = serviceManager; + this.networkTapRuleName = name; + } + + public NetworkTapRuleImpl update() { + this.updateBody = new NetworkTapRulePatch(); + return this; + } + + public NetworkTapRule apply() { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkTapRules() + .update(resourceGroupName, networkTapRuleName, updateBody, Context.NONE); + return this; + } + + public NetworkTapRule apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkTapRules() + .update(resourceGroupName, networkTapRuleName, updateBody, context); + return this; + } + + NetworkTapRuleImpl( + NetworkTapRuleInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.networkTapRuleName = Utils.getValueFromIdByName(innerObject.id(), "networkTapRules"); + } + + public NetworkTapRule refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkTapRules() + .getByResourceGroupWithResponse(resourceGroupName, networkTapRuleName, Context.NONE) + .getValue(); + return this; + } + + public NetworkTapRule refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkTapRules() + .getByResourceGroupWithResponse(resourceGroupName, networkTapRuleName, context) + .getValue(); + return this; + } + + public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body) { + return serviceManager.networkTapRules().updateAdministrativeState(resourceGroupName, networkTapRuleName, body); + } + + public CommonPostActionResponseForStateUpdate updateAdministrativeState( + UpdateAdministrativeState body, Context context) { + return serviceManager + .networkTapRules() + .updateAdministrativeState(resourceGroupName, networkTapRuleName, body, context); + } + + public CommonPostActionResponseForStateUpdate resync() { + return serviceManager.networkTapRules().resync(resourceGroupName, networkTapRuleName); + } + + public CommonPostActionResponseForStateUpdate resync(Context context) { + return serviceManager.networkTapRules().resync(resourceGroupName, networkTapRuleName, context); + } + + public ValidateConfigurationResponse validateConfiguration() { + return serviceManager.networkTapRules().validateConfiguration(resourceGroupName, networkTapRuleName); + } + + public ValidateConfigurationResponse validateConfiguration(Context context) { + return serviceManager.networkTapRules().validateConfiguration(resourceGroupName, networkTapRuleName, context); + } + + public NetworkTapRuleImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public NetworkTapRuleImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public NetworkTapRuleImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public NetworkTapRuleImpl withPollingIntervalInSeconds(PollingIntervalInSeconds pollingIntervalInSeconds) { + this.innerModel().withPollingIntervalInSeconds(pollingIntervalInSeconds); + return this; + } + + public NetworkTapRuleImpl withConfigurationType(ConfigurationType configurationType) { + if (isInCreateMode()) { + this.innerModel().withConfigurationType(configurationType); + return this; + } else { + this.updateBody.withConfigurationType(configurationType); + return this; + } + } + + public NetworkTapRuleImpl withTapRulesUrl(String tapRulesUrl) { + if (isInCreateMode()) { + this.innerModel().withTapRulesUrl(tapRulesUrl); + return this; + } else { + this.updateBody.withTapRulesUrl(tapRulesUrl); + return this; + } + } + + public NetworkTapRuleImpl withMatchConfigurations(List matchConfigurations) { + if (isInCreateMode()) { + this.innerModel().withMatchConfigurations(matchConfigurations); + return this; + } else { + this.updateBody.withMatchConfigurations(matchConfigurations); + return this; + } + } + + public NetworkTapRuleImpl withDynamicMatchConfigurations( + List dynamicMatchConfigurations) { + if (isInCreateMode()) { + this.innerModel().withDynamicMatchConfigurations(dynamicMatchConfigurations); + return this; + } else { + this.updateBody.withDynamicMatchConfigurations(dynamicMatchConfigurations); + return this; + } + } + + public NetworkTapRuleImpl withAnnotation(String annotation) { + if (isInCreateMode()) { + this.innerModel().withAnnotation(annotation); + return this; + } else { + this.updateBody.withAnnotation(annotation); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesClientImpl.java new file mode 100644 index 0000000000000..cf5f96667c801 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesClientImpl.java @@ -0,0 +1,2532 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulePatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRulesListResult; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in NetworkTapRulesClient. */ +public final class NetworkTapRulesClientImpl implements NetworkTapRulesClient { + /** The proxy service used to perform REST calls. */ + private final NetworkTapRulesService service; + + /** The service client containing this operation class. */ + private final AzureNetworkFabricManagementServiceApiImpl client; + + /** + * Initializes an instance of NetworkTapRulesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NetworkTapRulesClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + this.service = + RestProxy.create(NetworkTapRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkTapRules to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureNetworkFabricMa") + public interface NetworkTapRulesService { + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkTapRuleName") String networkTapRuleName, + @BodyParam("application/json") NetworkTapRuleInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkTapRuleName") String networkTapRuleName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkTapRuleName") String networkTapRuleName, + @BodyParam("application/json") NetworkTapRulePatch body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkTapRuleName") String networkTapRuleName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTapRules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/updateAdministrativeState") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateAdministrativeState( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkTapRuleName") String networkTapRuleName, + @BodyParam("application/json") UpdateAdministrativeState body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/resync") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resync( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkTapRuleName") String networkTapRuleName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/validateConfiguration") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> validateConfiguration( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkTapRuleName") String networkTapRuleName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Create Network Tap Rule. + * + *

Create Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkTapRule resource definition along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .create( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapRuleName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create Network Tap Rule. + * + *

Create Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkTapRule resource definition along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .create( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapRuleName, + body, + accept, + context); + } + + /** + * Create Network Tap Rule. + * + *

Create Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkTapRuleInner> beginCreateAsync( + String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, networkTapRuleName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NetworkTapRuleInner.class, + NetworkTapRuleInner.class, + this.client.getContext()); + } + + /** + * Create Network Tap Rule. + * + *

Create Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkTapRuleInner> beginCreateAsync( + String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createWithResponseAsync(resourceGroupName, networkTapRuleName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), NetworkTapRuleInner.class, NetworkTapRuleInner.class, context); + } + + /** + * Create Network Tap Rule. + * + *

Create Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkTapRuleInner> beginCreate( + String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body) { + return this.beginCreateAsync(resourceGroupName, networkTapRuleName, body).getSyncPoller(); + } + + /** + * Create Network Tap Rule. + * + *

Create Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkTapRuleInner> beginCreate( + String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body, Context context) { + return this.beginCreateAsync(resourceGroupName, networkTapRuleName, body, context).getSyncPoller(); + } + + /** + * Create Network Tap Rule. + * + *

Create Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkTapRule resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body) { + return beginCreateAsync(resourceGroupName, networkTapRuleName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create Network Tap Rule. + * + *

Create Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkTapRule resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body, Context context) { + return beginCreateAsync(resourceGroupName, networkTapRuleName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create Network Tap Rule. + * + *

Create Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkTapRuleInner create(String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body) { + return createAsync(resourceGroupName, networkTapRuleName, body).block(); + } + + /** + * Create Network Tap Rule. + * + *

Create Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkTapRuleInner create( + String resourceGroupName, String networkTapRuleName, NetworkTapRuleInner body, Context context) { + return createAsync(resourceGroupName, networkTapRuleName, body, context).block(); + } + + /** + * Gets a Network Tap Rule. + * + *

Get Network Tap Rule resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Tap Rule resource details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String networkTapRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapRuleName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a Network Tap Rule. + * + *

Get Network Tap Rule resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Tap Rule resource details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String networkTapRuleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapRuleName, + accept, + context); + } + + /** + * Gets a Network Tap Rule. + * + *

Get Network Tap Rule resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Tap Rule resource details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String networkTapRuleName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkTapRuleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a Network Tap Rule. + * + *

Get Network Tap Rule resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Tap Rule resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String networkTapRuleName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkTapRuleName, context).block(); + } + + /** + * Gets a Network Tap Rule. + * + *

Get Network Tap Rule resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Tap Rule resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkTapRuleInner getByResourceGroup(String resourceGroupName, String networkTapRuleName) { + return getByResourceGroupWithResponse(resourceGroupName, networkTapRuleName, Context.NONE).getValue(); + } + + /** + * Updates a Network Tap Rule. + * + *

Update certain properties of the Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Network Tap Rule properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkTapRule resource definition along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapRuleName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a Network Tap Rule. + * + *

Update certain properties of the Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Network Tap Rule properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkTapRule resource definition along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapRuleName, + body, + accept, + context); + } + + /** + * Updates a Network Tap Rule. + * + *

Update certain properties of the Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Network Tap Rule properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkTapRuleInner> beginUpdateAsync( + String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, networkTapRuleName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NetworkTapRuleInner.class, + NetworkTapRuleInner.class, + this.client.getContext()); + } + + /** + * Updates a Network Tap Rule. + * + *

Update certain properties of the Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Network Tap Rule properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkTapRuleInner> beginUpdateAsync( + String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, networkTapRuleName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), NetworkTapRuleInner.class, NetworkTapRuleInner.class, context); + } + + /** + * Updates a Network Tap Rule. + * + *

Update certain properties of the Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Network Tap Rule properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkTapRuleInner> beginUpdate( + String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body) { + return this.beginUpdateAsync(resourceGroupName, networkTapRuleName, body).getSyncPoller(); + } + + /** + * Updates a Network Tap Rule. + * + *

Update certain properties of the Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Network Tap Rule properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkTapRuleInner> beginUpdate( + String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body, Context context) { + return this.beginUpdateAsync(resourceGroupName, networkTapRuleName, body, context).getSyncPoller(); + } + + /** + * Updates a Network Tap Rule. + * + *

Update certain properties of the Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Network Tap Rule properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkTapRule resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body) { + return beginUpdateAsync(resourceGroupName, networkTapRuleName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a Network Tap Rule. + * + *

Update certain properties of the Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Network Tap Rule properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkTapRule resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body, Context context) { + return beginUpdateAsync(resourceGroupName, networkTapRuleName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates a Network Tap Rule. + * + *

Update certain properties of the Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Network Tap Rule properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkTapRuleInner update(String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body) { + return updateAsync(resourceGroupName, networkTapRuleName, body).block(); + } + + /** + * Updates a Network Tap Rule. + * + *

Update certain properties of the Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Network Tap Rule properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkTapRule resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkTapRuleInner update( + String resourceGroupName, String networkTapRuleName, NetworkTapRulePatch body, Context context) { + return updateAsync(resourceGroupName, networkTapRuleName, body, context).block(); + } + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String networkTapRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapRuleName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String networkTapRuleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapRuleName, + accept, + context); + } + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkTapRuleName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkTapRuleName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String networkTapRuleName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkTapRuleName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String networkTapRuleName) { + return this.beginDeleteAsync(resourceGroupName, networkTapRuleName).getSyncPoller(); + } + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String networkTapRuleName, Context context) { + return this.beginDeleteAsync(resourceGroupName, networkTapRuleName, context).getSyncPoller(); + } + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String networkTapRuleName) { + return beginDeleteAsync(resourceGroupName, networkTapRuleName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String networkTapRuleName, Context context) { + return beginDeleteAsync(resourceGroupName, networkTapRuleName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkTapRuleName) { + deleteAsync(resourceGroupName, networkTapRuleName).block(); + } + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkTapRuleName, Context context) { + deleteAsync(resourceGroupName, networkTapRuleName, context).block(); + } + + /** + * List Network Tap Rules by resource group. + * + *

List all the Network Tap Rule resources in the given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Network Tap Rules by resource group. + * + *

List all the Network Tap Rule resources in the given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Network Tap Rules by resource group. + * + *

List all the Network Tap Rule resources in the given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List Network Tap Rules by resource group. + * + *

List all the Network Tap Rule resources in the given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List Network Tap Rules by resource group. + * + *

List all the Network Tap Rule resources in the given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List Network Tap Rules by resource group. + * + *

List all the Network Tap Rule resources in the given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * List NetworkTapRules by subscription. + * + *

List all the Network Tap Rule resources in the given subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List NetworkTapRules by subscription. + * + *

List all the Network Tap Rule resources in the given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List NetworkTapRules by subscription. + * + *

List all the Network Tap Rule resources in the given subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List NetworkTapRules by subscription. + * + *

List all the Network Tap Rule resources in the given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List NetworkTapRules by subscription. + * + *

List all the Network Tap Rule resources in the given subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List NetworkTapRules by subscription. + * + *

List all the Network Tap Rule resources in the given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateAdministrativeStateWithResponseAsync( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateAdministrativeState( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapRuleName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateAdministrativeStateWithResponseAsync( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateAdministrativeState( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapRuleName, + body, + accept, + context); + } + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body) { + Mono>> mono = + updateAdministrativeStateWithResponseAsync(resourceGroupName, networkTapRuleName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); + } + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateAdministrativeStateWithResponseAsync(resourceGroupName, networkTapRuleName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); + } + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body) { + return this.beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapRuleName, body).getSyncPoller(); + } + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body, Context context) { + return this + .beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapRuleName, body, context) + .getSyncPoller(); + } + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapRuleName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body, Context context) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapRuleName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body) { + return updateAdministrativeStateAsync(resourceGroupName, networkTapRuleName, body).block(); + } + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body, Context context) { + return updateAdministrativeStateAsync(resourceGroupName, networkTapRuleName, body, context).block(); + } + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resyncWithResponseAsync( + String resourceGroupName, String networkTapRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .resync( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapRuleName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resyncWithResponseAsync( + String resourceGroupName, String networkTapRuleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .resync( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapRuleName, + accept, + context); + } + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginResyncAsync(String resourceGroupName, String networkTapRuleName) { + Mono>> mono = resyncWithResponseAsync(resourceGroupName, networkTapRuleName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); + } + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginResyncAsync(String resourceGroupName, String networkTapRuleName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = resyncWithResponseAsync(resourceGroupName, networkTapRuleName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); + } + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginResync(String resourceGroupName, String networkTapRuleName) { + return this.beginResyncAsync(resourceGroupName, networkTapRuleName).getSyncPoller(); + } + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginResync(String resourceGroupName, String networkTapRuleName, Context context) { + return this.beginResyncAsync(resourceGroupName, networkTapRuleName, context).getSyncPoller(); + } + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resyncAsync( + String resourceGroupName, String networkTapRuleName) { + return beginResyncAsync(resourceGroupName, networkTapRuleName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resyncAsync( + String resourceGroupName, String networkTapRuleName, Context context) { + return beginResyncAsync(resourceGroupName, networkTapRuleName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapRuleName) { + return resyncAsync(resourceGroupName, networkTapRuleName).block(); + } + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner resync( + String resourceGroupName, String networkTapRuleName, Context context) { + return resyncAsync(resourceGroupName, networkTapRuleName, context).block(); + } + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateConfigurationWithResponseAsync( + String resourceGroupName, String networkTapRuleName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .validateConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapRuleName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateConfigurationWithResponseAsync( + String resourceGroupName, String networkTapRuleName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapRuleName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkTapRuleName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .validateConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapRuleName, + accept, + context); + } + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ValidateConfigurationResponseInner> + beginValidateConfigurationAsync(String resourceGroupName, String networkTapRuleName) { + Mono>> mono = + validateConfigurationWithResponseAsync(resourceGroupName, networkTapRuleName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ValidateConfigurationResponseInner.class, + ValidateConfigurationResponseInner.class, + this.client.getContext()); + } + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ValidateConfigurationResponseInner> + beginValidateConfigurationAsync(String resourceGroupName, String networkTapRuleName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + validateConfigurationWithResponseAsync(resourceGroupName, networkTapRuleName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ValidateConfigurationResponseInner.class, + ValidateConfigurationResponseInner.class, + context); + } + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String networkTapRuleName) { + return this.beginValidateConfigurationAsync(resourceGroupName, networkTapRuleName).getSyncPoller(); + } + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String networkTapRuleName, Context context) { + return this.beginValidateConfigurationAsync(resourceGroupName, networkTapRuleName, context).getSyncPoller(); + } + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateConfigurationAsync( + String resourceGroupName, String networkTapRuleName) { + return beginValidateConfigurationAsync(resourceGroupName, networkTapRuleName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateConfigurationAsync( + String resourceGroupName, String networkTapRuleName, Context context) { + return beginValidateConfigurationAsync(resourceGroupName, networkTapRuleName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String networkTapRuleName) { + return validateConfigurationAsync(resourceGroupName, networkTapRuleName).block(); + } + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String networkTapRuleName, Context context) { + return validateConfigurationAsync(resourceGroupName, networkTapRuleName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesImpl.java new file mode 100644 index 0000000000000..ca8dfe2dc5369 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapRulesImpl.java @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapRulesClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRule; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRules; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; + +public final class NetworkTapRulesImpl implements NetworkTapRules { + private static final ClientLogger LOGGER = new ClientLogger(NetworkTapRulesImpl.class); + + private final NetworkTapRulesClient innerClient; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public NetworkTapRulesImpl( + NetworkTapRulesClient innerClient, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String networkTapRuleName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, networkTapRuleName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new NetworkTapRuleImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NetworkTapRule getByResourceGroup(String resourceGroupName, String networkTapRuleName) { + NetworkTapRuleInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, networkTapRuleName); + if (inner != null) { + return new NetworkTapRuleImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String networkTapRuleName) { + this.serviceClient().delete(resourceGroupName, networkTapRuleName); + } + + public void delete(String resourceGroupName, String networkTapRuleName, Context context) { + this.serviceClient().delete(resourceGroupName, networkTapRuleName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new NetworkTapRuleImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new NetworkTapRuleImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new NetworkTapRuleImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new NetworkTapRuleImpl(inner1, this.manager())); + } + + public CommonPostActionResponseForStateUpdate updateAdministrativeState( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().updateAdministrativeState(resourceGroupName, networkTapRuleName, body); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate updateAdministrativeState( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body, Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().updateAdministrativeState(resourceGroupName, networkTapRuleName, body, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String networkTapRuleName) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().resync(resourceGroupName, networkTapRuleName); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate resync( + String resourceGroupName, String networkTapRuleName, Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().resync(resourceGroupName, networkTapRuleName, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String networkTapRuleName) { + ValidateConfigurationResponseInner inner = + this.serviceClient().validateConfiguration(resourceGroupName, networkTapRuleName); + if (inner != null) { + return new ValidateConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ValidateConfigurationResponse validateConfiguration( + String resourceGroupName, String networkTapRuleName, Context context) { + ValidateConfigurationResponseInner inner = + this.serviceClient().validateConfiguration(resourceGroupName, networkTapRuleName, context); + if (inner != null) { + return new ValidateConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkTapRule getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkTapRuleName = Utils.getValueFromIdByName(id, "networkTapRules"); + if (networkTapRuleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'networkTapRules'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, networkTapRuleName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkTapRuleName = Utils.getValueFromIdByName(id, "networkTapRules"); + if (networkTapRuleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'networkTapRules'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, networkTapRuleName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkTapRuleName = Utils.getValueFromIdByName(id, "networkTapRules"); + if (networkTapRuleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'networkTapRules'.", id))); + } + this.delete(resourceGroupName, networkTapRuleName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkTapRuleName = Utils.getValueFromIdByName(id, "networkTapRules"); + if (networkTapRuleName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'networkTapRules'.", id))); + } + this.delete(resourceGroupName, networkTapRuleName, context); + } + + private NetworkTapRulesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + public NetworkTapRuleImpl define(String name) { + return new NetworkTapRuleImpl(name, this.manager()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsClientImpl.java new file mode 100644 index 0000000000000..11964fb614ba8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsClientImpl.java @@ -0,0 +1,2223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapsListResult; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in NetworkTapsClient. */ +public final class NetworkTapsClientImpl implements NetworkTapsClient { + /** The proxy service used to perform REST calls. */ + private final NetworkTapsService service; + + /** The service client containing this operation class. */ + private final AzureNetworkFabricManagementServiceApiImpl client; + + /** + * Initializes an instance of NetworkTapsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NetworkTapsClientImpl(AzureNetworkFabricManagementServiceApiImpl client) { + this.service = + RestProxy.create(NetworkTapsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureNetworkFabricManagementServiceApiNetworkTaps to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureNetworkFabricMa") + public interface NetworkTapsService { + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkTapName") String networkTapName, + @BodyParam("application/json") NetworkTapInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkTapName") String networkTapName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkTapName") String networkTapName, + @BodyParam("application/json") NetworkTapPatch body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkTapName") String networkTapName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTaps") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/updateAdministrativeState") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateAdministrativeState( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkTapName") String networkTapName, + @BodyParam("application/json") UpdateAdministrativeState body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/resync") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resync( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkTapName") String networkTapName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Create Network Tap. + * + *

Creates a Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, String networkTapName, NetworkTapInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapName == null) { + return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .create( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create Network Tap. + * + *

Creates a Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, String networkTapName, NetworkTapInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapName == null) { + return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .create( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapName, + body, + accept, + context); + } + + /** + * Create Network Tap. + * + *

Creates a Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkTapInner> beginCreateAsync( + String resourceGroupName, String networkTapName, NetworkTapInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, networkTapName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NetworkTapInner.class, + NetworkTapInner.class, + this.client.getContext()); + } + + /** + * Create Network Tap. + * + *

Creates a Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkTapInner> beginCreateAsync( + String resourceGroupName, String networkTapName, NetworkTapInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createWithResponseAsync(resourceGroupName, networkTapName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), NetworkTapInner.class, NetworkTapInner.class, context); + } + + /** + * Create Network Tap. + * + *

Creates a Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkTapInner> beginCreate( + String resourceGroupName, String networkTapName, NetworkTapInner body) { + return this.beginCreateAsync(resourceGroupName, networkTapName, body).getSyncPoller(); + } + + /** + * Create Network Tap. + * + *

Creates a Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkTapInner> beginCreate( + String resourceGroupName, String networkTapName, NetworkTapInner body, Context context) { + return this.beginCreateAsync(resourceGroupName, networkTapName, body, context).getSyncPoller(); + } + + /** + * Create Network Tap. + * + *

Creates a Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String networkTapName, NetworkTapInner body) { + return beginCreateAsync(resourceGroupName, networkTapName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create Network Tap. + * + *

Creates a Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, String networkTapName, NetworkTapInner body, Context context) { + return beginCreateAsync(resourceGroupName, networkTapName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create Network Tap. + * + *

Creates a Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkTapInner create(String resourceGroupName, String networkTapName, NetworkTapInner body) { + return createAsync(resourceGroupName, networkTapName, body).block(); + } + + /** + * Create Network Tap. + * + *

Creates a Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkTapInner create( + String resourceGroupName, String networkTapName, NetworkTapInner body, Context context) { + return createAsync(resourceGroupName, networkTapName, body, context).block(); + } + + /** + * Gets a Network Tap. + * + *

Retrieves details of this Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String networkTapName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapName == null) { + return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a Network Tap. + * + *

Retrieves details of this Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String networkTapName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapName == null) { + return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapName, + accept, + context); + } + + /** + * Gets a Network Tap. + * + *

Retrieves details of this Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String networkTapName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkTapName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a Network Tap. + * + *

Retrieves details of this Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String networkTapName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, networkTapName, context).block(); + } + + /** + * Gets a Network Tap. + * + *

Retrieves details of this Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkTapInner getByResourceGroup(String resourceGroupName, String networkTapName) { + return getByResourceGroupWithResponse(resourceGroupName, networkTapName, Context.NONE).getValue(); + } + + /** + * Updates the Network Taps. + * + *

API to update certain properties of the Network Tap resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Network Tap properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String networkTapName, NetworkTapPatch body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapName == null) { + return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the Network Taps. + * + *

API to update certain properties of the Network Tap resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Network Tap properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String networkTapName, NetworkTapPatch body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapName == null) { + return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapName, + body, + accept, + context); + } + + /** + * Updates the Network Taps. + * + *

API to update certain properties of the Network Tap resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Network Tap properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkTapInner> beginUpdateAsync( + String resourceGroupName, String networkTapName, NetworkTapPatch body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, networkTapName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NetworkTapInner.class, + NetworkTapInner.class, + this.client.getContext()); + } + + /** + * Updates the Network Taps. + * + *

API to update certain properties of the Network Tap resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Network Tap properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NetworkTapInner> beginUpdateAsync( + String resourceGroupName, String networkTapName, NetworkTapPatch body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, networkTapName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), NetworkTapInner.class, NetworkTapInner.class, context); + } + + /** + * Updates the Network Taps. + * + *

API to update certain properties of the Network Tap resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Network Tap properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkTapInner> beginUpdate( + String resourceGroupName, String networkTapName, NetworkTapPatch body) { + return this.beginUpdateAsync(resourceGroupName, networkTapName, body).getSyncPoller(); + } + + /** + * Updates the Network Taps. + * + *

API to update certain properties of the Network Tap resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Network Tap properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NetworkTapInner> beginUpdate( + String resourceGroupName, String networkTapName, NetworkTapPatch body, Context context) { + return this.beginUpdateAsync(resourceGroupName, networkTapName, body, context).getSyncPoller(); + } + + /** + * Updates the Network Taps. + * + *

API to update certain properties of the Network Tap resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Network Tap properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String networkTapName, NetworkTapPatch body) { + return beginUpdateAsync(resourceGroupName, networkTapName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates the Network Taps. + * + *

API to update certain properties of the Network Tap resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Network Tap properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String networkTapName, NetworkTapPatch body, Context context) { + return beginUpdateAsync(resourceGroupName, networkTapName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates the Network Taps. + * + *

API to update certain properties of the Network Tap resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Network Tap properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkTapInner update(String resourceGroupName, String networkTapName, NetworkTapPatch body) { + return updateAsync(resourceGroupName, networkTapName, body).block(); + } + + /** + * Updates the Network Taps. + * + *

API to update certain properties of the Network Tap resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Network Tap properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkTapInner update( + String resourceGroupName, String networkTapName, NetworkTapPatch body, Context context) { + return updateAsync(resourceGroupName, networkTapName, body, context).block(); + } + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String networkTapName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapName == null) { + return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String networkTapName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapName == null) { + return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapName, + accept, + context); + } + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkTapName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkTapName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String networkTapName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkTapName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String networkTapName) { + return this.beginDeleteAsync(resourceGroupName, networkTapName).getSyncPoller(); + } + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String networkTapName, Context context) { + return this.beginDeleteAsync(resourceGroupName, networkTapName, context).getSyncPoller(); + } + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String networkTapName) { + return beginDeleteAsync(resourceGroupName, networkTapName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String networkTapName, Context context) { + return beginDeleteAsync(resourceGroupName, networkTapName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkTapName) { + deleteAsync(resourceGroupName, networkTapName).block(); + } + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkTapName, Context context) { + deleteAsync(resourceGroupName, networkTapName, context).block(); + } + + /** + * List Network Taps by resource group. + * + *

Displays Network Taps list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Network Taps by resource group. + * + *

Displays Network Taps list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Network Taps by resource group. + * + *

Displays Network Taps list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List Network Taps by resource group. + * + *

Displays Network Taps list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List Network Taps by resource group. + * + *

Displays Network Taps list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List Network Taps by resource group. + * + *

Displays Network Taps list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * List Network Taps by subscription. + * + *

Displays Network Taps list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Network Taps by subscription. + * + *

Displays Network Taps list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Network Taps by subscription. + * + *

Displays Network Taps list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List Network Taps by subscription. + * + *

Displays Network Taps list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List Network Taps by subscription. + * + *

Displays Network Taps list by subscription GET method. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List Network Taps by subscription. + * + *

Displays Network Taps list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateAdministrativeStateWithResponseAsync( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapName == null) { + return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateAdministrativeState( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateAdministrativeStateWithResponseAsync( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapName == null) { + return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateAdministrativeState( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapName, + body, + accept, + context); + } + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for device updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body) { + Mono>> mono = + updateAdministrativeStateWithResponseAsync(resourceGroupName, networkTapName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, + this.client.getContext()); + } + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for device updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateAdministrativeStateWithResponseAsync(resourceGroupName, networkTapName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, + context); + } + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for device updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body) { + return this.beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapName, body).getSyncPoller(); + } + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for device updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body, Context context) { + return this + .beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapName, body, context) + .getSyncPoller(); + } + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body, Context context) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, networkTapName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body) { + return updateAdministrativeStateAsync(resourceGroupName, networkTapName, body).block(); + } + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body, Context context) { + return updateAdministrativeStateAsync(resourceGroupName, networkTapName, body, context).block(); + } + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resyncWithResponseAsync(String resourceGroupName, String networkTapName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapName == null) { + return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .resync( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resyncWithResponseAsync( + String resourceGroupName, String networkTapName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkTapName == null) { + return Mono.error(new IllegalArgumentException("Parameter networkTapName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .resync( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkTapName, + accept, + context); + } + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginResyncAsync(String resourceGroupName, String networkTapName) { + Mono>> mono = resyncWithResponseAsync(resourceGroupName, networkTapName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); + } + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginResyncAsync(String resourceGroupName, String networkTapName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = resyncWithResponseAsync(resourceGroupName, networkTapName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); + } + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginResync(String resourceGroupName, String networkTapName) { + return this.beginResyncAsync(resourceGroupName, networkTapName).getSyncPoller(); + } + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginResync(String resourceGroupName, String networkTapName, Context context) { + return this.beginResyncAsync(resourceGroupName, networkTapName, context).getSyncPoller(); + } + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resyncAsync( + String resourceGroupName, String networkTapName) { + return beginResyncAsync(resourceGroupName, networkTapName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resyncAsync( + String resourceGroupName, String networkTapName, Context context) { + return beginResyncAsync(resourceGroupName, networkTapName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner resync(String resourceGroupName, String networkTapName) { + return resyncAsync(resourceGroupName, networkTapName).block(); + } + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner resync( + String resourceGroupName, String networkTapName, Context context) { + return resyncAsync(resourceGroupName, networkTapName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsImpl.java new file mode 100644 index 0000000000000..caa4322595fb0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkTapsImpl.java @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkTapsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTaps; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; + +public final class NetworkTapsImpl implements NetworkTaps { + private static final ClientLogger LOGGER = new ClientLogger(NetworkTapsImpl.class); + + private final NetworkTapsClient innerClient; + + private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; + + public NetworkTapsImpl( + NetworkTapsClient innerClient, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String networkTapName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, networkTapName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new NetworkTapImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NetworkTap getByResourceGroup(String resourceGroupName, String networkTapName) { + NetworkTapInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, networkTapName); + if (inner != null) { + return new NetworkTapImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String networkTapName) { + this.serviceClient().delete(resourceGroupName, networkTapName); + } + + public void delete(String resourceGroupName, String networkTapName, Context context) { + this.serviceClient().delete(resourceGroupName, networkTapName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new NetworkTapImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new NetworkTapImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new NetworkTapImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new NetworkTapImpl(inner1, this.manager())); + } + + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body) { + CommonPostActionResponseForDeviceUpdateInner inner = + this.serviceClient().updateAdministrativeState(resourceGroupName, networkTapName, body); + if (inner != null) { + return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body, Context context) { + CommonPostActionResponseForDeviceUpdateInner inner = + this.serviceClient().updateAdministrativeState(resourceGroupName, networkTapName, body, context); + if (inner != null) { + return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String networkTapName) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().resync(resourceGroupName, networkTapName); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate resync( + String resourceGroupName, String networkTapName, Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().resync(resourceGroupName, networkTapName, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkTap getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkTapName = Utils.getValueFromIdByName(id, "networkTaps"); + if (networkTapName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'networkTaps'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, networkTapName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkTapName = Utils.getValueFromIdByName(id, "networkTaps"); + if (networkTapName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'networkTaps'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, networkTapName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkTapName = Utils.getValueFromIdByName(id, "networkTaps"); + if (networkTapName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'networkTaps'.", id))); + } + this.delete(resourceGroupName, networkTapName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String networkTapName = Utils.getValueFromIdByName(id, "networkTaps"); + if (networkTapName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'networkTaps'.", id))); + } + this.delete(resourceGroupName, networkTapName, context); + } + + private NetworkTapsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager() { + return this.serviceManager; + } + + public NetworkTapImpl define(String name) { + return new NetworkTapImpl(name, this.manager()); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectImpl.java index 6a2c60da6f0f1..bc9e117a717d7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectImpl.java @@ -7,27 +7,31 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.EnabledDisabledState; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3Configuration; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatch; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; import com.azure.resourcemanager.managednetworkfabric.models.NniType; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; public final class NetworkToNetworkInterconnectImpl - implements NetworkToNetworkInterconnect, NetworkToNetworkInterconnect.Definition { + implements NetworkToNetworkInterconnect, + NetworkToNetworkInterconnect.Definition, + NetworkToNetworkInterconnect.Update { private NetworkToNetworkInterconnectInner innerObject; private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; - NetworkToNetworkInterconnectImpl( - NetworkToNetworkInterconnectInner innerObject, - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - public String id() { return this.innerModel().id(); } @@ -48,11 +52,7 @@ public NniType nniType() { return this.innerModel().nniType(); } - public EnabledDisabledState administrativeState() { - return this.innerModel().administrativeState(); - } - - public BooleanEnumProperty isManagementType() { + public IsManagementType isManagementType() { return this.innerModel().isManagementType(); } @@ -64,14 +64,46 @@ public Layer2Configuration layer2Configuration() { return this.innerModel().layer2Configuration(); } - public Layer3Configuration layer3Configuration() { - return this.innerModel().layer3Configuration(); + public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration() { + return this.innerModel().optionBLayer3Configuration(); + } + + public NpbStaticRouteConfiguration npbStaticRouteConfiguration() { + return this.innerModel().npbStaticRouteConfiguration(); + } + + public ImportRoutePolicyInformation importRoutePolicy() { + return this.innerModel().importRoutePolicy(); + } + + public ExportRoutePolicyInformation exportRoutePolicy() { + return this.innerModel().exportRoutePolicy(); + } + + public String egressAclId() { + return this.innerModel().egressAclId(); + } + + public String ingressAclId() { + return this.innerModel().ingressAclId(); + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); } public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + public NetworkToNetworkInterconnectInner innerModel() { return this.innerObject; } @@ -86,6 +118,8 @@ private com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManag private String networkToNetworkInterconnectName; + private NetworkToNetworkInterconnectPatch updateBody; + public NetworkToNetworkInterconnectImpl withExistingNetworkFabric( String resourceGroupName, String networkFabricName) { this.resourceGroupName = resourceGroupName; @@ -124,6 +158,41 @@ public NetworkToNetworkInterconnect create(Context context) { this.networkToNetworkInterconnectName = name; } + public NetworkToNetworkInterconnectImpl update() { + this.updateBody = new NetworkToNetworkInterconnectPatch(); + return this; + } + + public NetworkToNetworkInterconnect apply() { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkToNetworkInterconnects() + .update( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, updateBody, Context.NONE); + return this; + } + + public NetworkToNetworkInterconnect apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNetworkToNetworkInterconnects() + .update(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, updateBody, context); + return this; + } + + NetworkToNetworkInterconnectImpl( + NetworkToNetworkInterconnectInner innerObject, + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.networkFabricName = Utils.getValueFromIdByName(innerObject.id(), "networkFabrics"); + this.networkToNetworkInterconnectName = + Utils.getValueFromIdByName(innerObject.id(), "networkToNetworkInterconnects"); + } + public NetworkToNetworkInterconnect refresh() { this.innerObject = serviceManager @@ -144,28 +213,125 @@ public NetworkToNetworkInterconnect refresh(Context context) { return this; } + public CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState( + UpdateAdministrativeState body) { + return serviceManager + .networkToNetworkInterconnects() + .updateNpbStaticRouteBfdAdministrativeState( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + } + + public CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState( + UpdateAdministrativeState body, Context context) { + return serviceManager + .networkToNetworkInterconnects() + .updateNpbStaticRouteBfdAdministrativeState( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context); + } + + public CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body) { + return serviceManager + .networkToNetworkInterconnects() + .updateAdministrativeState(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + } + + public CommonPostActionResponseForStateUpdate updateAdministrativeState( + UpdateAdministrativeState body, Context context) { + return serviceManager + .networkToNetworkInterconnects() + .updateAdministrativeState( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context); + } + + public NetworkToNetworkInterconnectImpl withUseOptionB(BooleanEnumProperty useOptionB) { + this.innerModel().withUseOptionB(useOptionB); + return this; + } + public NetworkToNetworkInterconnectImpl withNniType(NniType nniType) { this.innerModel().withNniType(nniType); return this; } - public NetworkToNetworkInterconnectImpl withIsManagementType(BooleanEnumProperty isManagementType) { + public NetworkToNetworkInterconnectImpl withIsManagementType(IsManagementType isManagementType) { this.innerModel().withIsManagementType(isManagementType); return this; } - public NetworkToNetworkInterconnectImpl withUseOptionB(BooleanEnumProperty useOptionB) { - this.innerModel().withUseOptionB(useOptionB); - return this; + public NetworkToNetworkInterconnectImpl withLayer2Configuration(Layer2Configuration layer2Configuration) { + if (isInCreateMode()) { + this.innerModel().withLayer2Configuration(layer2Configuration); + return this; + } else { + this.updateBody.withLayer2Configuration(layer2Configuration); + return this; + } } - public NetworkToNetworkInterconnectImpl withLayer2Configuration(Layer2Configuration layer2Configuration) { - this.innerModel().withLayer2Configuration(layer2Configuration); + public NetworkToNetworkInterconnectImpl withOptionBLayer3Configuration( + NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration) { + this.innerModel().withOptionBLayer3Configuration(optionBLayer3Configuration); return this; } - public NetworkToNetworkInterconnectImpl withLayer3Configuration(Layer3Configuration layer3Configuration) { - this.innerModel().withLayer3Configuration(layer3Configuration); + public NetworkToNetworkInterconnectImpl withNpbStaticRouteConfiguration( + NpbStaticRouteConfiguration npbStaticRouteConfiguration) { + if (isInCreateMode()) { + this.innerModel().withNpbStaticRouteConfiguration(npbStaticRouteConfiguration); + return this; + } else { + this.updateBody.withNpbStaticRouteConfiguration(npbStaticRouteConfiguration); + return this; + } + } + + public NetworkToNetworkInterconnectImpl withImportRoutePolicy(ImportRoutePolicyInformation importRoutePolicy) { + if (isInCreateMode()) { + this.innerModel().withImportRoutePolicy(importRoutePolicy); + return this; + } else { + this.updateBody.withImportRoutePolicy(importRoutePolicy); + return this; + } + } + + public NetworkToNetworkInterconnectImpl withExportRoutePolicy(ExportRoutePolicyInformation exportRoutePolicy) { + if (isInCreateMode()) { + this.innerModel().withExportRoutePolicy(exportRoutePolicy); + return this; + } else { + this.updateBody.withExportRoutePolicy(exportRoutePolicy); + return this; + } + } + + public NetworkToNetworkInterconnectImpl withEgressAclId(String egressAclId) { + if (isInCreateMode()) { + this.innerModel().withEgressAclId(egressAclId); + return this; + } else { + this.updateBody.withEgressAclId(egressAclId); + return this; + } + } + + public NetworkToNetworkInterconnectImpl withIngressAclId(String ingressAclId) { + if (isInCreateMode()) { + this.innerModel().withIngressAclId(ingressAclId); + return this; + } else { + this.updateBody.withIngressAclId(ingressAclId); + return this; + } + } + + public NetworkToNetworkInterconnectImpl withOptionBLayer3Configuration( + OptionBLayer3Configuration optionBLayer3Configuration) { + this.updateBody.withOptionBLayer3Configuration(optionBLayer3Configuration); return this; } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsClientImpl.java index dd4b9c6140858..5383a8e367cf3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsClientImpl.java @@ -12,7 +12,9 @@ import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -32,8 +34,11 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPatch; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectsList; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -99,10 +104,26 @@ Mono> get( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, + @BodyParam("application/json") NetworkToNetworkInterconnectPatch body, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}") - @ExpectedResponses({200, 202, 204}) + @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @HostParam("$host") String endpoint, @@ -119,12 +140,44 @@ Mono>> delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( + Mono> listByNetworkFabric( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkFabricName") String networkFabricName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateNpbStaticRouteBfdAdministrativeState") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateNpbStaticRouteBfdAdministrativeState( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, + @BodyParam("application/json") UpdateAdministrativeState body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateAdministrativeState") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateAdministrativeState( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @PathParam("networkFabricName") String networkFabricName, + @PathParam("networkToNetworkInterconnectName") String networkToNetworkInterconnectName, + @BodyParam("application/json") UpdateAdministrativeState body, @HeaderParam("Accept") String accept, Context context); @@ -132,7 +185,7 @@ Mono> list( @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( + Mono> listByNetworkFabricNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, @@ -145,14 +198,14 @@ Mono> listNext( *

Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition along with {@link Response} on successful completion - * of {@link Mono}. + * @return the Network To Network Interconnect resource definition along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -215,15 +268,15 @@ private Mono>> createWithResponseAsync( *

Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition along with {@link Response} on successful completion - * of {@link Mono}. + * @return the Network To Network Interconnect resource definition along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -284,13 +337,13 @@ private Mono>> createWithResponseAsync( *

Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkToNetworkInterconnect resource definition. + * @return the {@link PollerFlux} for polling of the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkToNetworkInterconnectInner> @@ -317,14 +370,14 @@ private Mono>> createWithResponseAsync( *

Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the NetworkToNetworkInterconnect resource definition. + * @return the {@link PollerFlux} for polling of the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkToNetworkInterconnectInner> @@ -354,13 +407,13 @@ private Mono>> createWithResponseAsync( *

Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkToNetworkInterconnect resource definition. + * @return the {@link SyncPoller} for polling of the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkToNetworkInterconnectInner> beginCreate( @@ -379,14 +432,14 @@ public SyncPoller, NetworkToNetwor *

Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the NetworkToNetworkInterconnect resource definition. + * @return the {@link SyncPoller} for polling of the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkToNetworkInterconnectInner> beginCreate( @@ -406,13 +459,13 @@ public SyncPoller, NetworkToNetwor *

Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition on successful completion of {@link Mono}. + * @return the Network To Network Interconnect resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -431,14 +484,14 @@ private Mono createAsync( *

Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition on successful completion of {@link Mono}. + * @return the Network To Network Interconnect resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -458,13 +511,13 @@ private Mono createAsync( *

Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition. + * @return the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkToNetworkInterconnectInner create( @@ -481,14 +534,14 @@ public NetworkToNetworkInterconnectInner create( *

Configuration used to setup CE-PE connectivity PUT Method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition. + * @return the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkToNetworkInterconnectInner create( @@ -507,13 +560,13 @@ public NetworkToNetworkInterconnectInner create( *

Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnect. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition along with {@link Response} on successful completion - * of {@link Mono}. + * @return the Network To Network Interconnect resource definition along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -567,14 +620,14 @@ private Mono> getWithResponseAsync( *

Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnect. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition along with {@link Response} on successful completion - * of {@link Mono}. + * @return the Network To Network Interconnect resource definition along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -625,12 +678,12 @@ private Mono> getWithResponseAsync( *

Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnect. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition on successful completion of {@link Mono}. + * @return the Network To Network Interconnect resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -645,13 +698,13 @@ private Mono getAsync( *

Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnect. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition along with {@link Response}. + * @return the Network To Network Interconnect resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -666,12 +719,12 @@ public Response getWithResponse( *

Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnect. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition. + * @return the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkToNetworkInterconnectInner get( @@ -681,21 +734,26 @@ public NetworkToNetworkInterconnectInner get( } /** - * Deletes a NetworkToNetworkInterconnects. + * Updates a Network To NetworkInterconnects. * - *

Implements NetworkToNetworkInterconnects DELETE method. + *

Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Network to Network Interconnect properties to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the Network To Network Interconnect resource definition along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName) { + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectPatch body) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -722,40 +780,52 @@ private Mono>> deleteWithResponseAsync( new IllegalArgumentException( "Parameter networkToNetworkInterconnectName is required and cannot be null.")); } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .delete( + .update( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, + body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a NetworkToNetworkInterconnects. + * Updates a Network To NetworkInterconnects. * - *

Implements NetworkToNetworkInterconnects DELETE method. + *

Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Network to Network Interconnect properties to update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the Network To Network Interconnect resource definition along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, Context context) { + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectPatch body, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -782,207 +852,265 @@ private Mono>> deleteWithResponseAsync( new IllegalArgumentException( "Parameter networkToNetworkInterconnectName is required and cannot be null.")); } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .delete( + .update( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), networkFabricName, networkToNetworkInterconnectName, + body, accept, context); } /** - * Deletes a NetworkToNetworkInterconnects. + * Updates a Network To NetworkInterconnects. * - *

Implements NetworkToNetworkInterconnects DELETE method. + *

Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Network to Network Interconnect properties to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName) { + private PollerFlux, NetworkToNetworkInterconnectInner> + beginUpdateAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectPatch body) { Mono>> mono = - deleteWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName); + updateWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + NetworkToNetworkInterconnectInner.class, + NetworkToNetworkInterconnectInner.class, + this.client.getContext()); } /** - * Deletes a NetworkToNetworkInterconnects. + * Updates a Network To NetworkInterconnects. * - *

Implements NetworkToNetworkInterconnects DELETE method. + *

Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Network to Network Interconnect properties to update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, Context context) { + private PollerFlux, NetworkToNetworkInterconnectInner> + beginUpdateAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectPatch body, + Context context) { context = this.client.mergeContext(context); Mono>> mono = - deleteWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context); + updateWithResponseAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + NetworkToNetworkInterconnectInner.class, + NetworkToNetworkInterconnectInner.class, + context); } /** - * Deletes a NetworkToNetworkInterconnects. + * Updates a Network To NetworkInterconnects. * - *

Implements NetworkToNetworkInterconnects DELETE method. + *

Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Network to Network Interconnect properties to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName) { + public SyncPoller, NetworkToNetworkInterconnectInner> beginUpdate( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectPatch body) { return this - .beginDeleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName) + .beginUpdateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body) .getSyncPoller(); } /** - * Deletes a NetworkToNetworkInterconnects. + * Updates a Network To NetworkInterconnects. * - *

Implements NetworkToNetworkInterconnects DELETE method. + *

Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Network to Network Interconnect properties to update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, Context context) { + public SyncPoller, NetworkToNetworkInterconnectInner> beginUpdate( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectPatch body, + Context context) { return this - .beginDeleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context) + .beginUpdateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) .getSyncPoller(); } /** - * Deletes a NetworkToNetworkInterconnects. + * Updates a Network To NetworkInterconnects. * - *

Implements NetworkToNetworkInterconnects DELETE method. + *

Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Network to Network Interconnect properties to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the Network To Network Interconnect resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName) { - return beginDeleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName) + private Mono updateAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectPatch body) { + return beginUpdateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a NetworkToNetworkInterconnects. + * Updates a Network To NetworkInterconnects. * - *

Implements NetworkToNetworkInterconnects DELETE method. + *

Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Network to Network Interconnect properties to update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the Network To Network Interconnect resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, Context context) { - return beginDeleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context) + private Mono updateAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectPatch body, + Context context) { + return beginUpdateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) .last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a NetworkToNetworkInterconnects. + * Updates a Network To NetworkInterconnects. * - *

Implements NetworkToNetworkInterconnects DELETE method. + *

Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Network to Network Interconnect properties to update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName) { - deleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName).block(); + public NetworkToNetworkInterconnectInner update( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectPatch body) { + return updateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body).block(); } /** - * Deletes a NetworkToNetworkInterconnects. + * Updates a Network To NetworkInterconnects. * - *

Implements NetworkToNetworkInterconnects DELETE method. + *

Update certain properties of the Network To NetworkInterconnects resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Network to Network Interconnect properties to update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network To Network Interconnect resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, Context context) { - deleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context).block(); + public NetworkToNetworkInterconnectInner update( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + NetworkToNetworkInterconnectPatch body, + Context context) { + return updateAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) + .block(); } /** - * Executes list operation to display Network To Network Interconnects within a Network Fabric. + * Deletes a NetworkToNetworkInterconnects. * - *

Implements Network To Network Interconnects list by Network Fabric GET method. + *

Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkToNetworkInterconnects along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String networkFabricName) { + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1003,48 +1131,46 @@ private Mono> listSinglePageAsy return Mono .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); } + if (networkToNetworkInterconnectName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter networkToNetworkInterconnectName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .list( + .delete( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), networkFabricName, + networkToNetworkInterconnectName, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Executes list operation to display Network To Network Interconnects within a Network Fabric. + * Deletes a NetworkToNetworkInterconnects. * - *

Implements Network To Network Interconnects list by Network Fabric GET method. + *

Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkToNetworkInterconnects along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String networkFabricName, Context context) { + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1065,102 +1191,1145 @@ private Mono> listSinglePageAsy return Mono .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); } + if (networkToNetworkInterconnectName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter networkToNetworkInterconnectName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( + .delete( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), networkFabricName, + networkToNetworkInterconnectName, accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + context); } /** - * Executes list operation to display Network To Network Interconnects within a Network Fabric. + * Deletes a NetworkToNetworkInterconnects. * - *

Implements Network To Network Interconnects list by Network Fabric GET method. + *

Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkToNetworkInterconnects as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String networkFabricName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, networkFabricName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Executes list operation to display Network To Network Interconnects within a Network Fabric. + * Deletes a NetworkToNetworkInterconnects. * - *

Implements Network To Network Interconnects list by Network Fabric GET method. + *

Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkToNetworkInterconnects as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String networkFabricName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, networkFabricName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Executes list operation to display Network To Network Interconnects within a Network Fabric. + * Deletes a NetworkToNetworkInterconnects. * - *

Implements Network To Network Interconnects list by Network Fabric GET method. + *

Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkToNetworkInterconnects as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String networkFabricName) { - return new PagedIterable<>(listAsync(resourceGroupName, networkFabricName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName) { + return this + .beginDeleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName) + .getSyncPoller(); + } + + /** + * Deletes a NetworkToNetworkInterconnects. + * + *

Implements NetworkToNetworkInterconnects DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, Context context) { + return this + .beginDeleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context) + .getSyncPoller(); + } + + /** + * Deletes a NetworkToNetworkInterconnects. + * + *

Implements NetworkToNetworkInterconnects DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName) { + return beginDeleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a NetworkToNetworkInterconnects. + * + *

Implements NetworkToNetworkInterconnects DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, Context context) { + return beginDeleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a NetworkToNetworkInterconnects. + * + *

Implements NetworkToNetworkInterconnects DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName) { + deleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName).block(); + } + + /** + * Deletes a NetworkToNetworkInterconnects. + * + *

Implements NetworkToNetworkInterconnects DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, Context context) { + deleteAsync(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context).block(); + } + + /** + * Executes list operation to display Network To Network Interconnects within a Network Fabric. + * + *

Implements Network To Network Interconnects list by Network Fabric GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Network To Network Interconnects along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNetworkFabricSinglePageAsync( + String resourceGroupName, String networkFabricName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByNetworkFabric( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Executes list operation to display Network To Network Interconnects within a Network Fabric. + * + *

Implements Network To Network Interconnects list by Network Fabric GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Network To Network Interconnects along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNetworkFabricSinglePageAsync( + String resourceGroupName, String networkFabricName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByNetworkFabric( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Executes list operation to display Network To Network Interconnects within a Network Fabric. + * + *

Implements Network To Network Interconnects list by Network Fabric GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Network To Network Interconnects as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNetworkFabricAsync( + String resourceGroupName, String networkFabricName) { + return new PagedFlux<>( + () -> listByNetworkFabricSinglePageAsync(resourceGroupName, networkFabricName), + nextLink -> listByNetworkFabricNextSinglePageAsync(nextLink)); + } + + /** + * Executes list operation to display Network To Network Interconnects within a Network Fabric. + * + *

Implements Network To Network Interconnects list by Network Fabric GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Network To Network Interconnects as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNetworkFabricAsync( + String resourceGroupName, String networkFabricName, Context context) { + return new PagedFlux<>( + () -> listByNetworkFabricSinglePageAsync(resourceGroupName, networkFabricName, context), + nextLink -> listByNetworkFabricNextSinglePageAsync(nextLink, context)); + } + + /** + * Executes list operation to display Network To Network Interconnects within a Network Fabric. + * + *

Implements Network To Network Interconnects list by Network Fabric GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Network To Network Interconnects as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNetworkFabric( + String resourceGroupName, String networkFabricName) { + return new PagedIterable<>(listByNetworkFabricAsync(resourceGroupName, networkFabricName)); } /** * Executes list operation to display Network To Network Interconnects within a Network Fabric. * - *

Implements Network To Network Interconnects list by Network Fabric GET method. + *

Implements Network To Network Interconnects list by Network Fabric GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Network To Network Interconnects as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNetworkFabric( + String resourceGroupName, String networkFabricName, Context context) { + return new PagedIterable<>(listByNetworkFabricAsync(resourceGroupName, networkFabricName, context)); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateNpbStaticRouteBfdAdministrativeStateWithResponseAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + if (networkToNetworkInterconnectName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter networkToNetworkInterconnectName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateNpbStaticRouteBfdAdministrativeState( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + networkToNetworkInterconnectName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateNpbStaticRouteBfdAdministrativeStateWithResponseAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + if (networkToNetworkInterconnectName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter networkToNetworkInterconnectName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateNpbStaticRouteBfdAdministrativeState( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + networkToNetworkInterconnectName, + body, + accept, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateNpbStaticRouteBfdAdministrativeStateAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body) { + Mono>> mono = + updateNpbStaticRouteBfdAdministrativeStateWithResponseAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateNpbStaticRouteBfdAdministrativeStateAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateNpbStaticRouteBfdAdministrativeStateWithResponseAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateNpbStaticRouteBfdAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body) { + return this + .beginUpdateNpbStaticRouteBfdAdministrativeStateAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body) + .getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateNpbStaticRouteBfdAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context) { + return this + .beginUpdateNpbStaticRouteBfdAdministrativeStateAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) + .getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateNpbStaticRouteBfdAdministrativeStateAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body) { + return beginUpdateNpbStaticRouteBfdAdministrativeStateAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateNpbStaticRouteBfdAdministrativeStateAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context) { + return beginUpdateNpbStaticRouteBfdAdministrativeStateAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body) { + return updateNpbStaticRouteBfdAdministrativeStateAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body) + .block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateNpbStaticRouteBfdAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context) { + return updateNpbStaticRouteBfdAdministrativeStateAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) + .block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateAdministrativeStateWithResponseAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + if (networkToNetworkInterconnectName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter networkToNetworkInterconnectName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateAdministrativeState( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + networkToNetworkInterconnectName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkToNetworkInterconnects as paginated response with {@link PagedIterable}. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String networkFabricName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, networkFabricName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateAdministrativeStateWithResponseAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (networkFabricName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkFabricName is required and cannot be null.")); + } + if (networkToNetworkInterconnectName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter networkToNetworkInterconnectName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateAdministrativeState( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + networkFabricName, + networkToNetworkInterconnectName, + body, + accept, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body) { + Mono>> mono = + updateAdministrativeStateWithResponseAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateAdministrativeStateWithResponseAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body) { + return this + .beginUpdateAdministrativeStateAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body) + .getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context) { + return this + .beginUpdateAdministrativeStateAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) + .getSyncPoller(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body) { + return beginUpdateAdministrativeStateAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context) { + return beginUpdateAdministrativeStateAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body) { + return updateAdministrativeStateAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body) + .block(); + } + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner updateAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context) { + return updateAdministrativeStateAsync( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context) + .block(); } /** @@ -1171,11 +2340,12 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkToNetworkInterconnects along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of Network To Network Interconnects along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listByNetworkFabricNextSinglePageAsync( + String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1187,7 +2357,8 @@ private Mono> listNextSinglePag } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext( + context -> service.listByNetworkFabricNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( res -> new PagedResponseBase<>( @@ -1209,11 +2380,11 @@ private Mono> listNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkToNetworkInterconnects along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of Network To Network Interconnects along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( + private Mono> listByNetworkFabricNextSinglePageAsync( String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -1227,7 +2398,7 @@ private Mono> listNextSinglePag final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) + .listByNetworkFabricNext(nextLink, this.client.getEndpoint(), accept, context) .map( res -> new PagedResponseBase<>( diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsImpl.java index 32d040907b38b..2635d523b4d60 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/NetworkToNetworkInterconnectsImpl.java @@ -10,9 +10,12 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.NetworkToNetworkInterconnectsClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnects; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; public final class NetworkToNetworkInterconnectsImpl implements NetworkToNetworkInterconnects { private static final ClientLogger LOGGER = new ClientLogger(NetworkToNetworkInterconnectsImpl.class); @@ -65,19 +68,90 @@ public void delete( this.serviceClient().delete(resourceGroupName, networkFabricName, networkToNetworkInterconnectName, context); } - public PagedIterable list(String resourceGroupName, String networkFabricName) { + public PagedIterable listByNetworkFabric( + String resourceGroupName, String networkFabricName) { PagedIterable inner = - this.serviceClient().list(resourceGroupName, networkFabricName); + this.serviceClient().listByNetworkFabric(resourceGroupName, networkFabricName); return Utils.mapPage(inner, inner1 -> new NetworkToNetworkInterconnectImpl(inner1, this.manager())); } - public PagedIterable list( + public PagedIterable listByNetworkFabric( String resourceGroupName, String networkFabricName, Context context) { PagedIterable inner = - this.serviceClient().list(resourceGroupName, networkFabricName, context); + this.serviceClient().listByNetworkFabric(resourceGroupName, networkFabricName, context); return Utils.mapPage(inner, inner1 -> new NetworkToNetworkInterconnectImpl(inner1, this.manager())); } + public CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body) { + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateNpbStaticRouteBfdAdministrativeState( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateNpbStaticRouteBfdAdministrativeState( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate updateAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body) { + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateAdministrativeState( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate updateAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this + .serviceClient() + .updateAdministrativeState( + resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + public NetworkToNetworkInterconnect getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesClientImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesClientImpl.java index 27934c6223c5b..e02924709e037 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesClientImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesClientImpl.java @@ -14,6 +14,7 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -33,9 +34,13 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; import com.azure.resourcemanager.managednetworkfabric.models.RoutePoliciesListResult; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatch; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -113,7 +118,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}") - @ExpectedResponses({200, 202, 204}) + @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @HostParam("$host") String endpoint, @@ -148,6 +153,49 @@ Mono> list( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/updateAdministrativeState") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateAdministrativeState( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("routePolicyName") String routePolicyName, + @BodyParam("application/json") UpdateAdministrativeState body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/validateConfiguration") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> validateConfiguration( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("routePolicyName") String routePolicyName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/commitConfiguration") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> commitConfiguration( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("routePolicyName") String routePolicyName, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -1476,6 +1524,838 @@ public PagedIterable list(Context context) { return new PagedIterable<>(listAsync(context)); } + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateAdministrativeStateWithResponseAsync( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (routePolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateAdministrativeState( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + routePolicyName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateAdministrativeStateWithResponseAsync( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (routePolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateAdministrativeState( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + routePolicyName, + body, + accept, + context); + } + + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for device updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body) { + Mono>> mono = + updateAdministrativeStateWithResponseAsync(resourceGroupName, routePolicyName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, + this.client.getContext()); + } + + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for device updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeStateAsync( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateAdministrativeStateWithResponseAsync(resourceGroupName, routePolicyName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForDeviceUpdateInner.class, + CommonPostActionResponseForDeviceUpdateInner.class, + context); + } + + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for device updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body) { + return this.beginUpdateAdministrativeStateAsync(resourceGroupName, routePolicyName, body).getSyncPoller(); + } + + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for device updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForDeviceUpdateInner> + beginUpdateAdministrativeState( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body, Context context) { + return this + .beginUpdateAdministrativeStateAsync(resourceGroupName, routePolicyName, body, context) + .getSyncPoller(); + } + + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, routePolicyName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAdministrativeStateAsync( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body, Context context) { + return beginUpdateAdministrativeStateAsync(resourceGroupName, routePolicyName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body) { + return updateAdministrativeStateAsync(resourceGroupName, routePolicyName, body).block(); + } + + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForDeviceUpdateInner updateAdministrativeState( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body, Context context) { + return updateAdministrativeStateAsync(resourceGroupName, routePolicyName, body, context).block(); + } + + /** + * Validates the configuration of the resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateConfigurationWithResponseAsync( + String resourceGroupName, String routePolicyName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (routePolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .validateConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + routePolicyName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Validates the configuration of the resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateConfigurationWithResponseAsync( + String resourceGroupName, String routePolicyName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (routePolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .validateConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + routePolicyName, + accept, + context); + } + + /** + * Validates the configuration of the resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ValidateConfigurationResponseInner> + beginValidateConfigurationAsync(String resourceGroupName, String routePolicyName) { + Mono>> mono = + validateConfigurationWithResponseAsync(resourceGroupName, routePolicyName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ValidateConfigurationResponseInner.class, + ValidateConfigurationResponseInner.class, + this.client.getContext()); + } + + /** + * Validates the configuration of the resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ValidateConfigurationResponseInner> + beginValidateConfigurationAsync(String resourceGroupName, String routePolicyName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + validateConfigurationWithResponseAsync(resourceGroupName, routePolicyName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ValidateConfigurationResponseInner.class, + ValidateConfigurationResponseInner.class, + context); + } + + /** + * Validates the configuration of the resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String routePolicyName) { + return this.beginValidateConfigurationAsync(resourceGroupName, routePolicyName).getSyncPoller(); + } + + /** + * Validates the configuration of the resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ValidateConfigurationResponseInner> + beginValidateConfiguration(String resourceGroupName, String routePolicyName, Context context) { + return this.beginValidateConfigurationAsync(resourceGroupName, routePolicyName, context).getSyncPoller(); + } + + /** + * Validates the configuration of the resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateConfigurationAsync( + String resourceGroupName, String routePolicyName) { + return beginValidateConfigurationAsync(resourceGroupName, routePolicyName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Validates the configuration of the resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateConfigurationAsync( + String resourceGroupName, String routePolicyName, Context context) { + return beginValidateConfigurationAsync(resourceGroupName, routePolicyName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Validates the configuration of the resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidateConfigurationResponseInner validateConfiguration(String resourceGroupName, String routePolicyName) { + return validateConfigurationAsync(resourceGroupName, routePolicyName).block(); + } + + /** + * Validates the configuration of the resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidateConfigurationResponseInner validateConfiguration( + String resourceGroupName, String routePolicyName, Context context) { + return validateConfigurationAsync(resourceGroupName, routePolicyName, context).block(); + } + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> commitConfigurationWithResponseAsync( + String resourceGroupName, String routePolicyName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (routePolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .commitConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + routePolicyName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> commitConfigurationWithResponseAsync( + String resourceGroupName, String routePolicyName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (routePolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter routePolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .commitConfiguration( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + routePolicyName, + accept, + context); + } + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginCommitConfigurationAsync(String resourceGroupName, String routePolicyName) { + Mono>> mono = + commitConfigurationWithResponseAsync(resourceGroupName, routePolicyName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + this.client.getContext()); + } + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginCommitConfigurationAsync(String resourceGroupName, String routePolicyName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + commitConfigurationWithResponseAsync(resourceGroupName, routePolicyName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CommonPostActionResponseForStateUpdateInner.class, + CommonPostActionResponseForStateUpdateInner.class, + context); + } + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginCommitConfiguration(String resourceGroupName, String routePolicyName) { + return this.beginCommitConfigurationAsync(resourceGroupName, routePolicyName).getSyncPoller(); + } + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, CommonPostActionResponseForStateUpdateInner> + beginCommitConfiguration(String resourceGroupName, String routePolicyName, Context context) { + return this.beginCommitConfigurationAsync(resourceGroupName, routePolicyName, context).getSyncPoller(); + } + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono commitConfigurationAsync( + String resourceGroupName, String routePolicyName) { + return beginCommitConfigurationAsync(resourceGroupName, routePolicyName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono commitConfigurationAsync( + String resourceGroupName, String routePolicyName, Context context) { + return beginCommitConfigurationAsync(resourceGroupName, routePolicyName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner commitConfiguration( + String resourceGroupName, String routePolicyName) { + return commitConfigurationAsync(resourceGroupName, routePolicyName).block(); + } + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommonPostActionResponseForStateUpdateInner commitConfiguration( + String resourceGroupName, String routePolicyName, Context context) { + return commitConfigurationAsync(resourceGroupName, routePolicyName, context).block(); + } + /** * Get the next page of items. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesImpl.java index bc0069451626f..ac248224bfa92 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePoliciesImpl.java @@ -10,9 +10,16 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.managednetworkfabric.fluent.RoutePoliciesClient; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicies; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; public final class RoutePoliciesImpl implements RoutePolicies { private static final ClientLogger LOGGER = new ClientLogger(RoutePoliciesImpl.class); @@ -80,6 +87,71 @@ public PagedIterable list(Context context) { return Utils.mapPage(inner, inner1 -> new RoutePolicyImpl(inner1, this.manager())); } + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body) { + CommonPostActionResponseForDeviceUpdateInner inner = + this.serviceClient().updateAdministrativeState(resourceGroupName, routePolicyName, body); + if (inner != null) { + return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body, Context context) { + CommonPostActionResponseForDeviceUpdateInner inner = + this.serviceClient().updateAdministrativeState(resourceGroupName, routePolicyName, body, context); + if (inner != null) { + return new CommonPostActionResponseForDeviceUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String routePolicyName) { + ValidateConfigurationResponseInner inner = + this.serviceClient().validateConfiguration(resourceGroupName, routePolicyName); + if (inner != null) { + return new ValidateConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ValidateConfigurationResponse validateConfiguration( + String resourceGroupName, String routePolicyName, Context context) { + ValidateConfigurationResponseInner inner = + this.serviceClient().validateConfiguration(resourceGroupName, routePolicyName, context); + if (inner != null) { + return new ValidateConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate commitConfiguration( + String resourceGroupName, String routePolicyName) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().commitConfiguration(resourceGroupName, routePolicyName); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public CommonPostActionResponseForStateUpdate commitConfiguration( + String resourceGroupName, String routePolicyName, Context context) { + CommonPostActionResponseForStateUpdateInner inner = + this.serviceClient().commitConfiguration(resourceGroupName, routePolicyName, context); + if (inner != null) { + return new CommonPostActionResponseForStateUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + public RoutePolicy getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePolicyImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePolicyImpl.java index e09b909fa9709..af56783c40065 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePolicyImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/RoutePolicyImpl.java @@ -8,10 +8,17 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner; +import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; +import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForDeviceUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.CommonPostActionResponseForStateUpdate; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatch; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; import java.util.Collections; import java.util.List; import java.util.Map; @@ -50,6 +57,26 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public String networkFabricId() { + return this.innerModel().networkFabricId(); + } + + public AddressFamilyType addressFamilyType() { + return this.innerModel().addressFamilyType(); + } + + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public AdministrativeState administrativeState() { + return this.innerModel().administrativeState(); + } + public List statements() { List inner = this.innerModel().statements(); if (inner != null) { @@ -59,10 +86,6 @@ public List statements() { } } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - public String annotation() { return this.innerModel().annotation(); } @@ -175,6 +198,33 @@ public RoutePolicy refresh(Context context) { return this; } + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body) { + return serviceManager.routePolicies().updateAdministrativeState(resourceGroupName, routePolicyName, body); + } + + public CommonPostActionResponseForDeviceUpdate updateAdministrativeState( + UpdateAdministrativeState body, Context context) { + return serviceManager + .routePolicies() + .updateAdministrativeState(resourceGroupName, routePolicyName, body, context); + } + + public ValidateConfigurationResponse validateConfiguration() { + return serviceManager.routePolicies().validateConfiguration(resourceGroupName, routePolicyName); + } + + public ValidateConfigurationResponse validateConfiguration(Context context) { + return serviceManager.routePolicies().validateConfiguration(resourceGroupName, routePolicyName, context); + } + + public CommonPostActionResponseForStateUpdate commitConfiguration() { + return serviceManager.routePolicies().commitConfiguration(resourceGroupName, routePolicyName); + } + + public CommonPostActionResponseForStateUpdate commitConfiguration(Context context) { + return serviceManager.routePolicies().commitConfiguration(resourceGroupName, routePolicyName, context); + } + public RoutePolicyImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -185,8 +235,8 @@ public RoutePolicyImpl withRegion(String location) { return this; } - public RoutePolicyImpl withStatements(List statements) { - this.innerModel().withStatements(statements); + public RoutePolicyImpl withNetworkFabricId(String networkFabricId) { + this.innerModel().withNetworkFabricId(networkFabricId); return this; } @@ -200,6 +250,21 @@ public RoutePolicyImpl withTags(Map tags) { } } + public RoutePolicyImpl withAddressFamilyType(AddressFamilyType addressFamilyType) { + this.innerModel().withAddressFamilyType(addressFamilyType); + return this; + } + + public RoutePolicyImpl withStatements(List statements) { + if (isInCreateMode()) { + this.innerModel().withStatements(statements); + return this; + } else { + this.updateBody.withStatements(statements); + return this; + } + } + public RoutePolicyImpl withAnnotation(String annotation) { this.innerModel().withAnnotation(annotation); return this; diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ArpPropertiesImpl.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ValidateConfigurationResponseImpl.java similarity index 52% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ArpPropertiesImpl.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ValidateConfigurationResponseImpl.java index 8b818c9b0a5f6..6a8d421180726 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ArpPropertiesImpl.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/implementation/ValidateConfigurationResponseImpl.java @@ -4,42 +4,31 @@ package com.azure.resourcemanager.managednetworkfabric.implementation; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.ArpPropertiesInner; -import com.azure.resourcemanager.managednetworkfabric.models.ArpProperties; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationState; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationResponse; -public final class ArpPropertiesImpl implements ArpProperties { - private ArpPropertiesInner innerObject; +public final class ValidateConfigurationResponseImpl implements ValidateConfigurationResponse { + private ValidateConfigurationResponseInner innerObject; private final com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager; - ArpPropertiesImpl( - ArpPropertiesInner innerObject, + ValidateConfigurationResponseImpl( + ValidateConfigurationResponseInner innerObject, com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } - public String address() { - return this.innerModel().address(); + public ConfigurationState configurationState() { + return this.innerModel().configurationState(); } - public String age() { - return this.innerModel().age(); + public String url() { + return this.innerModel().url(); } - public String macAddress() { - return this.innerModel().macAddress(); - } - - public String interfaceProperty() { - return this.innerModel().interfaceProperty(); - } - - public String state() { - return this.innerModel().state(); - } - - public ArpPropertiesInner innerModel() { + public ValidateConfigurationResponseInner innerModel() { return this.innerObject; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlList.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlList.java index aa7b586111726..102f677119b39 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlList.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlList.java @@ -8,6 +8,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner; +import java.time.OffsetDateTime; import java.util.List; import java.util.Map; @@ -56,26 +57,61 @@ public interface AccessControlList { SystemData systemData(); /** - * Gets the addressFamily property: IP address family. Example: ipv4 | ipv6. + * Gets the lastSyncedTime property: The last synced timestamp. * - * @return the addressFamily value. + * @return the lastSyncedTime value. */ - AddressFamily addressFamily(); + OffsetDateTime lastSyncedTime(); /** - * Gets the conditions property: Access Control List conditions. + * Gets the configurationState property: Configuration state of the resource. * - * @return the conditions value. + * @return the configurationState value. */ - List conditions(); + ConfigurationState configurationState(); /** - * Gets the provisioningState property: Gets the provisioning state of the resource. + * Gets the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ ProvisioningState provisioningState(); + /** + * Gets the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + AdministrativeState administrativeState(); + + /** + * Gets the configurationType property: Input method to configure Access Control List. + * + * @return the configurationType value. + */ + ConfigurationType configurationType(); + + /** + * Gets the aclsUrl property: Access Control List file URL. + * + * @return the aclsUrl value. + */ + String aclsUrl(); + + /** + * Gets the matchConfigurations property: List of match configurations. + * + * @return the matchConfigurations value. + */ + List matchConfigurations(); + + /** + * Gets the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @return the dynamicMatchConfigurations value. + */ + List dynamicMatchConfigurations(); + /** * Gets the annotation property: Switch configuration description. * @@ -116,8 +152,6 @@ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, - DefinitionStages.WithAddressFamily, - DefinitionStages.WithConditions, DefinitionStages.WithCreate { } /** The AccessControlList definition stages. */ @@ -151,33 +185,19 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithAddressFamily withExistingResourceGroup(String resourceGroupName); - } - /** The stage of the AccessControlList definition allowing to specify addressFamily. */ - interface WithAddressFamily { - /** - * Specifies the addressFamily property: IP address family. Example: ipv4 | ipv6.. - * - * @param addressFamily IP address family. Example: ipv4 | ipv6. - * @return the next definition stage. - */ - WithConditions withAddressFamily(AddressFamily addressFamily); - } - /** The stage of the AccessControlList definition allowing to specify conditions. */ - interface WithConditions { - /** - * Specifies the conditions property: Access Control List conditions.. - * - * @param conditions Access Control List conditions. - * @return the next definition stage. - */ - WithCreate withConditions(List conditions); + WithCreate withExistingResourceGroup(String resourceGroupName); } /** * The stage of the AccessControlList definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithAnnotation { + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithConfigurationType, + DefinitionStages.WithAclsUrl, + DefinitionStages.WithMatchConfigurations, + DefinitionStages.WithDynamicMatchConfigurations, + DefinitionStages.WithAnnotation { /** * Executes the create request. * @@ -203,6 +223,46 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the AccessControlList definition allowing to specify configurationType. */ + interface WithConfigurationType { + /** + * Specifies the configurationType property: Input method to configure Access Control List.. + * + * @param configurationType Input method to configure Access Control List. + * @return the next definition stage. + */ + WithCreate withConfigurationType(ConfigurationType configurationType); + } + /** The stage of the AccessControlList definition allowing to specify aclsUrl. */ + interface WithAclsUrl { + /** + * Specifies the aclsUrl property: Access Control List file URL.. + * + * @param aclsUrl Access Control List file URL. + * @return the next definition stage. + */ + WithCreate withAclsUrl(String aclsUrl); + } + /** The stage of the AccessControlList definition allowing to specify matchConfigurations. */ + interface WithMatchConfigurations { + /** + * Specifies the matchConfigurations property: List of match configurations.. + * + * @param matchConfigurations List of match configurations. + * @return the next definition stage. + */ + WithCreate withMatchConfigurations(List matchConfigurations); + } + /** The stage of the AccessControlList definition allowing to specify dynamicMatchConfigurations. */ + interface WithDynamicMatchConfigurations { + /** + * Specifies the dynamicMatchConfigurations property: List of dynamic match configurations.. + * + * @param dynamicMatchConfigurations List of dynamic match configurations. + * @return the next definition stage. + */ + WithCreate withDynamicMatchConfigurations(List dynamicMatchConfigurations); + } /** The stage of the AccessControlList definition allowing to specify annotation. */ interface WithAnnotation { /** @@ -224,9 +284,11 @@ interface WithAnnotation { /** The template for AccessControlList update. */ interface Update extends UpdateStages.WithTags, - UpdateStages.WithAddressFamily, - UpdateStages.WithConditions, - UpdateStages.WithAnnotation { + UpdateStages.WithAnnotation, + UpdateStages.WithConfigurationType, + UpdateStages.WithAclsUrl, + UpdateStages.WithMatchConfigurations, + UpdateStages.WithDynamicMatchConfigurations { /** * Executes the update request. * @@ -254,35 +316,55 @@ interface WithTags { */ Update withTags(Map tags); } - /** The stage of the AccessControlList update allowing to specify addressFamily. */ - interface WithAddressFamily { + /** The stage of the AccessControlList update allowing to specify annotation. */ + interface WithAnnotation { /** - * Specifies the addressFamily property: IP address family. Example: ipv4 | ipv6.. + * Specifies the annotation property: Switch configuration description.. * - * @param addressFamily IP address family. Example: ipv4 | ipv6. + * @param annotation Switch configuration description. * @return the next definition stage. */ - Update withAddressFamily(AddressFamily addressFamily); + Update withAnnotation(String annotation); } - /** The stage of the AccessControlList update allowing to specify conditions. */ - interface WithConditions { + /** The stage of the AccessControlList update allowing to specify configurationType. */ + interface WithConfigurationType { /** - * Specifies the conditions property: Access Control List conditions.. + * Specifies the configurationType property: Input method to configure Access Control List.. * - * @param conditions Access Control List conditions. + * @param configurationType Input method to configure Access Control List. * @return the next definition stage. */ - Update withConditions(List conditions); + Update withConfigurationType(ConfigurationType configurationType); } - /** The stage of the AccessControlList update allowing to specify annotation. */ - interface WithAnnotation { + /** The stage of the AccessControlList update allowing to specify aclsUrl. */ + interface WithAclsUrl { /** - * Specifies the annotation property: Switch configuration description.. + * Specifies the aclsUrl property: Access Control List file URL.. * - * @param annotation Switch configuration description. + * @param aclsUrl Access Control List file URL. * @return the next definition stage. */ - Update withAnnotation(String annotation); + Update withAclsUrl(String aclsUrl); + } + /** The stage of the AccessControlList update allowing to specify matchConfigurations. */ + interface WithMatchConfigurations { + /** + * Specifies the matchConfigurations property: List of match configurations.. + * + * @param matchConfigurations List of match configurations. + * @return the next definition stage. + */ + Update withMatchConfigurations(List matchConfigurations); + } + /** The stage of the AccessControlList update allowing to specify dynamicMatchConfigurations. */ + interface WithDynamicMatchConfigurations { + /** + * Specifies the dynamicMatchConfigurations property: List of dynamic match configurations.. + * + * @param dynamicMatchConfigurations List of dynamic match configurations. + * @return the next definition stage. + */ + Update withDynamicMatchConfigurations(List dynamicMatchConfigurations); } } /** @@ -299,4 +381,79 @@ interface WithAnnotation { * @return the refreshed resource. */ AccessControlList refresh(Context context); + + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); + + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate resync(); + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate resync(Context context); + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + ValidateConfigurationResponse validateConfiguration(); + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + ValidateConfigurationResponse validateConfiguration(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListAction.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListAction.java new file mode 100644 index 0000000000000..2b76f5ec5ce68 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListAction.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Action that need to performed. */ +@Fluent +public final class AccessControlListAction { + /* + * Type of actions that can be performed. + */ + @JsonProperty(value = "type") + private AclActionType type; + + /* + * Name of the counter block to get match count information. + */ + @JsonProperty(value = "counterName") + private String counterName; + + /** Creates an instance of AccessControlListAction class. */ + public AccessControlListAction() { + } + + /** + * Get the type property: Type of actions that can be performed. + * + * @return the type value. + */ + public AclActionType type() { + return this.type; + } + + /** + * Set the type property: Type of actions that can be performed. + * + * @param type the type value to set. + * @return the AccessControlListAction object itself. + */ + public AccessControlListAction withType(AclActionType type) { + this.type = type; + return this; + } + + /** + * Get the counterName property: Name of the counter block to get match count information. + * + * @return the counterName value. + */ + public String counterName() { + return this.counterName; + } + + /** + * Set the counterName property: Name of the counter block to get match count information. + * + * @param counterName the counterName value to set. + * @return the AccessControlListAction object itself. + */ + public AccessControlListAction withCounterName(String counterName) { + this.counterName = counterName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListConditionProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListConditionProperties.java deleted file mode 100644 index f37fcec9e8354..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListConditionProperties.java +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Access Control List condition model. */ -@Fluent -public final class AccessControlListConditionProperties extends AnnotationResource { - /* - * sequenceNumber of the Access Control List. - */ - @JsonProperty(value = "sequenceNumber", required = true) - private int sequenceNumber; - - /* - * action. Example: allow | deny. - */ - @JsonProperty(value = "action", required = true) - private ConditionActionType action; - - /* - * destinationAddress. Example: any | 1.1.1.0/24 | 1.1.10.10 - */ - @JsonProperty(value = "destinationAddress", required = true) - private String destinationAddress; - - /* - * destinationPort. Example: any | 1253 - */ - @JsonProperty(value = "destinationPort", required = true) - private String destinationPort; - - /* - * sourceAddress. Example: any | 1.1.1.0/24 | 1.1.10.10 - */ - @JsonProperty(value = "sourceAddress", required = true) - private String sourceAddress; - - /* - * sourcePort. Example: any | 1253 - */ - @JsonProperty(value = "sourcePort", required = true) - private String sourcePort; - - /* - * TCP/IP protocol as defined in the list of IP protocol numbers. Example: 255 (any) | 0 | 1. - */ - @JsonProperty(value = "protocol", required = true) - private int protocol; - - /** Creates an instance of AccessControlListConditionProperties class. */ - public AccessControlListConditionProperties() { - } - - /** - * Get the sequenceNumber property: sequenceNumber of the Access Control List. - * - * @return the sequenceNumber value. - */ - public int sequenceNumber() { - return this.sequenceNumber; - } - - /** - * Set the sequenceNumber property: sequenceNumber of the Access Control List. - * - * @param sequenceNumber the sequenceNumber value to set. - * @return the AccessControlListConditionProperties object itself. - */ - public AccessControlListConditionProperties withSequenceNumber(int sequenceNumber) { - this.sequenceNumber = sequenceNumber; - return this; - } - - /** - * Get the action property: action. Example: allow | deny. - * - * @return the action value. - */ - public ConditionActionType action() { - return this.action; - } - - /** - * Set the action property: action. Example: allow | deny. - * - * @param action the action value to set. - * @return the AccessControlListConditionProperties object itself. - */ - public AccessControlListConditionProperties withAction(ConditionActionType action) { - this.action = action; - return this; - } - - /** - * Get the destinationAddress property: destinationAddress. Example: any | 1.1.1.0/24 | 1.1.10.10. - * - * @return the destinationAddress value. - */ - public String destinationAddress() { - return this.destinationAddress; - } - - /** - * Set the destinationAddress property: destinationAddress. Example: any | 1.1.1.0/24 | 1.1.10.10. - * - * @param destinationAddress the destinationAddress value to set. - * @return the AccessControlListConditionProperties object itself. - */ - public AccessControlListConditionProperties withDestinationAddress(String destinationAddress) { - this.destinationAddress = destinationAddress; - return this; - } - - /** - * Get the destinationPort property: destinationPort. Example: any | 1253. - * - * @return the destinationPort value. - */ - public String destinationPort() { - return this.destinationPort; - } - - /** - * Set the destinationPort property: destinationPort. Example: any | 1253. - * - * @param destinationPort the destinationPort value to set. - * @return the AccessControlListConditionProperties object itself. - */ - public AccessControlListConditionProperties withDestinationPort(String destinationPort) { - this.destinationPort = destinationPort; - return this; - } - - /** - * Get the sourceAddress property: sourceAddress. Example: any | 1.1.1.0/24 | 1.1.10.10. - * - * @return the sourceAddress value. - */ - public String sourceAddress() { - return this.sourceAddress; - } - - /** - * Set the sourceAddress property: sourceAddress. Example: any | 1.1.1.0/24 | 1.1.10.10. - * - * @param sourceAddress the sourceAddress value to set. - * @return the AccessControlListConditionProperties object itself. - */ - public AccessControlListConditionProperties withSourceAddress(String sourceAddress) { - this.sourceAddress = sourceAddress; - return this; - } - - /** - * Get the sourcePort property: sourcePort. Example: any | 1253. - * - * @return the sourcePort value. - */ - public String sourcePort() { - return this.sourcePort; - } - - /** - * Set the sourcePort property: sourcePort. Example: any | 1253. - * - * @param sourcePort the sourcePort value to set. - * @return the AccessControlListConditionProperties object itself. - */ - public AccessControlListConditionProperties withSourcePort(String sourcePort) { - this.sourcePort = sourcePort; - return this; - } - - /** - * Get the protocol property: TCP/IP protocol as defined in the list of IP protocol numbers. Example: 255 (any) | 0 - * | 1. - * - * @return the protocol value. - */ - public int protocol() { - return this.protocol; - } - - /** - * Set the protocol property: TCP/IP protocol as defined in the list of IP protocol numbers. Example: 255 (any) | 0 - * | 1. - * - * @param protocol the protocol value to set. - * @return the AccessControlListConditionProperties object itself. - */ - public AccessControlListConditionProperties withProtocol(int protocol) { - this.protocol = protocol; - return this; - } - - /** {@inheritDoc} */ - @Override - public AccessControlListConditionProperties withAnnotation(String annotation) { - super.withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (action() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property action in model AccessControlListConditionProperties")); - } - if (destinationAddress() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property destinationAddress in model AccessControlListConditionProperties")); - } - if (destinationPort() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property destinationPort in model AccessControlListConditionProperties")); - } - if (sourceAddress() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceAddress in model AccessControlListConditionProperties")); - } - if (sourcePort() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourcePort in model AccessControlListConditionProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AccessControlListConditionProperties.class); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchCondition.java new file mode 100644 index 0000000000000..5fafb49cf319e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchCondition.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Defines the match condition that is supported to filter the traffic. */ +@Fluent +public final class AccessControlListMatchCondition extends CommonMatchConditions { + /* + * List of ether type values that needs to be matched. + */ + @JsonProperty(value = "etherTypes") + private List etherTypes; + + /* + * List of IP fragment packets that needs to be matched. + */ + @JsonProperty(value = "fragments") + private List fragments; + + /* + * List of IP Lengths that needs to be matched. + */ + @JsonProperty(value = "ipLengths") + private List ipLengths; + + /* + * List of TTL [Time To Live] values that needs to be matched. + */ + @JsonProperty(value = "ttlValues") + private List ttlValues; + + /* + * List of DSCP Markings that needs to be matched. + */ + @JsonProperty(value = "dscpMarkings") + private List dscpMarkings; + + /* + * Defines the port condition that needs to be matched. + */ + @JsonProperty(value = "portCondition") + private AccessControlListPortCondition portCondition; + + /** Creates an instance of AccessControlListMatchCondition class. */ + public AccessControlListMatchCondition() { + } + + /** + * Get the etherTypes property: List of ether type values that needs to be matched. + * + * @return the etherTypes value. + */ + public List etherTypes() { + return this.etherTypes; + } + + /** + * Set the etherTypes property: List of ether type values that needs to be matched. + * + * @param etherTypes the etherTypes value to set. + * @return the AccessControlListMatchCondition object itself. + */ + public AccessControlListMatchCondition withEtherTypes(List etherTypes) { + this.etherTypes = etherTypes; + return this; + } + + /** + * Get the fragments property: List of IP fragment packets that needs to be matched. + * + * @return the fragments value. + */ + public List fragments() { + return this.fragments; + } + + /** + * Set the fragments property: List of IP fragment packets that needs to be matched. + * + * @param fragments the fragments value to set. + * @return the AccessControlListMatchCondition object itself. + */ + public AccessControlListMatchCondition withFragments(List fragments) { + this.fragments = fragments; + return this; + } + + /** + * Get the ipLengths property: List of IP Lengths that needs to be matched. + * + * @return the ipLengths value. + */ + public List ipLengths() { + return this.ipLengths; + } + + /** + * Set the ipLengths property: List of IP Lengths that needs to be matched. + * + * @param ipLengths the ipLengths value to set. + * @return the AccessControlListMatchCondition object itself. + */ + public AccessControlListMatchCondition withIpLengths(List ipLengths) { + this.ipLengths = ipLengths; + return this; + } + + /** + * Get the ttlValues property: List of TTL [Time To Live] values that needs to be matched. + * + * @return the ttlValues value. + */ + public List ttlValues() { + return this.ttlValues; + } + + /** + * Set the ttlValues property: List of TTL [Time To Live] values that needs to be matched. + * + * @param ttlValues the ttlValues value to set. + * @return the AccessControlListMatchCondition object itself. + */ + public AccessControlListMatchCondition withTtlValues(List ttlValues) { + this.ttlValues = ttlValues; + return this; + } + + /** + * Get the dscpMarkings property: List of DSCP Markings that needs to be matched. + * + * @return the dscpMarkings value. + */ + public List dscpMarkings() { + return this.dscpMarkings; + } + + /** + * Set the dscpMarkings property: List of DSCP Markings that needs to be matched. + * + * @param dscpMarkings the dscpMarkings value to set. + * @return the AccessControlListMatchCondition object itself. + */ + public AccessControlListMatchCondition withDscpMarkings(List dscpMarkings) { + this.dscpMarkings = dscpMarkings; + return this; + } + + /** + * Get the portCondition property: Defines the port condition that needs to be matched. + * + * @return the portCondition value. + */ + public AccessControlListPortCondition portCondition() { + return this.portCondition; + } + + /** + * Set the portCondition property: Defines the port condition that needs to be matched. + * + * @param portCondition the portCondition value to set. + * @return the AccessControlListMatchCondition object itself. + */ + public AccessControlListMatchCondition withPortCondition(AccessControlListPortCondition portCondition) { + this.portCondition = portCondition; + return this; + } + + /** {@inheritDoc} */ + @Override + public AccessControlListMatchCondition withProtocolTypes(List protocolTypes) { + super.withProtocolTypes(protocolTypes); + return this; + } + + /** {@inheritDoc} */ + @Override + public AccessControlListMatchCondition withVlanMatchCondition(VlanMatchCondition vlanMatchCondition) { + super.withVlanMatchCondition(vlanMatchCondition); + return this; + } + + /** {@inheritDoc} */ + @Override + public AccessControlListMatchCondition withIpCondition(IpMatchCondition ipCondition) { + super.withIpCondition(ipCondition); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (portCondition() != null) { + portCondition().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfiguration.java new file mode 100644 index 0000000000000..ef8d1c727aa64 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListMatchConfiguration.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Defines the match configuration that are supported to filter the traffic. */ +@Fluent +public final class AccessControlListMatchConfiguration { + /* + * The name of the match configuration. + */ + @JsonProperty(value = "matchConfigurationName") + private String matchConfigurationName; + + /* + * Sequence Number of the match configuration. + */ + @JsonProperty(value = "sequenceNumber") + private Long sequenceNumber; + + /* + * Type of IP Address. IPv4 or IPv6 + */ + @JsonProperty(value = "ipAddressType") + private IpAddressType ipAddressType; + + /* + * List of the match conditions. + */ + @JsonProperty(value = "matchConditions") + private List matchConditions; + + /* + * List of actions that need to be performed for the matched conditions. + */ + @JsonProperty(value = "actions") + private List actions; + + /** Creates an instance of AccessControlListMatchConfiguration class. */ + public AccessControlListMatchConfiguration() { + } + + /** + * Get the matchConfigurationName property: The name of the match configuration. + * + * @return the matchConfigurationName value. + */ + public String matchConfigurationName() { + return this.matchConfigurationName; + } + + /** + * Set the matchConfigurationName property: The name of the match configuration. + * + * @param matchConfigurationName the matchConfigurationName value to set. + * @return the AccessControlListMatchConfiguration object itself. + */ + public AccessControlListMatchConfiguration withMatchConfigurationName(String matchConfigurationName) { + this.matchConfigurationName = matchConfigurationName; + return this; + } + + /** + * Get the sequenceNumber property: Sequence Number of the match configuration. + * + * @return the sequenceNumber value. + */ + public Long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set the sequenceNumber property: Sequence Number of the match configuration. + * + * @param sequenceNumber the sequenceNumber value to set. + * @return the AccessControlListMatchConfiguration object itself. + */ + public AccessControlListMatchConfiguration withSequenceNumber(Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get the ipAddressType property: Type of IP Address. IPv4 or IPv6. + * + * @return the ipAddressType value. + */ + public IpAddressType ipAddressType() { + return this.ipAddressType; + } + + /** + * Set the ipAddressType property: Type of IP Address. IPv4 or IPv6. + * + * @param ipAddressType the ipAddressType value to set. + * @return the AccessControlListMatchConfiguration object itself. + */ + public AccessControlListMatchConfiguration withIpAddressType(IpAddressType ipAddressType) { + this.ipAddressType = ipAddressType; + return this; + } + + /** + * Get the matchConditions property: List of the match conditions. + * + * @return the matchConditions value. + */ + public List matchConditions() { + return this.matchConditions; + } + + /** + * Set the matchConditions property: List of the match conditions. + * + * @param matchConditions the matchConditions value to set. + * @return the AccessControlListMatchConfiguration object itself. + */ + public AccessControlListMatchConfiguration withMatchConditions( + List matchConditions) { + this.matchConditions = matchConditions; + return this; + } + + /** + * Get the actions property: List of actions that need to be performed for the matched conditions. + * + * @return the actions value. + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions property: List of actions that need to be performed for the matched conditions. + * + * @param actions the actions value to set. + * @return the AccessControlListMatchConfiguration object itself. + */ + public AccessControlListMatchConfiguration withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (matchConditions() != null) { + matchConditions().forEach(e -> e.validate()); + } + if (actions() != null) { + actions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatch.java index cabed0cc81c71..9e42af7590955 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatch.java @@ -6,33 +6,25 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListPatchProperties; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; -/** The AccessControlList patch resource definition. */ +/** The Access Control Lists patch resource definition. */ @Fluent -public final class AccessControlListPatch { +public final class AccessControlListPatch extends TagsUpdate { /* - * Resource properties. + * Access Control Lists patch properties. */ @JsonProperty(value = "properties") private AccessControlListPatchProperties innerProperties; - /* - * Resource tags - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - /** Creates an instance of AccessControlListPatch class. */ public AccessControlListPatch() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: Access Control Lists patch properties. * * @return the innerProperties value. */ @@ -40,92 +32,127 @@ private AccessControlListPatchProperties innerProperties() { return this.innerProperties; } + /** {@inheritDoc} */ + @Override + public AccessControlListPatch withTags(Map tags) { + super.withTags(tags); + return this; + } + /** - * Get the tags property: Resource tags. + * Get the annotation property: Switch configuration description. * - * @return the tags value. + * @return the annotation value. */ - public Map tags() { - return this.tags; + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); } /** - * Set the tags property: Resource tags. + * Set the annotation property: Switch configuration description. * - * @param tags the tags value to set. + * @param annotation the annotation value to set. * @return the AccessControlListPatch object itself. */ - public AccessControlListPatch withTags(Map tags) { - this.tags = tags; + public AccessControlListPatch withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessControlListPatchProperties(); + } + this.innerProperties().withAnnotation(annotation); return this; } /** - * Get the addressFamily property: IP address family. Example: ipv4 | ipv6. + * Get the configurationType property: Input method to configure Access Control List. * - * @return the addressFamily value. + * @return the configurationType value. */ - public AddressFamily addressFamily() { - return this.innerProperties() == null ? null : this.innerProperties().addressFamily(); + public ConfigurationType configurationType() { + return this.innerProperties() == null ? null : this.innerProperties().configurationType(); } /** - * Set the addressFamily property: IP address family. Example: ipv4 | ipv6. + * Set the configurationType property: Input method to configure Access Control List. * - * @param addressFamily the addressFamily value to set. + * @param configurationType the configurationType value to set. * @return the AccessControlListPatch object itself. */ - public AccessControlListPatch withAddressFamily(AddressFamily addressFamily) { + public AccessControlListPatch withConfigurationType(ConfigurationType configurationType) { if (this.innerProperties() == null) { this.innerProperties = new AccessControlListPatchProperties(); } - this.innerProperties().withAddressFamily(addressFamily); + this.innerProperties().withConfigurationType(configurationType); return this; } /** - * Get the conditions property: Access Control List conditions. + * Get the aclsUrl property: Access Control List file URL. * - * @return the conditions value. + * @return the aclsUrl value. */ - public List conditions() { - return this.innerProperties() == null ? null : this.innerProperties().conditions(); + public String aclsUrl() { + return this.innerProperties() == null ? null : this.innerProperties().aclsUrl(); } /** - * Set the conditions property: Access Control List conditions. + * Set the aclsUrl property: Access Control List file URL. * - * @param conditions the conditions value to set. + * @param aclsUrl the aclsUrl value to set. * @return the AccessControlListPatch object itself. */ - public AccessControlListPatch withConditions(List conditions) { + public AccessControlListPatch withAclsUrl(String aclsUrl) { if (this.innerProperties() == null) { this.innerProperties = new AccessControlListPatchProperties(); } - this.innerProperties().withConditions(conditions); + this.innerProperties().withAclsUrl(aclsUrl); return this; } /** - * Get the annotation property: Switch configuration description. + * Get the matchConfigurations property: List of match configurations. * - * @return the annotation value. + * @return the matchConfigurations value. */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); + public List matchConfigurations() { + return this.innerProperties() == null ? null : this.innerProperties().matchConfigurations(); } /** - * Set the annotation property: Switch configuration description. + * Set the matchConfigurations property: List of match configurations. * - * @param annotation the annotation value to set. + * @param matchConfigurations the matchConfigurations value to set. * @return the AccessControlListPatch object itself. */ - public AccessControlListPatch withAnnotation(String annotation) { + public AccessControlListPatch withMatchConfigurations( + List matchConfigurations) { if (this.innerProperties() == null) { this.innerProperties = new AccessControlListPatchProperties(); } - this.innerProperties().withAnnotation(annotation); + this.innerProperties().withMatchConfigurations(matchConfigurations); + return this; + } + + /** + * Get the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @return the dynamicMatchConfigurations value. + */ + public List dynamicMatchConfigurations() { + return this.innerProperties() == null ? null : this.innerProperties().dynamicMatchConfigurations(); + } + + /** + * Set the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @param dynamicMatchConfigurations the dynamicMatchConfigurations value to set. + * @return the AccessControlListPatch object itself. + */ + public AccessControlListPatch withDynamicMatchConfigurations( + List dynamicMatchConfigurations) { + if (this.innerProperties() == null) { + this.innerProperties = new AccessControlListPatchProperties(); + } + this.innerProperties().withDynamicMatchConfigurations(dynamicMatchConfigurations); return this; } @@ -134,7 +161,9 @@ public AccessControlListPatch withAnnotation(String annotation) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { + super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatchableProperties.java new file mode 100644 index 0000000000000..1f3f0e76f1190 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPatchableProperties.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Access Control List Patch Properties defines the patchable resource properties. */ +@Fluent +public class AccessControlListPatchableProperties { + /* + * Input method to configure Access Control List. + */ + @JsonProperty(value = "configurationType") + private ConfigurationType configurationType; + + /* + * Access Control List file URL. + */ + @JsonProperty(value = "aclsUrl") + private String aclsUrl; + + /* + * List of match configurations. + */ + @JsonProperty(value = "matchConfigurations") + private List matchConfigurations; + + /* + * List of dynamic match configurations. + */ + @JsonProperty(value = "dynamicMatchConfigurations") + private List dynamicMatchConfigurations; + + /** Creates an instance of AccessControlListPatchableProperties class. */ + public AccessControlListPatchableProperties() { + } + + /** + * Get the configurationType property: Input method to configure Access Control List. + * + * @return the configurationType value. + */ + public ConfigurationType configurationType() { + return this.configurationType; + } + + /** + * Set the configurationType property: Input method to configure Access Control List. + * + * @param configurationType the configurationType value to set. + * @return the AccessControlListPatchableProperties object itself. + */ + public AccessControlListPatchableProperties withConfigurationType(ConfigurationType configurationType) { + this.configurationType = configurationType; + return this; + } + + /** + * Get the aclsUrl property: Access Control List file URL. + * + * @return the aclsUrl value. + */ + public String aclsUrl() { + return this.aclsUrl; + } + + /** + * Set the aclsUrl property: Access Control List file URL. + * + * @param aclsUrl the aclsUrl value to set. + * @return the AccessControlListPatchableProperties object itself. + */ + public AccessControlListPatchableProperties withAclsUrl(String aclsUrl) { + this.aclsUrl = aclsUrl; + return this; + } + + /** + * Get the matchConfigurations property: List of match configurations. + * + * @return the matchConfigurations value. + */ + public List matchConfigurations() { + return this.matchConfigurations; + } + + /** + * Set the matchConfigurations property: List of match configurations. + * + * @param matchConfigurations the matchConfigurations value to set. + * @return the AccessControlListPatchableProperties object itself. + */ + public AccessControlListPatchableProperties withMatchConfigurations( + List matchConfigurations) { + this.matchConfigurations = matchConfigurations; + return this; + } + + /** + * Get the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @return the dynamicMatchConfigurations value. + */ + public List dynamicMatchConfigurations() { + return this.dynamicMatchConfigurations; + } + + /** + * Set the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @param dynamicMatchConfigurations the dynamicMatchConfigurations value to set. + * @return the AccessControlListPatchableProperties object itself. + */ + public AccessControlListPatchableProperties withDynamicMatchConfigurations( + List dynamicMatchConfigurations) { + this.dynamicMatchConfigurations = dynamicMatchConfigurations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (matchConfigurations() != null) { + matchConfigurations().forEach(e -> e.validate()); + } + if (dynamicMatchConfigurations() != null) { + dynamicMatchConfigurations().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortCondition.java new file mode 100644 index 0000000000000..f191a40090fb0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListPortCondition.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Defines the port condition that needs to be matched. */ +@Fluent +public final class AccessControlListPortCondition extends PortCondition { + /* + * List of protocol flags that needs to be matched. + */ + @JsonProperty(value = "flags") + private List flags; + + /** Creates an instance of AccessControlListPortCondition class. */ + public AccessControlListPortCondition() { + } + + /** + * Get the flags property: List of protocol flags that needs to be matched. + * + * @return the flags value. + */ + public List flags() { + return this.flags; + } + + /** + * Set the flags property: List of protocol flags that needs to be matched. + * + * @param flags the flags value to set. + * @return the AccessControlListPortCondition object itself. + */ + public AccessControlListPortCondition withFlags(List flags) { + this.flags = flags; + return this; + } + + /** {@inheritDoc} */ + @Override + public AccessControlListPortCondition withPortType(PortType portType) { + super.withPortType(portType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AccessControlListPortCondition withLayer4Protocol(Layer4Protocol layer4Protocol) { + super.withLayer4Protocol(layer4Protocol); + return this; + } + + /** {@inheritDoc} */ + @Override + public AccessControlListPortCondition withPorts(List ports) { + super.withPorts(ports); + return this; + } + + /** {@inheritDoc} */ + @Override + public AccessControlListPortCondition withPortGroupNames(List portGroupNames) { + super.withPortGroupNames(portGroupNames); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlLists.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlLists.java index c91c212cfd048..4ef191d49bf3d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlLists.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlLists.java @@ -21,7 +21,7 @@ public interface AccessControlLists { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition along with {@link Response}. + * @return the Access Control List resource definition along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String accessControlListName, Context context); @@ -36,7 +36,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition. + * @return the Access Control List resource definition. */ AccessControlList getByResourceGroup(String resourceGroupName, String accessControlListName); @@ -47,14 +47,11 @@ Response getByResourceGroupWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteByResourceGroupWithResponse( - String resourceGroupName, String accessControlListName, Context context); + void deleteByResourceGroup(String resourceGroupName, String accessControlListName); /** * Deletes a Access Control List. @@ -63,11 +60,12 @@ Response deleteByResourceGroupWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteByResourceGroup(String resourceGroupName, String accessControlListName); + void delete(String resourceGroupName, String accessControlListName, Context context); /** * List AccessControlLists by resource group. @@ -78,7 +76,7 @@ Response deleteByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists as paginated response with {@link PagedIterable}. + * @return list of Access Control Lists as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -92,7 +90,7 @@ Response deleteByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists as paginated response with {@link PagedIterable}. + * @return list of Access Control Lists as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -103,7 +101,7 @@ Response deleteByResourceGroupWithResponse( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists as paginated response with {@link PagedIterable}. + * @return list of Access Control Lists as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -116,10 +114,103 @@ Response deleteByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AccessControlLists as paginated response with {@link PagedIterable}. + * @return list of Access Control Lists as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateAdministrativeState( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body); + + /** + * Updates administrative state of Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateAdministrativeState( + String resourceGroupName, String accessControlListName, UpdateAdministrativeState body, Context context); + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String accessControlListName); + + /** + * Resync operation on the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate resync( + String resourceGroupName, String accessControlListName, Context context); + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String accessControlListName); + + /** + * Validates the configuration of the Access Control Lists. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accessControlListName Name of the Access Control List. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + ValidateConfigurationResponse validateConfiguration( + String resourceGroupName, String accessControlListName, Context context); + /** * Gets a Access Control List. * @@ -129,7 +220,7 @@ Response deleteByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition along with {@link Response}. + * @return the Access Control List resource definition along with {@link Response}. */ AccessControlList getById(String id); @@ -143,7 +234,7 @@ Response deleteByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the AccessControlList resource definition along with {@link Response}. + * @return the Access Control List resource definition along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -169,9 +260,8 @@ Response deleteByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteByIdWithResponse(String id, Context context); + void deleteByIdWithResponse(String id, Context context); /** * Begins definition for a new AccessControlList resource. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListsListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListsListResult.java index 10bfb3ae2d856..ca72ac2df6398 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListsListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AccessControlListsListResult.java @@ -9,11 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of AccessControlLists. */ +/** List of Access Control Lists. */ @Fluent public final class AccessControlListsListResult { /* - * List of AccessControlList resources. + * List of Access Control List resources. */ @JsonProperty(value = "value") private List value; @@ -29,7 +29,7 @@ public AccessControlListsListResult() { } /** - * Get the value property: List of AccessControlList resources. + * Get the value property: List of Access Control List resources. * * @return the value value. */ @@ -38,7 +38,7 @@ public List value() { } /** - * Set the value property: List of AccessControlList resources. + * Set the value property: List of Access Control List resources. * * @param value the value value to set. * @return the AccessControlListsListResult object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclActionType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclActionType.java new file mode 100644 index 0000000000000..78b33d690f211 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AclActionType.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Type of actions that can be performed. */ +public final class AclActionType extends ExpandableStringEnum { + /** Static value Drop for AclActionType. */ + public static final AclActionType DROP = fromString("Drop"); + + /** Static value Count for AclActionType. */ + public static final AclActionType COUNT = fromString("Count"); + + /** Static value Log for AclActionType. */ + public static final AclActionType LOG = fromString("Log"); + + /** + * Creates a new instance of AclActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AclActionType() { + } + + /** + * Creates or finds a AclActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AclActionType. + */ + @JsonCreator + public static AclActionType fromString(String name) { + return fromString(name, AclActionType.class); + } + + /** + * Gets known AclActionType values. + * + * @return known AclActionType values. + */ + public static Collection values() { + return values(AclActionType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Action.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Action.java new file mode 100644 index 0000000000000..c586a6c6c26d7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Action.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Specify action. */ +public final class Action extends ExpandableStringEnum { + /** Static value Allow for Action. */ + public static final Action ALLOW = fromString("Allow"); + + /** Static value Deny for Action. */ + public static final Action DENY = fromString("Deny"); + + /** + * Creates a new instance of Action value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Action() { + } + + /** + * Creates or finds a Action from its string representation. + * + * @param name a name to look for. + * @return the corresponding Action. + */ + @JsonCreator + public static Action fromString(String name) { + return fromString(name, Action.class); + } + + /** + * Gets known Action values. + * + * @return known Action values. + */ + public static Collection values() { + return values(Action.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityProperties.java index ca61949296925..a49a03ae9b577 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpCommunityProperties.java @@ -11,13 +11,13 @@ @Fluent public final class ActionIpCommunityProperties extends IpCommunityAddOperationProperties { /* - * IP Community ID list properties. + * List of IP Community IDs. */ @JsonProperty(value = "delete") private IpCommunityIdList delete; /* - * IP Community ID list properties. + * List of IP Community IDs. */ @JsonProperty(value = "set") private IpCommunityIdList set; @@ -27,7 +27,7 @@ public ActionIpCommunityProperties() { } /** - * Get the delete property: IP Community ID list properties. + * Get the delete property: List of IP Community IDs. * * @return the delete value. */ @@ -36,7 +36,7 @@ public IpCommunityIdList delete() { } /** - * Set the delete property: IP Community ID list properties. + * Set the delete property: List of IP Community IDs. * * @param delete the delete value to set. * @return the ActionIpCommunityProperties object itself. @@ -47,7 +47,7 @@ public ActionIpCommunityProperties withDelete(IpCommunityIdList delete) { } /** - * Get the set property: IP Community ID list properties. + * Get the set property: List of IP Community IDs. * * @return the set value. */ @@ -56,7 +56,7 @@ public IpCommunityIdList set() { } /** - * Set the set property: IP Community ID list properties. + * Set the set property: List of IP Community IDs. * * @param set the set value to set. * @return the ActionIpCommunityProperties object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityProperties.java index 6270249de9b28..ffe7c72fe9ed5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ActionIpExtendedCommunityProperties.java @@ -11,13 +11,13 @@ @Fluent public final class ActionIpExtendedCommunityProperties extends IpExtendedCommunityAddOperationProperties { /* - * IP Extended Community Id list properties. + * List of IP Extended Community IDs. */ @JsonProperty(value = "delete") private IpExtendedCommunityIdList delete; /* - * IP Extended Community Id list properties. + * List of IP Extended Community IDs. */ @JsonProperty(value = "set") private IpExtendedCommunityIdList set; @@ -27,7 +27,7 @@ public ActionIpExtendedCommunityProperties() { } /** - * Get the delete property: IP Extended Community Id list properties. + * Get the delete property: List of IP Extended Community IDs. * * @return the delete value. */ @@ -36,7 +36,7 @@ public IpExtendedCommunityIdList delete() { } /** - * Set the delete property: IP Extended Community Id list properties. + * Set the delete property: List of IP Extended Community IDs. * * @param delete the delete value to set. * @return the ActionIpExtendedCommunityProperties object itself. @@ -47,7 +47,7 @@ public ActionIpExtendedCommunityProperties withDelete(IpExtendedCommunityIdList } /** - * Get the set property: IP Extended Community Id list properties. + * Get the set property: List of IP Extended Community IDs. * * @return the set value. */ @@ -56,7 +56,7 @@ public IpExtendedCommunityIdList set() { } /** - * Set the set property: IP Extended Community Id list properties. + * Set the set property: List of IP Extended Community IDs. * * @param set the set value to set. * @return the ActionIpExtendedCommunityProperties object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AddressFamily.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AddressFamily.java deleted file mode 100644 index 9ce88b1684ce0..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AddressFamily.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** IP address family. Example: ipv4 | ipv6. */ -public final class AddressFamily extends ExpandableStringEnum { - /** Static value ipv4 for AddressFamily. */ - public static final AddressFamily IPV4 = fromString("ipv4"); - - /** Static value ipv6 for AddressFamily. */ - public static final AddressFamily IPV6 = fromString("ipv6"); - - /** - * Creates a new instance of AddressFamily value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AddressFamily() { - } - - /** - * Creates or finds a AddressFamily from its string representation. - * - * @param name a name to look for. - * @return the corresponding AddressFamily. - */ - @JsonCreator - public static AddressFamily fromString(String name) { - return fromString(name, AddressFamily.class); - } - - /** - * Gets known AddressFamily values. - * - * @return known AddressFamily values. - */ - public static Collection values() { - return values(AddressFamily.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AddressFamilyType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AddressFamilyType.java new file mode 100644 index 0000000000000..3ad2918599ebe --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AddressFamilyType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 route policy. */ +public final class AddressFamilyType extends ExpandableStringEnum { + /** Static value IPv4 for AddressFamilyType. */ + public static final AddressFamilyType IPV4 = fromString("IPv4"); + + /** Static value IPv6 for AddressFamilyType. */ + public static final AddressFamilyType IPV6 = fromString("IPv6"); + + /** + * Creates a new instance of AddressFamilyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AddressFamilyType() { + } + + /** + * Creates or finds a AddressFamilyType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AddressFamilyType. + */ + @JsonCreator + public static AddressFamilyType fromString(String name) { + return fromString(name, AddressFamilyType.class); + } + + /** + * Gets known AddressFamilyType values. + * + * @return known AddressFamilyType values. + */ + public static Collection values() { + return values(AddressFamilyType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AdministrativeState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AdministrativeState.java index 0f7bc4365b79c..a57a404c7c402 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AdministrativeState.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AdministrativeState.java @@ -8,13 +8,19 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Administrative state. */ +/** State defined to represent administrative actions or post actions on a particular resource. */ public final class AdministrativeState extends ExpandableStringEnum { - /** Static value Enable for AdministrativeState. */ - public static final AdministrativeState ENABLE = fromString("Enable"); + /** Static value Enabled for AdministrativeState. */ + public static final AdministrativeState ENABLED = fromString("Enabled"); - /** Static value Disable for AdministrativeState. */ - public static final AdministrativeState DISABLE = fromString("Disable"); + /** Static value Disabled for AdministrativeState. */ + public static final AdministrativeState DISABLED = fromString("Disabled"); + + /** Static value MAT for AdministrativeState. */ + public static final AdministrativeState MAT = fromString("MAT"); + + /** Static value RMA for AdministrativeState. */ + public static final AdministrativeState RMA = fromString("RMA"); /** * Creates a new instance of AdministrativeState value. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoute.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoute.java index 3b90ab153e78b..6eee9dd25f028 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoute.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRoute.java @@ -5,15 +5,16 @@ package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Aggregate Route properties. */ +/** aggregateIpv4Route model. */ @Fluent public final class AggregateRoute { /* - * Prefix of the aggregate Route. + * IPv4 Prefix of the aggregate Ipv4Route. */ - @JsonProperty(value = "prefix") + @JsonProperty(value = "prefix", required = true) private String prefix; /** Creates an instance of AggregateRoute class. */ @@ -21,7 +22,7 @@ public AggregateRoute() { } /** - * Get the prefix property: Prefix of the aggregate Route. + * Get the prefix property: IPv4 Prefix of the aggregate Ipv4Route. * * @return the prefix value. */ @@ -30,7 +31,7 @@ public String prefix() { } /** - * Set the prefix property: Prefix of the aggregate Route. + * Set the prefix property: IPv4 Prefix of the aggregate Ipv4Route. * * @param prefix the prefix value to set. * @return the AggregateRoute object itself. @@ -46,5 +47,12 @@ public AggregateRoute withPrefix(String prefix) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (prefix() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property prefix in model AggregateRoute")); + } } + + private static final ClientLogger LOGGER = new ClientLogger(AggregateRoute.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRouteConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRouteConfiguration.java index 8b85d931be4f9..fd8f7d306261e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRouteConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/AggregateRouteConfiguration.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of IPv4 and IPv6 route configurations. */ +/** List of IPv4 and IPv6 aggregate routes. */ @Fluent public final class AggregateRouteConfiguration { /* @@ -18,7 +18,7 @@ public final class AggregateRouteConfiguration { private List ipv4Routes; /* - * List of IPv6 Routes prefixes. + * List of Ipv6Routes prefixes. */ @JsonProperty(value = "ipv6Routes") private List ipv6Routes; @@ -48,7 +48,7 @@ public AggregateRouteConfiguration withIpv4Routes(List ipv4Route } /** - * Get the ipv6Routes property: List of IPv6 Routes prefixes. + * Get the ipv6Routes property: List of Ipv6Routes prefixes. * * @return the ipv6Routes value. */ @@ -57,7 +57,7 @@ public List ipv6Routes() { } /** - * Set the ipv6Routes property: List of IPv6 Routes prefixes. + * Set the ipv6Routes property: List of Ipv6Routes prefixes. * * @param ipv6Routes the ipv6Routes value to set. * @return the AggregateRouteConfiguration object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArpProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArpProperties.java deleted file mode 100644 index 2ebcca3f52d07..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ArpProperties.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.resourcemanager.managednetworkfabric.fluent.models.ArpPropertiesInner; - -/** An immutable client-side representation of ArpProperties. */ -public interface ArpProperties { - /** - * Gets the address property: Ipv4 or Ipv6 address. - * - * @return the address value. - */ - String address(); - - /** - * Gets the age property: Duration in seconds. - * - * @return the age value. - */ - String age(); - - /** - * Gets the macAddress property: Hardware address. - * - * @return the macAddress value. - */ - String macAddress(); - - /** - * Gets the interfaceProperty property: Layer 2 interface name. - * - * @return the interfaceProperty value. - */ - String interfaceProperty(); - - /** - * Gets the state property: ARP status. - * - * @return the state value. - */ - String state(); - - /** - * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.ArpPropertiesInner object. - * - * @return the inner object. - */ - ArpPropertiesInner innerModel(); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdAdministrativeState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdAdministrativeState.java new file mode 100644 index 0000000000000..62d20e4850d32 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdAdministrativeState.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Administrative state of the BfdConfiguration. Example: Enabled | Disabled. */ +public final class BfdAdministrativeState extends ExpandableStringEnum { + /** Static value Enabled for BfdAdministrativeState. */ + public static final BfdAdministrativeState ENABLED = fromString("Enabled"); + + /** Static value Disabled for BfdAdministrativeState. */ + public static final BfdAdministrativeState DISABLED = fromString("Disabled"); + + /** Static value MAT for BfdAdministrativeState. */ + public static final BfdAdministrativeState MAT = fromString("MAT"); + + /** Static value RMA for BfdAdministrativeState. */ + public static final BfdAdministrativeState RMA = fromString("RMA"); + + /** + * Creates a new instance of BfdAdministrativeState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BfdAdministrativeState() { + } + + /** + * Creates or finds a BfdAdministrativeState from its string representation. + * + * @param name a name to look for. + * @return the corresponding BfdAdministrativeState. + */ + @JsonCreator + public static BfdAdministrativeState fromString(String name) { + return fromString(name, BfdAdministrativeState.class); + } + + /** + * Gets known BfdAdministrativeState values. + * + * @return known BfdAdministrativeState values. + */ + public static Collection values() { + return values(BfdAdministrativeState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdConfiguration.java index 3fdbc2e8e5376..84fefecf7601b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BfdConfiguration.java @@ -4,28 +4,28 @@ package com.azure.resourcemanager.managednetworkfabric.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; /** BFD configuration properties. */ -@Immutable +@Fluent public final class BfdConfiguration { /* * Administrative state of the BfdConfiguration. Example: Enabled | Disabled. */ @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) - private EnabledDisabledState administrativeState; + private BfdAdministrativeState administrativeState; /* - * interval in milliseconds. Example: 300. + * Interval in milliseconds. Example: 300. */ - @JsonProperty(value = "interval", access = JsonProperty.Access.WRITE_ONLY) - private Integer interval; + @JsonProperty(value = "intervalInMilliSeconds") + private Integer intervalInMilliSeconds; /* - * Multiplier for the Bfd Configuration. Example: 3. + * Multiplier for the Bfd Configuration. Example: 5. */ - @JsonProperty(value = "multiplier", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "multiplier") private Integer multiplier; /** Creates an instance of BfdConfiguration class. */ @@ -37,21 +37,32 @@ public BfdConfiguration() { * * @return the administrativeState value. */ - public EnabledDisabledState administrativeState() { + public BfdAdministrativeState administrativeState() { return this.administrativeState; } /** - * Get the interval property: interval in milliseconds. Example: 300. + * Get the intervalInMilliSeconds property: Interval in milliseconds. Example: 300. * - * @return the interval value. + * @return the intervalInMilliSeconds value. */ - public Integer interval() { - return this.interval; + public Integer intervalInMilliSeconds() { + return this.intervalInMilliSeconds; } /** - * Get the multiplier property: Multiplier for the Bfd Configuration. Example: 3. + * Set the intervalInMilliSeconds property: Interval in milliseconds. Example: 300. + * + * @param intervalInMilliSeconds the intervalInMilliSeconds value to set. + * @return the BfdConfiguration object itself. + */ + public BfdConfiguration withIntervalInMilliSeconds(Integer intervalInMilliSeconds) { + this.intervalInMilliSeconds = intervalInMilliSeconds; + return this; + } + + /** + * Get the multiplier property: Multiplier for the Bfd Configuration. Example: 5. * * @return the multiplier value. */ @@ -59,6 +70,17 @@ public Integer multiplier() { return this.multiplier; } + /** + * Set the multiplier property: Multiplier for the Bfd Configuration. Example: 5. + * + * @param multiplier the multiplier value to set. + * @return the BfdConfiguration object itself. + */ + public BfdConfiguration withMultiplier(Integer multiplier) { + this.multiplier = multiplier; + return this; + } + /** * Validates the instance. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpConfiguration.java index e68f3081562e5..ae6315a60fb80 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/BgpConfiguration.java @@ -10,7 +10,7 @@ /** BGP configuration properties. */ @Fluent -public final class BgpConfiguration extends AnnotationResource { +public class BgpConfiguration extends AnnotationResource { /* * BFD configuration properties */ @@ -40,28 +40,28 @@ public final class BgpConfiguration extends AnnotationResource { * ASN of Network Fabric. Example: 65048. */ @JsonProperty(value = "fabricASN", access = JsonProperty.Access.WRITE_ONLY) - private Integer fabricAsn; + private Long fabricAsn; /* * Peer ASN. Example: 65047. */ - @JsonProperty(value = "peerASN", required = true) - private int peerAsn; + @JsonProperty(value = "peerASN") + private Long peerAsn; /* - * BGP Ipv4 ListenRange. + * List of BGP IPv4 Listen Range prefixes. */ @JsonProperty(value = "ipv4ListenRangePrefixes") private List ipv4ListenRangePrefixes; /* - * BGP Ipv6 ListenRange. + * List of BGP IPv6 Listen Ranges prefixes. */ @JsonProperty(value = "ipv6ListenRangePrefixes") private List ipv6ListenRangePrefixes; /* - * List with stringified ipv4NeighborAddresses. + * List with stringified IPv4 Neighbor Addresses. */ @JsonProperty(value = "ipv4NeighborAddress") private List ipv4NeighborAddress; @@ -163,7 +163,7 @@ public BgpConfiguration withAllowASOverride(AllowASOverride allowASOverride) { * * @return the fabricAsn value. */ - public Integer fabricAsn() { + public Long fabricAsn() { return this.fabricAsn; } @@ -172,7 +172,7 @@ public Integer fabricAsn() { * * @return the peerAsn value. */ - public int peerAsn() { + public Long peerAsn() { return this.peerAsn; } @@ -182,13 +182,13 @@ public int peerAsn() { * @param peerAsn the peerAsn value to set. * @return the BgpConfiguration object itself. */ - public BgpConfiguration withPeerAsn(int peerAsn) { + public BgpConfiguration withPeerAsn(Long peerAsn) { this.peerAsn = peerAsn; return this; } /** - * Get the ipv4ListenRangePrefixes property: BGP Ipv4 ListenRange. + * Get the ipv4ListenRangePrefixes property: List of BGP IPv4 Listen Range prefixes. * * @return the ipv4ListenRangePrefixes value. */ @@ -197,7 +197,7 @@ public List ipv4ListenRangePrefixes() { } /** - * Set the ipv4ListenRangePrefixes property: BGP Ipv4 ListenRange. + * Set the ipv4ListenRangePrefixes property: List of BGP IPv4 Listen Range prefixes. * * @param ipv4ListenRangePrefixes the ipv4ListenRangePrefixes value to set. * @return the BgpConfiguration object itself. @@ -208,7 +208,7 @@ public BgpConfiguration withIpv4ListenRangePrefixes(List ipv4ListenRange } /** - * Get the ipv6ListenRangePrefixes property: BGP Ipv6 ListenRange. + * Get the ipv6ListenRangePrefixes property: List of BGP IPv6 Listen Ranges prefixes. * * @return the ipv6ListenRangePrefixes value. */ @@ -217,7 +217,7 @@ public List ipv6ListenRangePrefixes() { } /** - * Set the ipv6ListenRangePrefixes property: BGP Ipv6 ListenRange. + * Set the ipv6ListenRangePrefixes property: List of BGP IPv6 Listen Ranges prefixes. * * @param ipv6ListenRangePrefixes the ipv6ListenRangePrefixes value to set. * @return the BgpConfiguration object itself. @@ -228,7 +228,7 @@ public BgpConfiguration withIpv6ListenRangePrefixes(List ipv6ListenRange } /** - * Get the ipv4NeighborAddress property: List with stringified ipv4NeighborAddresses. + * Get the ipv4NeighborAddress property: List with stringified IPv4 Neighbor Addresses. * * @return the ipv4NeighborAddress value. */ @@ -237,7 +237,7 @@ public List ipv4NeighborAddress() { } /** - * Set the ipv4NeighborAddress property: List with stringified ipv4NeighborAddresses. + * Set the ipv4NeighborAddress property: List with stringified IPv4 Neighbor Addresses. * * @param ipv4NeighborAddress the ipv4NeighborAddress value to set. * @return the BgpConfiguration object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfiguration.java new file mode 100644 index 0000000000000..ae5b966ad5d78 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonDynamicMatchConfiguration.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Dynamic match configuration object. */ +@Fluent +public final class CommonDynamicMatchConfiguration { + /* + * List of IP Groups. + */ + @JsonProperty(value = "ipGroups") + private List ipGroups; + + /* + * List of vlan groups. + */ + @JsonProperty(value = "vlanGroups") + private List vlanGroups; + + /* + * List of the port group. + */ + @JsonProperty(value = "portGroups") + private List portGroups; + + /** Creates an instance of CommonDynamicMatchConfiguration class. */ + public CommonDynamicMatchConfiguration() { + } + + /** + * Get the ipGroups property: List of IP Groups. + * + * @return the ipGroups value. + */ + public List ipGroups() { + return this.ipGroups; + } + + /** + * Set the ipGroups property: List of IP Groups. + * + * @param ipGroups the ipGroups value to set. + * @return the CommonDynamicMatchConfiguration object itself. + */ + public CommonDynamicMatchConfiguration withIpGroups(List ipGroups) { + this.ipGroups = ipGroups; + return this; + } + + /** + * Get the vlanGroups property: List of vlan groups. + * + * @return the vlanGroups value. + */ + public List vlanGroups() { + return this.vlanGroups; + } + + /** + * Set the vlanGroups property: List of vlan groups. + * + * @param vlanGroups the vlanGroups value to set. + * @return the CommonDynamicMatchConfiguration object itself. + */ + public CommonDynamicMatchConfiguration withVlanGroups(List vlanGroups) { + this.vlanGroups = vlanGroups; + return this; + } + + /** + * Get the portGroups property: List of the port group. + * + * @return the portGroups value. + */ + public List portGroups() { + return this.portGroups; + } + + /** + * Set the portGroups property: List of the port group. + * + * @param portGroups the portGroups value to set. + * @return the CommonDynamicMatchConfiguration object itself. + */ + public CommonDynamicMatchConfiguration withPortGroups(List portGroups) { + this.portGroups = portGroups; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ipGroups() != null) { + ipGroups().forEach(e -> e.validate()); + } + if (vlanGroups() != null) { + vlanGroups().forEach(e -> e.validate()); + } + if (portGroups() != null) { + portGroups().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonMatchConditions.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonMatchConditions.java new file mode 100644 index 0000000000000..df4e3fabfe9a1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonMatchConditions.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Defines the common match conditions of the ACL and Network Tap Rule. */ +@Fluent +public class CommonMatchConditions { + /* + * List of the protocols that need to be matched. + */ + @JsonProperty(value = "protocolTypes") + private List protocolTypes; + + /* + * Vlan match condition that needs to be matched. + */ + @JsonProperty(value = "vlanMatchCondition") + private VlanMatchCondition vlanMatchCondition; + + /* + * IP condition that needs to be matched. + */ + @JsonProperty(value = "ipCondition") + private IpMatchCondition ipCondition; + + /** Creates an instance of CommonMatchConditions class. */ + public CommonMatchConditions() { + } + + /** + * Get the protocolTypes property: List of the protocols that need to be matched. + * + * @return the protocolTypes value. + */ + public List protocolTypes() { + return this.protocolTypes; + } + + /** + * Set the protocolTypes property: List of the protocols that need to be matched. + * + * @param protocolTypes the protocolTypes value to set. + * @return the CommonMatchConditions object itself. + */ + public CommonMatchConditions withProtocolTypes(List protocolTypes) { + this.protocolTypes = protocolTypes; + return this; + } + + /** + * Get the vlanMatchCondition property: Vlan match condition that needs to be matched. + * + * @return the vlanMatchCondition value. + */ + public VlanMatchCondition vlanMatchCondition() { + return this.vlanMatchCondition; + } + + /** + * Set the vlanMatchCondition property: Vlan match condition that needs to be matched. + * + * @param vlanMatchCondition the vlanMatchCondition value to set. + * @return the CommonMatchConditions object itself. + */ + public CommonMatchConditions withVlanMatchCondition(VlanMatchCondition vlanMatchCondition) { + this.vlanMatchCondition = vlanMatchCondition; + return this; + } + + /** + * Get the ipCondition property: IP condition that needs to be matched. + * + * @return the ipCondition value. + */ + public IpMatchCondition ipCondition() { + return this.ipCondition; + } + + /** + * Set the ipCondition property: IP condition that needs to be matched. + * + * @param ipCondition the ipCondition value to set. + * @return the CommonMatchConditions object itself. + */ + public CommonMatchConditions withIpCondition(IpMatchCondition ipCondition) { + this.ipCondition = ipCondition; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vlanMatchCondition() != null) { + vlanMatchCondition().validate(); + } + if (ipCondition() != null) { + ipCondition().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceUpdate.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceUpdate.java new file mode 100644 index 0000000000000..b0f6765355b2a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForDeviceUpdate.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner; +import java.util.List; + +/** An immutable client-side representation of CommonPostActionResponseForDeviceUpdate. */ +public interface CommonPostActionResponseForDeviceUpdate { + /** + * Gets the configurationState property: Gets the configuration state. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + + /** + * Gets the successfulDevices property: List of ARM Resource IDs for which the given action applied successfully. + * + * @return the successfulDevices value. + */ + List successfulDevices(); + + /** + * Gets the failedDevices property: List of ARM Resource IDs for which the given action failed to apply. + * + * @return the failedDevices value. + */ + List failedDevices(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForDeviceUpdateInner object. + * + * @return the inner object. + */ + CommonPostActionResponseForDeviceUpdateInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForStateUpdate.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForStateUpdate.java new file mode 100644 index 0000000000000..d0c19a901865c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/CommonPostActionResponseForStateUpdate.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner; + +/** An immutable client-side representation of CommonPostActionResponseForStateUpdate. */ +public interface CommonPostActionResponseForStateUpdate { + /** + * Gets the configurationState property: Gets the configuration state. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + + /** + * Gets the inner + * com.azure.resourcemanager.managednetworkfabric.fluent.models.CommonPostActionResponseForStateUpdateInner object. + * + * @return the inner object. + */ + CommonPostActionResponseForStateUpdateInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Condition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Condition.java index a4ebf389e9b42..ae3863cf2dec1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Condition.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Condition.java @@ -19,6 +19,9 @@ public final class Condition extends ExpandableStringEnum { /** Static value LesserThanOrEqualTo for Condition. */ public static final Condition LESSER_THAN_OR_EQUAL_TO = fromString("LesserThanOrEqualTo"); + /** Static value Range for Condition. */ + public static final Condition RANGE = fromString("Range"); + /** * Creates a new instance of Condition value. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConditionActionType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConditionActionType.java deleted file mode 100644 index bfd3b6d8f8b81..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConditionActionType.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** action. Example: allow | deny. */ -public final class ConditionActionType extends ExpandableStringEnum { - /** Static value allow for ConditionActionType. */ - public static final ConditionActionType ALLOW = fromString("allow"); - - /** Static value deny for ConditionActionType. */ - public static final ConditionActionType DENY = fromString("deny"); - - /** - * Creates a new instance of ConditionActionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ConditionActionType() { - } - - /** - * Creates or finds a ConditionActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConditionActionType. - */ - @JsonCreator - public static ConditionActionType fromString(String name) { - return fromString(name, ConditionActionType.class); - } - - /** - * Gets known ConditionActionType values. - * - * @return known ConditionActionType values. - */ - public static Collection values() { - return values(ConditionActionType.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationState.java new file mode 100644 index 0000000000000..f2f3d7fd3cad0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Configuration state for the resource. */ +public final class ConfigurationState extends ExpandableStringEnum { + /** Static value Succeeded for ConfigurationState. */ + public static final ConfigurationState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ConfigurationState. */ + public static final ConfigurationState FAILED = fromString("Failed"); + + /** Static value Rejected for ConfigurationState. */ + public static final ConfigurationState REJECTED = fromString("Rejected"); + + /** Static value Accepted for ConfigurationState. */ + public static final ConfigurationState ACCEPTED = fromString("Accepted"); + + /** Static value Provisioned for ConfigurationState. */ + public static final ConfigurationState PROVISIONED = fromString("Provisioned"); + + /** Static value ErrorProvisioning for ConfigurationState. */ + public static final ConfigurationState ERROR_PROVISIONING = fromString("ErrorProvisioning"); + + /** Static value Deprovisioning for ConfigurationState. */ + public static final ConfigurationState DEPROVISIONING = fromString("Deprovisioning"); + + /** Static value Deprovisioned for ConfigurationState. */ + public static final ConfigurationState DEPROVISIONED = fromString("Deprovisioned"); + + /** Static value ErrorDeprovisioning for ConfigurationState. */ + public static final ConfigurationState ERROR_DEPROVISIONING = fromString("ErrorDeprovisioning"); + + /** Static value DeferredControl for ConfigurationState. */ + public static final ConfigurationState DEFERRED_CONTROL = fromString("DeferredControl"); + + /** + * Creates a new instance of ConfigurationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConfigurationState() { + } + + /** + * Creates or finds a ConfigurationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConfigurationState. + */ + @JsonCreator + public static ConfigurationState fromString(String name) { + return fromString(name, ConfigurationState.class); + } + + /** + * Gets known ConfigurationState values. + * + * @return known ConfigurationState values. + */ + public static Collection values() { + return values(ConfigurationState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationType.java new file mode 100644 index 0000000000000..f6645220e5c1d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConfigurationType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Input method to configure Access Control List. */ +public final class ConfigurationType extends ExpandableStringEnum { + /** Static value File for ConfigurationType. */ + public static final ConfigurationType FILE = fromString("File"); + + /** Static value Inline for ConfigurationType. */ + public static final ConfigurationType INLINE = fromString("Inline"); + + /** + * Creates a new instance of ConfigurationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConfigurationType() { + } + + /** + * Creates or finds a ConfigurationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConfigurationType. + */ + @JsonCreator + public static ConfigurationType fromString(String name) { + return fromString(name, ConfigurationType.class); + } + + /** + * Gets known ConfigurationType values. + * + * @return known ConfigurationType values. + */ + public static Collection values() { + return values(ConfigurationType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnet.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnet.java index 0132eed0d2e0a..eac838d1353d5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnet.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnet.java @@ -5,15 +5,16 @@ package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** Connected Subnet properties. */ @Fluent public final class ConnectedSubnet extends AnnotationResource { /* - * Prefix of the connected Subnet. + * Prefix of the Connected Subnet. */ - @JsonProperty(value = "prefix") + @JsonProperty(value = "prefix", required = true) private String prefix; /** Creates an instance of ConnectedSubnet class. */ @@ -21,7 +22,7 @@ public ConnectedSubnet() { } /** - * Get the prefix property: Prefix of the connected Subnet. + * Get the prefix property: Prefix of the Connected Subnet. * * @return the prefix value. */ @@ -30,7 +31,7 @@ public String prefix() { } /** - * Set the prefix property: Prefix of the connected Subnet. + * Set the prefix property: Prefix of the Connected Subnet. * * @param prefix the prefix value to set. * @return the ConnectedSubnet object itself. @@ -55,5 +56,12 @@ public ConnectedSubnet withAnnotation(String annotation) { @Override public void validate() { super.validate(); + if (prefix() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property prefix in model ConnectedSubnet")); + } } + + private static final ClientLogger LOGGER = new ClientLogger(ConnectedSubnet.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetRoutePolicy.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetRoutePolicy.java new file mode 100644 index 0000000000000..682a271cce0fb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ConnectedSubnetRoutePolicy.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Connected Subnet Route Policy properties. */ +@Fluent +public final class ConnectedSubnetRoutePolicy { + /* + * ARM Resource ID of the Route Policy. This is used for the backward compatibility. + */ + @JsonProperty(value = "exportRoutePolicyId") + private String exportRoutePolicyId; + + /* + * Array of ARM Resource ID of the RoutePolicies. + */ + @JsonProperty(value = "exportRoutePolicy") + private L3ExportRoutePolicy exportRoutePolicy; + + /** Creates an instance of ConnectedSubnetRoutePolicy class. */ + public ConnectedSubnetRoutePolicy() { + } + + /** + * Get the exportRoutePolicyId property: ARM Resource ID of the Route Policy. This is used for the backward + * compatibility. + * + * @return the exportRoutePolicyId value. + */ + public String exportRoutePolicyId() { + return this.exportRoutePolicyId; + } + + /** + * Set the exportRoutePolicyId property: ARM Resource ID of the Route Policy. This is used for the backward + * compatibility. + * + * @param exportRoutePolicyId the exportRoutePolicyId value to set. + * @return the ConnectedSubnetRoutePolicy object itself. + */ + public ConnectedSubnetRoutePolicy withExportRoutePolicyId(String exportRoutePolicyId) { + this.exportRoutePolicyId = exportRoutePolicyId; + return this; + } + + /** + * Get the exportRoutePolicy property: Array of ARM Resource ID of the RoutePolicies. + * + * @return the exportRoutePolicy value. + */ + public L3ExportRoutePolicy exportRoutePolicy() { + return this.exportRoutePolicy; + } + + /** + * Set the exportRoutePolicy property: Array of ARM Resource ID of the RoutePolicies. + * + * @param exportRoutePolicy the exportRoutePolicy value to set. + * @return the ConnectedSubnetRoutePolicy object itself. + */ + public ConnectedSubnetRoutePolicy withExportRoutePolicy(L3ExportRoutePolicy exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (exportRoutePolicy() != null) { + exportRoutePolicy().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InfrastructureServices.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControllerServices.java similarity index 82% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InfrastructureServices.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControllerServices.java index 66241ca1f1e57..05c56e62e758b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InfrastructureServices.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ControllerServices.java @@ -8,9 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** InfrastructureServices IP ranges. */ +/** Network Fabric Controller services. */ @Fluent -public final class InfrastructureServices { +public final class ControllerServices { /* * The IPv4 Address space is optional, if the value is not defined at the time of NFC creation, then the default * value 10.0.0.0/19 is considered. The IPV4 address subnet is an optional attribute. @@ -24,8 +24,8 @@ public final class InfrastructureServices { @JsonProperty(value = "ipv6AddressSpaces") private List ipv6AddressSpaces; - /** Creates an instance of InfrastructureServices class. */ - public InfrastructureServices() { + /** Creates an instance of ControllerServices class. */ + public ControllerServices() { } /** @@ -45,9 +45,9 @@ public List ipv4AddressSpaces() { * attribute. * * @param ipv4AddressSpaces the ipv4AddressSpaces value to set. - * @return the InfrastructureServices object itself. + * @return the ControllerServices object itself. */ - public InfrastructureServices withIpv4AddressSpaces(List ipv4AddressSpaces) { + public ControllerServices withIpv4AddressSpaces(List ipv4AddressSpaces) { this.ipv4AddressSpaces = ipv4AddressSpaces; return this; } @@ -65,9 +65,9 @@ public List ipv6AddressSpaces() { * Set the ipv6AddressSpaces property: The IPv6 is not supported right now. * * @param ipv6AddressSpaces the ipv6AddressSpaces value to set. - * @return the InfrastructureServices object itself. + * @return the ControllerServices object itself. */ - public InfrastructureServices withIpv6AddressSpaces(List ipv6AddressSpaces) { + public ControllerServices withIpv6AddressSpaces(List ipv6AddressSpaces) { this.ipv6AddressSpaces = ipv6AddressSpaces; return this; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationProperties.java new file mode 100644 index 0000000000000..073b57dbcd82d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationProperties.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The network tap destination properties. */ +@Fluent +public class DestinationProperties { + /* + * Destination name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Type of destination. Input can be IsolationDomain or Direct. + */ + @JsonProperty(value = "destinationType") + private DestinationType destinationType; + + /* + * The destination Id. ARM Resource ID of either NNI or Internal Networks. + */ + @JsonProperty(value = "destinationId") + private String destinationId; + + /* + * Isolation Domain Properties. + */ + @JsonProperty(value = "isolationDomainProperties") + private IsolationDomainProperties isolationDomainProperties; + + /* + * ARM Resource ID of destination Tap Rule that contains match configurations. + */ + @JsonProperty(value = "destinationTapRuleId") + private String destinationTapRuleId; + + /** Creates an instance of DestinationProperties class. */ + public DestinationProperties() { + } + + /** + * Get the name property: Destination name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Destination name. + * + * @param name the name value to set. + * @return the DestinationProperties object itself. + */ + public DestinationProperties withName(String name) { + this.name = name; + return this; + } + + /** + * Get the destinationType property: Type of destination. Input can be IsolationDomain or Direct. + * + * @return the destinationType value. + */ + public DestinationType destinationType() { + return this.destinationType; + } + + /** + * Set the destinationType property: Type of destination. Input can be IsolationDomain or Direct. + * + * @param destinationType the destinationType value to set. + * @return the DestinationProperties object itself. + */ + public DestinationProperties withDestinationType(DestinationType destinationType) { + this.destinationType = destinationType; + return this; + } + + /** + * Get the destinationId property: The destination Id. ARM Resource ID of either NNI or Internal Networks. + * + * @return the destinationId value. + */ + public String destinationId() { + return this.destinationId; + } + + /** + * Set the destinationId property: The destination Id. ARM Resource ID of either NNI or Internal Networks. + * + * @param destinationId the destinationId value to set. + * @return the DestinationProperties object itself. + */ + public DestinationProperties withDestinationId(String destinationId) { + this.destinationId = destinationId; + return this; + } + + /** + * Get the isolationDomainProperties property: Isolation Domain Properties. + * + * @return the isolationDomainProperties value. + */ + public IsolationDomainProperties isolationDomainProperties() { + return this.isolationDomainProperties; + } + + /** + * Set the isolationDomainProperties property: Isolation Domain Properties. + * + * @param isolationDomainProperties the isolationDomainProperties value to set. + * @return the DestinationProperties object itself. + */ + public DestinationProperties withIsolationDomainProperties(IsolationDomainProperties isolationDomainProperties) { + this.isolationDomainProperties = isolationDomainProperties; + return this; + } + + /** + * Get the destinationTapRuleId property: ARM Resource ID of destination Tap Rule that contains match + * configurations. + * + * @return the destinationTapRuleId value. + */ + public String destinationTapRuleId() { + return this.destinationTapRuleId; + } + + /** + * Set the destinationTapRuleId property: ARM Resource ID of destination Tap Rule that contains match + * configurations. + * + * @param destinationTapRuleId the destinationTapRuleId value to set. + * @return the DestinationProperties object itself. + */ + public DestinationProperties withDestinationTapRuleId(String destinationTapRuleId) { + this.destinationTapRuleId = destinationTapRuleId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (isolationDomainProperties() != null) { + isolationDomainProperties().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationType.java new file mode 100644 index 0000000000000..81520d3da278f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DestinationType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Type of destination. Input can be IsolationDomain or Direct. */ +public final class DestinationType extends ExpandableStringEnum { + /** Static value IsolationDomain for DestinationType. */ + public static final DestinationType ISOLATION_DOMAIN = fromString("IsolationDomain"); + + /** Static value Direct for DestinationType. */ + public static final DestinationType DIRECT = fromString("Direct"); + + /** + * Creates a new instance of DestinationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DestinationType() { + } + + /** + * Creates or finds a DestinationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DestinationType. + */ + @JsonCreator + public static DestinationType fromString(String name) { + return fromString(name, DestinationType.class); + } + + /** + * Gets known DestinationType values. + * + * @return known DestinationType values. + */ + public static Collection values() { + return values(DestinationType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceAdministrativeState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceAdministrativeState.java new file mode 100644 index 0000000000000..e72e9887d148f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceAdministrativeState.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Administrative state. */ +public final class DeviceAdministrativeState extends ExpandableStringEnum { + /** Static value RMA for DeviceAdministrativeState. */ + public static final DeviceAdministrativeState RMA = fromString("RMA"); + + /** Static value Resync for DeviceAdministrativeState. */ + public static final DeviceAdministrativeState RESYNC = fromString("Resync"); + + /** Static value GracefulQuarantine for DeviceAdministrativeState. */ + public static final DeviceAdministrativeState GRACEFUL_QUARANTINE = fromString("GracefulQuarantine"); + + /** Static value Quarantine for DeviceAdministrativeState. */ + public static final DeviceAdministrativeState QUARANTINE = fromString("Quarantine"); + + /** + * Creates a new instance of DeviceAdministrativeState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeviceAdministrativeState() { + } + + /** + * Creates or finds a DeviceAdministrativeState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeviceAdministrativeState. + */ + @JsonCreator + public static DeviceAdministrativeState fromString(String name) { + return fromString(name, DeviceAdministrativeState.class); + } + + /** + * Gets known DeviceAdministrativeState values. + * + * @return known DeviceAdministrativeState values. + */ + public static Collection values() { + return values(DeviceAdministrativeState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceLimits.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceLimits.java deleted file mode 100644 index 9e9239655459c..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/DeviceLimits.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Network device limits. */ -@Fluent -public final class DeviceLimits { - /* - * Maximum number of physical interfaces. - */ - @JsonProperty(value = "physicalInterfaceCount") - private Integer physicalInterfaceCount; - - /* - * Maximum number of sub-interfaces. - */ - @JsonProperty(value = "maxSubInterfaces") - private Integer maxSubInterfaces; - - /* - * Maximum number of tunnel interfaces. - */ - @JsonProperty(value = "maxTunnelInterfaces") - private Integer maxTunnelInterfaces; - - /* - * Maximum number of virtual router functions. - */ - @JsonProperty(value = "maxVirtualRouterFunctions") - private Integer maxVirtualRouterFunctions; - - /* - * Maximum number of Border Gateway Protocol (BGP) peers. - */ - @JsonProperty(value = "maxBorderGatewayProtocolPeers") - private Integer maxBorderGatewayProtocolPeers; - - /* - * Maximum number of Bidirectional Forwarding Detection (BFD) peers. - */ - @JsonProperty(value = "maxBidirectionalForwardingDetectionPeers") - private Integer maxBidirectionalForwardingDetectionPeers; - - /** Creates an instance of DeviceLimits class. */ - public DeviceLimits() { - } - - /** - * Get the physicalInterfaceCount property: Maximum number of physical interfaces. - * - * @return the physicalInterfaceCount value. - */ - public Integer physicalInterfaceCount() { - return this.physicalInterfaceCount; - } - - /** - * Set the physicalInterfaceCount property: Maximum number of physical interfaces. - * - * @param physicalInterfaceCount the physicalInterfaceCount value to set. - * @return the DeviceLimits object itself. - */ - public DeviceLimits withPhysicalInterfaceCount(Integer physicalInterfaceCount) { - this.physicalInterfaceCount = physicalInterfaceCount; - return this; - } - - /** - * Get the maxSubInterfaces property: Maximum number of sub-interfaces. - * - * @return the maxSubInterfaces value. - */ - public Integer maxSubInterfaces() { - return this.maxSubInterfaces; - } - - /** - * Set the maxSubInterfaces property: Maximum number of sub-interfaces. - * - * @param maxSubInterfaces the maxSubInterfaces value to set. - * @return the DeviceLimits object itself. - */ - public DeviceLimits withMaxSubInterfaces(Integer maxSubInterfaces) { - this.maxSubInterfaces = maxSubInterfaces; - return this; - } - - /** - * Get the maxTunnelInterfaces property: Maximum number of tunnel interfaces. - * - * @return the maxTunnelInterfaces value. - */ - public Integer maxTunnelInterfaces() { - return this.maxTunnelInterfaces; - } - - /** - * Set the maxTunnelInterfaces property: Maximum number of tunnel interfaces. - * - * @param maxTunnelInterfaces the maxTunnelInterfaces value to set. - * @return the DeviceLimits object itself. - */ - public DeviceLimits withMaxTunnelInterfaces(Integer maxTunnelInterfaces) { - this.maxTunnelInterfaces = maxTunnelInterfaces; - return this; - } - - /** - * Get the maxVirtualRouterFunctions property: Maximum number of virtual router functions. - * - * @return the maxVirtualRouterFunctions value. - */ - public Integer maxVirtualRouterFunctions() { - return this.maxVirtualRouterFunctions; - } - - /** - * Set the maxVirtualRouterFunctions property: Maximum number of virtual router functions. - * - * @param maxVirtualRouterFunctions the maxVirtualRouterFunctions value to set. - * @return the DeviceLimits object itself. - */ - public DeviceLimits withMaxVirtualRouterFunctions(Integer maxVirtualRouterFunctions) { - this.maxVirtualRouterFunctions = maxVirtualRouterFunctions; - return this; - } - - /** - * Get the maxBorderGatewayProtocolPeers property: Maximum number of Border Gateway Protocol (BGP) peers. - * - * @return the maxBorderGatewayProtocolPeers value. - */ - public Integer maxBorderGatewayProtocolPeers() { - return this.maxBorderGatewayProtocolPeers; - } - - /** - * Set the maxBorderGatewayProtocolPeers property: Maximum number of Border Gateway Protocol (BGP) peers. - * - * @param maxBorderGatewayProtocolPeers the maxBorderGatewayProtocolPeers value to set. - * @return the DeviceLimits object itself. - */ - public DeviceLimits withMaxBorderGatewayProtocolPeers(Integer maxBorderGatewayProtocolPeers) { - this.maxBorderGatewayProtocolPeers = maxBorderGatewayProtocolPeers; - return this; - } - - /** - * Get the maxBidirectionalForwardingDetectionPeers property: Maximum number of Bidirectional Forwarding Detection - * (BFD) peers. - * - * @return the maxBidirectionalForwardingDetectionPeers value. - */ - public Integer maxBidirectionalForwardingDetectionPeers() { - return this.maxBidirectionalForwardingDetectionPeers; - } - - /** - * Set the maxBidirectionalForwardingDetectionPeers property: Maximum number of Bidirectional Forwarding Detection - * (BFD) peers. - * - * @param maxBidirectionalForwardingDetectionPeers the maxBidirectionalForwardingDetectionPeers value to set. - * @return the DeviceLimits object itself. - */ - public DeviceLimits withMaxBidirectionalForwardingDetectionPeers(Integer maxBidirectionalForwardingDetectionPeers) { - this.maxBidirectionalForwardingDetectionPeers = maxBidirectionalForwardingDetectionPeers; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableState.java new file mode 100644 index 0000000000000..1944668d6aa0c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnableDisableState.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Administrative state. */ +public final class EnableDisableState extends ExpandableStringEnum { + /** Static value Enable for EnableDisableState. */ + public static final EnableDisableState ENABLE = fromString("Enable"); + + /** Static value Disable for EnableDisableState. */ + public static final EnableDisableState DISABLE = fromString("Disable"); + + /** + * Creates a new instance of EnableDisableState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EnableDisableState() { + } + + /** + * Creates or finds a EnableDisableState from its string representation. + * + * @param name a name to look for. + * @return the corresponding EnableDisableState. + */ + @JsonCreator + public static EnableDisableState fromString(String name) { + return fromString(name, EnableDisableState.class); + } + + /** + * Gets known EnableDisableState values. + * + * @return known EnableDisableState values. + */ + public static Collection values() { + return values(EnableDisableState.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnabledDisabledState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnabledDisabledState.java deleted file mode 100644 index 7740d960e2eb3..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EnabledDisabledState.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** EnabledDisabledState state for the resource. */ -public final class EnabledDisabledState extends ExpandableStringEnum { - /** Static value Enabled for EnabledDisabledState. */ - public static final EnabledDisabledState ENABLED = fromString("Enabled"); - - /** Static value Disabled for EnabledDisabledState. */ - public static final EnabledDisabledState DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of EnabledDisabledState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EnabledDisabledState() { - } - - /** - * Creates or finds a EnabledDisabledState from its string representation. - * - * @param name a name to look for. - * @return the corresponding EnabledDisabledState. - */ - @JsonCreator - public static EnabledDisabledState fromString(String name) { - return fromString(name, EnabledDisabledState.class); - } - - /** - * Gets known EnabledDisabledState values. - * - * @return known EnabledDisabledState values. - */ - public static Collection values() { - return values(EnabledDisabledState.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Encapsulation.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Encapsulation.java new file mode 100644 index 0000000000000..ab9d31dbde04e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Encapsulation.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Type of encapsulation. */ +public final class Encapsulation extends ExpandableStringEnum { + /** Static value None for Encapsulation. */ + public static final Encapsulation NONE = fromString("None"); + + /** Static value GRE for Encapsulation. */ + public static final Encapsulation GRE = fromString("GRE"); + + /** + * Creates a new instance of Encapsulation value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Encapsulation() { + } + + /** + * Creates or finds a Encapsulation from its string representation. + * + * @param name a name to look for. + * @return the corresponding Encapsulation. + */ + @JsonCreator + public static Encapsulation fromString(String name) { + return fromString(name, Encapsulation.class); + } + + /** + * Gets known Encapsulation values. + * + * @return known Encapsulation values. + */ + public static Collection values() { + return values(Encapsulation.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EncapsulationType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EncapsulationType.java new file mode 100644 index 0000000000000..88f70f22b1a21 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/EncapsulationType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Encapsulation Type. */ +public final class EncapsulationType extends ExpandableStringEnum { + /** Static value None for EncapsulationType. */ + public static final EncapsulationType NONE = fromString("None"); + + /** Static value GTPv1 for EncapsulationType. */ + public static final EncapsulationType GTPV1 = fromString("GTPv1"); + + /** + * Creates a new instance of EncapsulationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EncapsulationType() { + } + + /** + * Creates or finds a EncapsulationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding EncapsulationType. + */ + @JsonCreator + public static EncapsulationType fromString(String name) { + return fromString(name, EncapsulationType.class); + } + + /** + * Gets known EncapsulationType values. + * + * @return known EncapsulationType values. + */ + public static Collection values() { + return values(EncapsulationType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicy.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicy.java new file mode 100644 index 0000000000000..dfcb347e2c874 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicy.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Export Route Policy either IPv4 or IPv6. */ +@Fluent +public final class ExportRoutePolicy { + /* + * ARM resource ID of RoutePolicy. + */ + @JsonProperty(value = "exportIpv4RoutePolicyId") + private String exportIpv4RoutePolicyId; + + /* + * ARM resource ID of RoutePolicy. + */ + @JsonProperty(value = "exportIpv6RoutePolicyId") + private String exportIpv6RoutePolicyId; + + /** Creates an instance of ExportRoutePolicy class. */ + public ExportRoutePolicy() { + } + + /** + * Get the exportIpv4RoutePolicyId property: ARM resource ID of RoutePolicy. + * + * @return the exportIpv4RoutePolicyId value. + */ + public String exportIpv4RoutePolicyId() { + return this.exportIpv4RoutePolicyId; + } + + /** + * Set the exportIpv4RoutePolicyId property: ARM resource ID of RoutePolicy. + * + * @param exportIpv4RoutePolicyId the exportIpv4RoutePolicyId value to set. + * @return the ExportRoutePolicy object itself. + */ + public ExportRoutePolicy withExportIpv4RoutePolicyId(String exportIpv4RoutePolicyId) { + this.exportIpv4RoutePolicyId = exportIpv4RoutePolicyId; + return this; + } + + /** + * Get the exportIpv6RoutePolicyId property: ARM resource ID of RoutePolicy. + * + * @return the exportIpv6RoutePolicyId value. + */ + public String exportIpv6RoutePolicyId() { + return this.exportIpv6RoutePolicyId; + } + + /** + * Set the exportIpv6RoutePolicyId property: ARM resource ID of RoutePolicy. + * + * @param exportIpv6RoutePolicyId the exportIpv6RoutePolicyId value to set. + * @return the ExportRoutePolicy object itself. + */ + public ExportRoutePolicy withExportIpv6RoutePolicyId(String exportIpv6RoutePolicyId) { + this.exportIpv6RoutePolicyId = exportIpv6RoutePolicyId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformation.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformation.java new file mode 100644 index 0000000000000..71b7d0b36e96d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExportRoutePolicyInformation.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Export Route Policy Configuration. */ +@Fluent +public final class ExportRoutePolicyInformation { + /* + * Export IPv4 Route Policy Id. + */ + @JsonProperty(value = "exportIpv4RoutePolicyId") + private String exportIpv4RoutePolicyId; + + /* + * Export IPv6 Route Policy Id. + */ + @JsonProperty(value = "exportIpv6RoutePolicyId") + private String exportIpv6RoutePolicyId; + + /** Creates an instance of ExportRoutePolicyInformation class. */ + public ExportRoutePolicyInformation() { + } + + /** + * Get the exportIpv4RoutePolicyId property: Export IPv4 Route Policy Id. + * + * @return the exportIpv4RoutePolicyId value. + */ + public String exportIpv4RoutePolicyId() { + return this.exportIpv4RoutePolicyId; + } + + /** + * Set the exportIpv4RoutePolicyId property: Export IPv4 Route Policy Id. + * + * @param exportIpv4RoutePolicyId the exportIpv4RoutePolicyId value to set. + * @return the ExportRoutePolicyInformation object itself. + */ + public ExportRoutePolicyInformation withExportIpv4RoutePolicyId(String exportIpv4RoutePolicyId) { + this.exportIpv4RoutePolicyId = exportIpv4RoutePolicyId; + return this; + } + + /** + * Get the exportIpv6RoutePolicyId property: Export IPv6 Route Policy Id. + * + * @return the exportIpv6RoutePolicyId value. + */ + public String exportIpv6RoutePolicyId() { + return this.exportIpv6RoutePolicyId; + } + + /** + * Set the exportIpv6RoutePolicyId property: Export IPv6 Route Policy Id. + * + * @param exportIpv6RoutePolicyId the exportIpv6RoutePolicyId value to set. + * @return the ExportRoutePolicyInformation object itself. + */ + public ExportRoutePolicyInformation withExportIpv6RoutePolicyId(String exportIpv6RoutePolicyId) { + this.exportIpv6RoutePolicyId = exportIpv6RoutePolicyId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Extension.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Extension.java new file mode 100644 index 0000000000000..a22f2b679a757 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Extension.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Extension. Example: NoExtension | NPB. */ +public final class Extension extends ExpandableStringEnum { + /** Static value NoExtension for Extension. */ + public static final Extension NO_EXTENSION = fromString("NoExtension"); + + /** Static value NPB for Extension. */ + public static final Extension NPB = fromString("NPB"); + + /** + * Creates a new instance of Extension value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Extension() { + } + + /** + * Creates or finds a Extension from its string representation. + * + * @param name a name to look for. + * @return the corresponding Extension. + */ + @JsonCreator + public static Extension fromString(String name) { + return fromString(name, Extension.class); + } + + /** + * Gets known Extension values. + * + * @return known Extension values. + */ + public static Collection values() { + return values(Extension.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtensionEnumProperty.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtensionEnumProperty.java new file mode 100644 index 0000000000000..4f1c1cdc255bb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExtensionEnumProperty.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Extension property. */ +@Fluent +public class ExtensionEnumProperty { + /* + * Extension. Example: NoExtension | NPB. + */ + @JsonProperty(value = "extension") + private Extension extension; + + /** Creates an instance of ExtensionEnumProperty class. */ + public ExtensionEnumProperty() { + } + + /** + * Get the extension property: Extension. Example: NoExtension | NPB. + * + * @return the extension value. + */ + public Extension extension() { + return this.extension; + } + + /** + * Set the extension property: Extension. Example: NoExtension | NPB. + * + * @param extension the extension value to set. + * @return the ExtensionEnumProperty object itself. + */ + public ExtensionEnumProperty withExtension(Extension extension) { + this.extension = extension; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetwork.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetwork.java index 52665c02888ba..fdebe6b902174 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetwork.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetwork.java @@ -7,7 +7,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; -import java.util.List; /** An immutable client-side representation of ExternalNetwork. */ public interface ExternalNetwork { @@ -47,62 +46,77 @@ public interface ExternalNetwork { String networkToNetworkInterconnectId(); /** - * Gets the disabledOnResources property: List of resources the externalNetwork is disabled on. Can be either entire - * NetworkFabric or NetworkRack. + * Gets the peeringOption property: Peering option list. * - * @return the disabledOnResources value. + * @return the peeringOption value. */ - List disabledOnResources(); + PeeringOption peeringOption(); /** - * Gets the administrativeState property: AdministrativeState of the externalNetwork. Example: Enabled | Disabled. + * Gets the optionBProperties property: option B properties object. * - * @return the administrativeState value. + * @return the optionBProperties value. */ - EnabledDisabledState administrativeState(); + L3OptionBProperties optionBProperties(); /** - * Gets the provisioningState property: Gets the provisioning state of the resource. + * Gets the optionAProperties property: option A properties object. * - * @return the provisioningState value. + * @return the optionAProperties value. */ - ProvisioningState provisioningState(); + ExternalNetworkPropertiesOptionAProperties optionAProperties(); /** - * Gets the peeringOption property: Peering option list. + * Gets the configurationState property: Configuration state of the resource. * - * @return the peeringOption value. + * @return the configurationState value. */ - PeeringOption peeringOption(); + ConfigurationState configurationState(); /** - * Gets the optionBProperties property: option B properties object. + * Gets the provisioningState property: Provisioning state of the resource. * - * @return the optionBProperties value. + * @return the provisioningState value. */ - OptionBProperties optionBProperties(); + ProvisioningState provisioningState(); /** - * Gets the optionAProperties property: option A properties object. + * Gets the administrativeState property: Administrative state of the resource. * - * @return the optionAProperties value. + * @return the administrativeState value. */ - ExternalNetworkPropertiesOptionAProperties optionAProperties(); + AdministrativeState administrativeState(); /** - * Gets the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Gets the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @return the importRoutePolicyId value. */ String importRoutePolicyId(); /** - * Gets the exportRoutePolicyId property: ARM resource ID of exportRoutePolicy. + * Gets the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @return the exportRoutePolicyId value. */ String exportRoutePolicyId(); + /** + * Gets the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * + * @return the importRoutePolicy value. + */ + ImportRoutePolicy importRoutePolicy(); + + /** + * Gets the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * + * @return the exportRoutePolicy value. + */ + ExportRoutePolicy exportRoutePolicy(); + /** * Gets the annotation property: Switch configuration description. * @@ -142,7 +156,7 @@ interface WithParentResource { * Specifies resourceGroupName, l3IsolationDomainName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @return the next definition stage. */ WithPeeringOption withExistingL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); @@ -166,6 +180,8 @@ interface WithCreate DefinitionStages.WithOptionAProperties, DefinitionStages.WithImportRoutePolicyId, DefinitionStages.WithExportRoutePolicyId, + DefinitionStages.WithImportRoutePolicy, + DefinitionStages.WithExportRoutePolicy, DefinitionStages.WithAnnotation { /** * Executes the create request. @@ -190,7 +206,7 @@ interface WithOptionBProperties { * @param optionBProperties option B properties object. * @return the next definition stage. */ - WithCreate withOptionBProperties(OptionBProperties optionBProperties); + WithCreate withOptionBProperties(L3OptionBProperties optionBProperties); } /** The stage of the ExternalNetwork definition allowing to specify optionAProperties. */ interface WithOptionAProperties { @@ -205,9 +221,11 @@ interface WithOptionAProperties { /** The stage of the ExternalNetwork definition allowing to specify importRoutePolicyId. */ interface WithImportRoutePolicyId { /** - * Specifies the importRoutePolicyId property: ARM resource ID of importRoutePolicy.. + * Specifies the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the + * backward compatibility.. * - * @param importRoutePolicyId ARM resource ID of importRoutePolicy. + * @param importRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * @return the next definition stage. */ WithCreate withImportRoutePolicyId(String importRoutePolicyId); @@ -215,13 +233,35 @@ interface WithImportRoutePolicyId { /** The stage of the ExternalNetwork definition allowing to specify exportRoutePolicyId. */ interface WithExportRoutePolicyId { /** - * Specifies the exportRoutePolicyId property: ARM resource ID of exportRoutePolicy.. + * Specifies the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the + * backward compatibility.. * - * @param exportRoutePolicyId ARM resource ID of exportRoutePolicy. + * @param exportRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * @return the next definition stage. */ WithCreate withExportRoutePolicyId(String exportRoutePolicyId); } + /** The stage of the ExternalNetwork definition allowing to specify importRoutePolicy. */ + interface WithImportRoutePolicy { + /** + * Specifies the importRoutePolicy property: Import Route Policy either IPv4 or IPv6.. + * + * @param importRoutePolicy Import Route Policy either IPv4 or IPv6. + * @return the next definition stage. + */ + WithCreate withImportRoutePolicy(ImportRoutePolicy importRoutePolicy); + } + /** The stage of the ExternalNetwork definition allowing to specify exportRoutePolicy. */ + interface WithExportRoutePolicy { + /** + * Specifies the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6.. + * + * @param exportRoutePolicy Export Route Policy either IPv4 or IPv6. + * @return the next definition stage. + */ + WithCreate withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy); + } /** The stage of the ExternalNetwork definition allowing to specify annotation. */ interface WithAnnotation { /** @@ -247,6 +287,8 @@ interface Update UpdateStages.WithOptionAProperties, UpdateStages.WithImportRoutePolicyId, UpdateStages.WithExportRoutePolicyId, + UpdateStages.WithImportRoutePolicy, + UpdateStages.WithExportRoutePolicy, UpdateStages.WithAnnotation { /** * Executes the update request. @@ -283,7 +325,7 @@ interface WithOptionBProperties { * @param optionBProperties option B properties object. * @return the next definition stage. */ - Update withOptionBProperties(OptionBProperties optionBProperties); + Update withOptionBProperties(L3OptionBProperties optionBProperties); } /** The stage of the ExternalNetwork update allowing to specify optionAProperties. */ interface WithOptionAProperties { @@ -293,14 +335,16 @@ interface WithOptionAProperties { * @param optionAProperties option A properties object. * @return the next definition stage. */ - Update withOptionAProperties(Layer3OptionAProperties optionAProperties); + Update withOptionAProperties(ExternalNetworkPatchPropertiesOptionAProperties optionAProperties); } /** The stage of the ExternalNetwork update allowing to specify importRoutePolicyId. */ interface WithImportRoutePolicyId { /** - * Specifies the importRoutePolicyId property: ARM resource ID of importRoutePolicy.. + * Specifies the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the + * backward compatibility.. * - * @param importRoutePolicyId ARM resource ID of importRoutePolicy. + * @param importRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * @return the next definition stage. */ Update withImportRoutePolicyId(String importRoutePolicyId); @@ -308,13 +352,35 @@ interface WithImportRoutePolicyId { /** The stage of the ExternalNetwork update allowing to specify exportRoutePolicyId. */ interface WithExportRoutePolicyId { /** - * Specifies the exportRoutePolicyId property: ARM resource ID of exportRoutePolicy.. + * Specifies the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the + * backward compatibility.. * - * @param exportRoutePolicyId ARM resource ID of exportRoutePolicy. + * @param exportRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * @return the next definition stage. */ Update withExportRoutePolicyId(String exportRoutePolicyId); } + /** The stage of the ExternalNetwork update allowing to specify importRoutePolicy. */ + interface WithImportRoutePolicy { + /** + * Specifies the importRoutePolicy property: Import Route Policy either IPv4 or IPv6.. + * + * @param importRoutePolicy Import Route Policy either IPv4 or IPv6. + * @return the next definition stage. + */ + Update withImportRoutePolicy(ImportRoutePolicy importRoutePolicy); + } + /** The stage of the ExternalNetwork update allowing to specify exportRoutePolicy. */ + interface WithExportRoutePolicy { + /** + * Specifies the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6.. + * + * @param exportRoutePolicy Export Route Policy either IPv4 or IPv6. + * @return the next definition stage. + */ + Update withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy); + } /** The stage of the ExternalNetwork update allowing to specify annotation. */ interface WithAnnotation { /** @@ -350,8 +416,9 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateAdministrativeState(UpdateAdministrativeState body); + CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); /** * Implements the operation to the underlying resources. @@ -363,106 +430,35 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateAdministrativeState(UpdateAdministrativeState body, Context context); + CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); /** - * Executes BGP state update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BGP for externalNetwork. + *

Update Static Route BFD for external Network. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateBgpAdministrativeState(UpdateAdministrativeState body); + CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body); /** - * Executes BGP state update operation to the underlying resources. - * - *

Update BGP for externalNetwork. - * - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void updateBgpAdministrativeState(UpdateAdministrativeState body, Context context); - - /** - * Execute BfdForBgp update operation to the underlying resources. - * - *

Update BfdForBgp for externalNetwork. - * - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void updateBfdForBgpAdministrativeState(UpdateAdministrativeState body); - - /** - * Execute BfdForBgp update operation to the underlying resources. - * - *

Update BfdForBgp for externalNetwork. - * - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void updateBfdForBgpAdministrativeState(UpdateAdministrativeState body, Context context); - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearIpv6Neighbors(EnableDisableOnResources body); - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearIpv6Neighbors(EnableDisableOnResources body, Context context); - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearArpEntries(EnableDisableOnResources body); - - /** - * Implements the operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

clearArpEntries for externalNetwork. + *

Update Static Route BFD for external Network. * * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void clearArpEntries(EnableDisableOnResources body, Context context); + CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState( + UpdateAdministrativeState body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatch.java index 63b5e8ae3947e..e1bd4518aa43a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatch.java @@ -58,7 +58,7 @@ public ExternalNetworkPatch withPeeringOption(PeeringOption peeringOption) { * * @return the optionBProperties value. */ - public OptionBProperties optionBProperties() { + public L3OptionBProperties optionBProperties() { return this.innerProperties() == null ? null : this.innerProperties().optionBProperties(); } @@ -68,7 +68,7 @@ public OptionBProperties optionBProperties() { * @param optionBProperties the optionBProperties value to set. * @return the ExternalNetworkPatch object itself. */ - public ExternalNetworkPatch withOptionBProperties(OptionBProperties optionBProperties) { + public ExternalNetworkPatch withOptionBProperties(L3OptionBProperties optionBProperties) { if (this.innerProperties() == null) { this.innerProperties = new ExternalNetworkPatchProperties(); } @@ -81,7 +81,7 @@ public ExternalNetworkPatch withOptionBProperties(OptionBProperties optionBPrope * * @return the optionAProperties value. */ - public Layer3OptionAProperties optionAProperties() { + public ExternalNetworkPatchPropertiesOptionAProperties optionAProperties() { return this.innerProperties() == null ? null : this.innerProperties().optionAProperties(); } @@ -91,7 +91,8 @@ public Layer3OptionAProperties optionAProperties() { * @param optionAProperties the optionAProperties value to set. * @return the ExternalNetworkPatch object itself. */ - public ExternalNetworkPatch withOptionAProperties(Layer3OptionAProperties optionAProperties) { + public ExternalNetworkPatch withOptionAProperties( + ExternalNetworkPatchPropertiesOptionAProperties optionAProperties) { if (this.innerProperties() == null) { this.innerProperties = new ExternalNetworkPatchProperties(); } @@ -100,7 +101,8 @@ public ExternalNetworkPatch withOptionAProperties(Layer3OptionAProperties option } /** - * Get the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @return the importRoutePolicyId value. */ @@ -109,7 +111,8 @@ public String importRoutePolicyId() { } /** - * Set the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @param importRoutePolicyId the importRoutePolicyId value to set. * @return the ExternalNetworkPatch object itself. @@ -123,7 +126,8 @@ public ExternalNetworkPatch withImportRoutePolicyId(String importRoutePolicyId) } /** - * Get the exportRoutePolicyId property: ARM resource ID of exportRoutePolicy. + * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @return the exportRoutePolicyId value. */ @@ -132,7 +136,8 @@ public String exportRoutePolicyId() { } /** - * Set the exportRoutePolicyId property: ARM resource ID of exportRoutePolicy. + * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * * @param exportRoutePolicyId the exportRoutePolicyId value to set. * @return the ExternalNetworkPatch object itself. @@ -145,6 +150,52 @@ public ExternalNetworkPatch withExportRoutePolicyId(String exportRoutePolicyId) return this; } + /** + * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * + * @return the importRoutePolicy value. + */ + public ImportRoutePolicy importRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicy(); + } + + /** + * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. + * + * @param importRoutePolicy the importRoutePolicy value to set. + * @return the ExternalNetworkPatch object itself. + */ + public ExternalNetworkPatch withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new ExternalNetworkPatchProperties(); + } + this.innerProperties().withImportRoutePolicy(importRoutePolicy); + return this; + } + + /** + * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * + * @return the exportRoutePolicy value. + */ + public ExportRoutePolicy exportRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicy(); + } + + /** + * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. + * + * @param exportRoutePolicy the exportRoutePolicy value to set. + * @return the ExternalNetworkPatch object itself. + */ + public ExternalNetworkPatch withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new ExternalNetworkPatchProperties(); + } + this.innerProperties().withExportRoutePolicy(exportRoutePolicy); + return this; + } + /** * Get the annotation property: Switch configuration description. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchPropertiesOptionAProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchPropertiesOptionAProperties.java new file mode 100644 index 0000000000000..dba8f9e987fb8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchPropertiesOptionAProperties.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** option A properties object. */ +@Fluent +public final class ExternalNetworkPatchPropertiesOptionAProperties extends Layer3IpPrefixProperties { + /* + * MTU to use for option A peering. + */ + @JsonProperty(value = "mtu") + private Integer mtu; + + /* + * Vlan identifier. Example : 501 + */ + @JsonProperty(value = "vlanId") + private Integer vlanId; + + /* + * Fabric ASN number. Example 65001 + */ + @JsonProperty(value = "fabricASN", access = JsonProperty.Access.WRITE_ONLY) + private Long fabricAsn; + + /* + * Peer ASN number.Example : 28 + */ + @JsonProperty(value = "peerASN") + private Long peerAsn; + + /* + * BFD configuration properties + */ + @JsonProperty(value = "bfdConfiguration") + private BfdConfiguration bfdConfiguration; + + /* + * Ingress Acl. ARM resource ID of Access Control Lists. + */ + @JsonProperty(value = "ingressAclId") + private String ingressAclId; + + /* + * Egress Acl. ARM resource ID of Access Control Lists. + */ + @JsonProperty(value = "egressAclId") + private String egressAclId; + + /** Creates an instance of ExternalNetworkPatchPropertiesOptionAProperties class. */ + public ExternalNetworkPatchPropertiesOptionAProperties() { + } + + /** + * Get the mtu property: MTU to use for option A peering. + * + * @return the mtu value. + */ + public Integer mtu() { + return this.mtu; + } + + /** + * Set the mtu property: MTU to use for option A peering. + * + * @param mtu the mtu value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties withMtu(Integer mtu) { + this.mtu = mtu; + return this; + } + + /** + * Get the vlanId property: Vlan identifier. Example : 501. + * + * @return the vlanId value. + */ + public Integer vlanId() { + return this.vlanId; + } + + /** + * Set the vlanId property: Vlan identifier. Example : 501. + * + * @param vlanId the vlanId value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties withVlanId(Integer vlanId) { + this.vlanId = vlanId; + return this; + } + + /** + * Get the fabricAsn property: Fabric ASN number. Example 65001. + * + * @return the fabricAsn value. + */ + public Long fabricAsn() { + return this.fabricAsn; + } + + /** + * Get the peerAsn property: Peer ASN number.Example : 28. + * + * @return the peerAsn value. + */ + public Long peerAsn() { + return this.peerAsn; + } + + /** + * Set the peerAsn property: Peer ASN number.Example : 28. + * + * @param peerAsn the peerAsn value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties withPeerAsn(Long peerAsn) { + this.peerAsn = peerAsn; + return this; + } + + /** + * Get the bfdConfiguration property: BFD configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: BFD configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties withBfdConfiguration(BfdConfiguration bfdConfiguration) { + this.bfdConfiguration = bfdConfiguration; + return this; + } + + /** + * Get the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @return the ingressAclId value. + */ + public String ingressAclId() { + return this.ingressAclId; + } + + /** + * Set the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @param ingressAclId the ingressAclId value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties withIngressAclId(String ingressAclId) { + this.ingressAclId = ingressAclId; + return this; + } + + /** + * Get the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @return the egressAclId value. + */ + public String egressAclId() { + return this.egressAclId; + } + + /** + * Set the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @param egressAclId the egressAclId value to set. + * @return the ExternalNetworkPatchPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPatchPropertiesOptionAProperties withEgressAclId(String egressAclId) { + this.egressAclId = egressAclId; + return this; + } + + /** {@inheritDoc} */ + @Override + public ExternalNetworkPatchPropertiesOptionAProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) { + super.withPrimaryIpv4Prefix(primaryIpv4Prefix); + return this; + } + + /** {@inheritDoc} */ + @Override + public ExternalNetworkPatchPropertiesOptionAProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) { + super.withPrimaryIpv6Prefix(primaryIpv6Prefix); + return this; + } + + /** {@inheritDoc} */ + @Override + public ExternalNetworkPatchPropertiesOptionAProperties withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { + super.withSecondaryIpv4Prefix(secondaryIpv4Prefix); + return this; + } + + /** {@inheritDoc} */ + @Override + public ExternalNetworkPatchPropertiesOptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + super.withSecondaryIpv6Prefix(secondaryIpv6Prefix); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (bfdConfiguration() != null) { + bfdConfiguration().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchableProperties.java index 47f2f910bac46..9935b95b4d27e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchableProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPatchableProperties.java @@ -11,136 +11,114 @@ @Fluent public class ExternalNetworkPatchableProperties { /* - * Peering option list. + * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. */ - @JsonProperty(value = "peeringOption") - private PeeringOption peeringOption; - - /* - * option B properties object - */ - @JsonProperty(value = "optionBProperties") - private OptionBProperties optionBProperties; + @JsonProperty(value = "importRoutePolicyId") + private String importRoutePolicyId; /* - * option A properties object + * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. */ - @JsonProperty(value = "optionAProperties") - private Layer3OptionAProperties optionAProperties; + @JsonProperty(value = "exportRoutePolicyId") + private String exportRoutePolicyId; /* - * ARM resource ID of importRoutePolicy. + * Import Route Policy either IPv4 or IPv6. */ - @JsonProperty(value = "importRoutePolicyId") - private String importRoutePolicyId; + @JsonProperty(value = "importRoutePolicy") + private ImportRoutePolicy importRoutePolicy; /* - * ARM resource ID of exportRoutePolicy. + * Export Route Policy either IPv4 or IPv6. */ - @JsonProperty(value = "exportRoutePolicyId") - private String exportRoutePolicyId; + @JsonProperty(value = "exportRoutePolicy") + private ExportRoutePolicy exportRoutePolicy; /** Creates an instance of ExternalNetworkPatchableProperties class. */ public ExternalNetworkPatchableProperties() { } /** - * Get the peeringOption property: Peering option list. - * - * @return the peeringOption value. - */ - public PeeringOption peeringOption() { - return this.peeringOption; - } - - /** - * Set the peeringOption property: Peering option list. - * - * @param peeringOption the peeringOption value to set. - * @return the ExternalNetworkPatchableProperties object itself. - */ - public ExternalNetworkPatchableProperties withPeeringOption(PeeringOption peeringOption) { - this.peeringOption = peeringOption; - return this; - } - - /** - * Get the optionBProperties property: option B properties object. + * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @return the optionBProperties value. + * @return the importRoutePolicyId value. */ - public OptionBProperties optionBProperties() { - return this.optionBProperties; + public String importRoutePolicyId() { + return this.importRoutePolicyId; } /** - * Set the optionBProperties property: option B properties object. + * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @param optionBProperties the optionBProperties value to set. + * @param importRoutePolicyId the importRoutePolicyId value to set. * @return the ExternalNetworkPatchableProperties object itself. */ - public ExternalNetworkPatchableProperties withOptionBProperties(OptionBProperties optionBProperties) { - this.optionBProperties = optionBProperties; + public ExternalNetworkPatchableProperties withImportRoutePolicyId(String importRoutePolicyId) { + this.importRoutePolicyId = importRoutePolicyId; return this; } /** - * Get the optionAProperties property: option A properties object. + * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @return the optionAProperties value. + * @return the exportRoutePolicyId value. */ - public Layer3OptionAProperties optionAProperties() { - return this.optionAProperties; + public String exportRoutePolicyId() { + return this.exportRoutePolicyId; } /** - * Set the optionAProperties property: option A properties object. + * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @param optionAProperties the optionAProperties value to set. + * @param exportRoutePolicyId the exportRoutePolicyId value to set. * @return the ExternalNetworkPatchableProperties object itself. */ - public ExternalNetworkPatchableProperties withOptionAProperties(Layer3OptionAProperties optionAProperties) { - this.optionAProperties = optionAProperties; + public ExternalNetworkPatchableProperties withExportRoutePolicyId(String exportRoutePolicyId) { + this.exportRoutePolicyId = exportRoutePolicyId; return this; } /** - * Get the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @return the importRoutePolicyId value. + * @return the importRoutePolicy value. */ - public String importRoutePolicyId() { - return this.importRoutePolicyId; + public ImportRoutePolicy importRoutePolicy() { + return this.importRoutePolicy; } /** - * Set the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @param importRoutePolicyId the importRoutePolicyId value to set. + * @param importRoutePolicy the importRoutePolicy value to set. * @return the ExternalNetworkPatchableProperties object itself. */ - public ExternalNetworkPatchableProperties withImportRoutePolicyId(String importRoutePolicyId) { - this.importRoutePolicyId = importRoutePolicyId; + public ExternalNetworkPatchableProperties withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { + this.importRoutePolicy = importRoutePolicy; return this; } /** - * Get the exportRoutePolicyId property: ARM resource ID of exportRoutePolicy. + * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @return the exportRoutePolicyId value. + * @return the exportRoutePolicy value. */ - public String exportRoutePolicyId() { - return this.exportRoutePolicyId; + public ExportRoutePolicy exportRoutePolicy() { + return this.exportRoutePolicy; } /** - * Set the exportRoutePolicyId property: ARM resource ID of exportRoutePolicy. + * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. + * @param exportRoutePolicy the exportRoutePolicy value to set. * @return the ExternalNetworkPatchableProperties object itself. */ - public ExternalNetworkPatchableProperties withExportRoutePolicyId(String exportRoutePolicyId) { - this.exportRoutePolicyId = exportRoutePolicyId; + public ExternalNetworkPatchableProperties withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { + this.exportRoutePolicy = exportRoutePolicy; return this; } @@ -150,11 +128,11 @@ public ExternalNetworkPatchableProperties withExportRoutePolicyId(String exportR * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (optionBProperties() != null) { - optionBProperties().validate(); + if (importRoutePolicy() != null) { + importRoutePolicy().validate(); } - if (optionAProperties() != null) { - optionAProperties().validate(); + if (exportRoutePolicy() != null) { + exportRoutePolicy().validate(); } } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPropertiesOptionAProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPropertiesOptionAProperties.java index e13d34da492e9..11d3c288e5029 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPropertiesOptionAProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworkPropertiesOptionAProperties.java @@ -5,39 +5,183 @@ package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; /** option A properties object. */ @Fluent -public final class ExternalNetworkPropertiesOptionAProperties extends Layer3OptionAProperties { +public final class ExternalNetworkPropertiesOptionAProperties extends Layer3IpPrefixProperties { + /* + * MTU to use for option A peering. + */ + @JsonProperty(value = "mtu") + private Integer mtu; + + /* + * Vlan identifier. Example : 501 + */ + @JsonProperty(value = "vlanId") + private Integer vlanId; + + /* + * Fabric ASN number. Example 65001 + */ + @JsonProperty(value = "fabricASN", access = JsonProperty.Access.WRITE_ONLY) + private Long fabricAsn; + + /* + * Peer ASN number.Example : 28 + */ + @JsonProperty(value = "peerASN") + private Long peerAsn; + + /* + * BFD configuration properties + */ + @JsonProperty(value = "bfdConfiguration") + private BfdConfiguration bfdConfiguration; + + /* + * Ingress Acl. ARM resource ID of Access Control Lists. + */ + @JsonProperty(value = "ingressAclId") + private String ingressAclId; + + /* + * Egress Acl. ARM resource ID of Access Control Lists. + */ + @JsonProperty(value = "egressAclId") + private String egressAclId; + /** Creates an instance of ExternalNetworkPropertiesOptionAProperties class. */ public ExternalNetworkPropertiesOptionAProperties() { } - /** {@inheritDoc} */ - @Override + /** + * Get the mtu property: MTU to use for option A peering. + * + * @return the mtu value. + */ + public Integer mtu() { + return this.mtu; + } + + /** + * Set the mtu property: MTU to use for option A peering. + * + * @param mtu the mtu value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ public ExternalNetworkPropertiesOptionAProperties withMtu(Integer mtu) { - super.withMtu(mtu); + this.mtu = mtu; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the vlanId property: Vlan identifier. Example : 501. + * + * @return the vlanId value. + */ + public Integer vlanId() { + return this.vlanId; + } + + /** + * Set the vlanId property: Vlan identifier. Example : 501. + * + * @param vlanId the vlanId value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ public ExternalNetworkPropertiesOptionAProperties withVlanId(Integer vlanId) { - super.withVlanId(vlanId); + this.vlanId = vlanId; return this; } - /** {@inheritDoc} */ - @Override - public ExternalNetworkPropertiesOptionAProperties withPeerAsn(Integer peerAsn) { - super.withPeerAsn(peerAsn); + /** + * Get the fabricAsn property: Fabric ASN number. Example 65001. + * + * @return the fabricAsn value. + */ + public Long fabricAsn() { + return this.fabricAsn; + } + + /** + * Get the peerAsn property: Peer ASN number.Example : 28. + * + * @return the peerAsn value. + */ + public Long peerAsn() { + return this.peerAsn; + } + + /** + * Set the peerAsn property: Peer ASN number.Example : 28. + * + * @param peerAsn the peerAsn value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties withPeerAsn(Long peerAsn) { + this.peerAsn = peerAsn; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the bfdConfiguration property: BFD configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: BFD configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ public ExternalNetworkPropertiesOptionAProperties withBfdConfiguration(BfdConfiguration bfdConfiguration) { - super.withBfdConfiguration(bfdConfiguration); + this.bfdConfiguration = bfdConfiguration; + return this; + } + + /** + * Get the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @return the ingressAclId value. + */ + public String ingressAclId() { + return this.ingressAclId; + } + + /** + * Set the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @param ingressAclId the ingressAclId value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties withIngressAclId(String ingressAclId) { + this.ingressAclId = ingressAclId; + return this; + } + + /** + * Get the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @return the egressAclId value. + */ + public String egressAclId() { + return this.egressAclId; + } + + /** + * Set the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @param egressAclId the egressAclId value to set. + * @return the ExternalNetworkPropertiesOptionAProperties object itself. + */ + public ExternalNetworkPropertiesOptionAProperties withEgressAclId(String egressAclId) { + this.egressAclId = egressAclId; return this; } @@ -77,5 +221,8 @@ public ExternalNetworkPropertiesOptionAProperties withSecondaryIpv6Prefix(String @Override public void validate() { super.validate(); + if (bfdConfiguration() != null) { + bfdConfiguration().validate(); + } } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworks.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworks.java index 86531b09ef27d..90d037d8812e5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworks.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworks.java @@ -16,13 +16,13 @@ public interface ExternalNetworks { *

Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item along with {@link Response}. + * @return defines the External Network resource along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, Context context); @@ -33,12 +33,12 @@ Response getWithResponse( *

Implements ExternalNetworks GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item. + * @return defines the External Network resource. */ ExternalNetwork get(String resourceGroupName, String l3IsolationDomainName, String externalNetworkName); @@ -48,8 +48,8 @@ Response getWithResponse( *

Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -62,8 +62,8 @@ Response getWithResponse( *

Implements ExternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -77,13 +77,13 @@ Response getWithResponse( *

Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ExternalNetworks as paginated response with {@link PagedIterable}. + * @return list of External Networks as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String l3IsolationDomainName); + PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); /** * Executes list operation to display External Networks within an isolation domain. @@ -91,14 +91,15 @@ Response getWithResponse( *

Implements External Networks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ExternalNetworks as paginated response with {@link PagedIterable}. + * @return list of External Networks as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String l3IsolationDomainName, Context context); + PagedIterable listByL3IsolationDomain( + String resourceGroupName, String l3IsolationDomainName, Context context); /** * Implements the operation to the underlying resources. @@ -106,14 +107,15 @@ Response getWithResponse( *

Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateAdministrativeState( + CommonPostActionResponseForStateUpdate updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, @@ -125,15 +127,16 @@ void updateAdministrativeState( *

Executes update operation to enable or disable administrative State for externalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateAdministrativeState( + CommonPostActionResponseForStateUpdate updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, @@ -141,165 +144,47 @@ void updateAdministrativeState( Context context); /** - * Executes BGP state update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BGP for externalNetwork. + *

Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateBgpAdministrativeState( + CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body); /** - * Executes BGP state update operation to the underlying resources. + * Executes Static Route BFD state update operation to the underlying resources. * - *

Update BGP for externalNetwork. + *

Update Static Route BFD for external Network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param externalNetworkName Name of the External Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateBgpAdministrativeState( + CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String externalNetworkName, UpdateAdministrativeState body, Context context); - /** - * Execute BfdForBgp update operation to the underlying resources. - * - *

Update BfdForBgp for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void updateBfdForBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body); - - /** - * Execute BfdForBgp update operation to the underlying resources. - * - *

Update BfdForBgp for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void updateBfdForBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - UpdateAdministrativeState body, - Context context); - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body); - - /** - * Executes clearIpv6Neighbors table operation to the underlying resources. - * - *

clearIpv6Neighbors for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context); - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body); - - /** - * Implements the operation to the underlying resources. - * - *

clearArpEntries for externalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param externalNetworkName Name of the ExternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String externalNetworkName, - EnableDisableOnResources body, - Context context); - /** * Retrieves details of ExternalNetwork. * @@ -309,7 +194,7 @@ void clearArpEntries( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item along with {@link Response}. + * @return defines the External Network resource along with {@link Response}. */ ExternalNetwork getById(String id); @@ -323,7 +208,7 @@ void clearArpEntries( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the ExternalNetwork item along with {@link Response}. + * @return defines the External Network resource along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworksList.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworksList.java index b39c73626dcac..a45a5b4fb0d37 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworksList.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ExternalNetworksList.java @@ -9,11 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of ExternalNetworks. */ +/** List of External Networks. */ @Fluent public final class ExternalNetworksList { /* - * List of ExternalNetworks resources. + * List of External Network resources. */ @JsonProperty(value = "value") private List value; @@ -29,7 +29,7 @@ public ExternalNetworksList() { } /** - * Get the value property: List of ExternalNetworks resources. + * Get the value property: List of External Network resources. * * @return the value value. */ @@ -38,7 +38,7 @@ public List value() { } /** - * Set the value property: List of ExternalNetworks resources. + * Set the value property: List of External Network resources. * * @param value the value value to set. * @return the ExternalNetworksList object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricBfdConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricBfdConfiguration.java deleted file mode 100644 index 7fc7d8830e0ed..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricBfdConfiguration.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** BFD Configuration properties. */ -@Immutable -public final class FabricBfdConfiguration { - /* - * interval in seconds. Example: 300. - */ - @JsonProperty(value = "interval", access = JsonProperty.Access.WRITE_ONLY) - private Integer interval; - - /* - * multiplier. Example: 3. - */ - @JsonProperty(value = "multiplier", access = JsonProperty.Access.WRITE_ONLY) - private Integer multiplier; - - /** Creates an instance of FabricBfdConfiguration class. */ - public FabricBfdConfiguration() { - } - - /** - * Get the interval property: interval in seconds. Example: 300. - * - * @return the interval value. - */ - public Integer interval() { - return this.interval; - } - - /** - * Get the multiplier property: multiplier. Example: 3. - * - * @return the multiplier value. - */ - public Integer multiplier() { - return this.multiplier; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricSkuType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricSkuType.java new file mode 100644 index 0000000000000..66831712bb53b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/FabricSkuType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Type of Network Fabric SKU. */ +public final class FabricSkuType extends ExpandableStringEnum { + /** Static value SingleRack for FabricSkuType. */ + public static final FabricSkuType SINGLE_RACK = fromString("SingleRack"); + + /** Static value MultiRack for FabricSkuType. */ + public static final FabricSkuType MULTI_RACK = fromString("MultiRack"); + + /** + * Creates a new instance of FabricSkuType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FabricSkuType() { + } + + /** + * Creates or finds a FabricSkuType from its string representation. + * + * @param name a name to look for. + * @return the corresponding FabricSkuType. + */ + @JsonCreator + public static FabricSkuType fromString(String name) { + return fromString(name, FabricSkuType.class); + } + + /** + * Gets known FabricSkuType values. + * + * @return known FabricSkuType values. + */ + public static Collection values() { + return values(FabricSkuType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GatewayType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GatewayType.java new file mode 100644 index 0000000000000..8da5a0fae53c9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GatewayType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Gateway Type of the resource. */ +public final class GatewayType extends ExpandableStringEnum { + /** Static value Infrastructure for GatewayType. */ + public static final GatewayType INFRASTRUCTURE = fromString("Infrastructure"); + + /** Static value Workload for GatewayType. */ + public static final GatewayType WORKLOAD = fromString("Workload"); + + /** + * Creates a new instance of GatewayType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GatewayType() { + } + + /** + * Creates or finds a GatewayType from its string representation. + * + * @param name a name to look for. + * @return the corresponding GatewayType. + */ + @JsonCreator + public static GatewayType fromString(String name) { + return fromString(name, GatewayType.class); + } + + /** + * Gets known GatewayType values. + * + * @return known GatewayType values. + */ + public static Collection values() { + return values(GatewayType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetDeviceStatusProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetDeviceStatusProperties.java deleted file mode 100644 index b6e8ee4f57fe9..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetDeviceStatusProperties.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetDeviceStatusPropertiesInner; - -/** An immutable client-side representation of GetDeviceStatusProperties. */ -public interface GetDeviceStatusProperties { - /** - * Gets the operationalStatus property: Primary or Secondary power end. - * - * @return the operationalStatus value. - */ - OperationalStatus operationalStatus(); - - /** - * Gets the powerCycleState property: On or Off power cycle state. - * - * @return the powerCycleState value. - */ - PowerCycleState powerCycleState(); - - /** - * Gets the serialNumber property: The serial number of the device. - * - * @return the serialNumber value. - */ - String serialNumber(); - - /** - * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.GetDeviceStatusPropertiesInner - * object. - * - * @return the inner object. - */ - GetDeviceStatusPropertiesInner innerModel(); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetDynamicInterfaceMapsPropertiesItem.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetDynamicInterfaceMapsPropertiesItem.java deleted file mode 100644 index ce8d585373834..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetDynamicInterfaceMapsPropertiesItem.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetDynamicInterfaceMapsPropertiesItemInner; - -/** An immutable client-side representation of GetDynamicInterfaceMapsPropertiesItem. */ -public interface GetDynamicInterfaceMapsPropertiesItem { - /** - * Gets the administrativeState property: The interface administrative state. - * - * @return the administrativeState value. - */ - EnabledDisabledState administrativeState(); - - /** - * Gets the operationalStatus property: The interface operational status. - * - * @return the operationalStatus value. - */ - String operationalStatus(); - - /** - * Gets the phyStatus property: The physical status. - * - * @return the phyStatus value. - */ - String phyStatus(); - - /** - * Gets the transceiverStatus property: The interface transceiver type. Example: up or down. - * - * @return the transceiverStatus value. - */ - String transceiverStatus(); - - /** - * Gets the connectedTo property: Connected to ARM resource or external interface. - * - * @return the connectedTo value. - */ - String connectedTo(); - - /** - * Gets the name property: The interface name. - * - * @return the name value. - */ - String name(); - - /** - * Gets the inner - * com.azure.resourcemanager.managednetworkfabric.fluent.models.GetDynamicInterfaceMapsPropertiesItemInner object. - * - * @return the inner object. - */ - GetDynamicInterfaceMapsPropertiesItemInner innerModel(); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetStaticInterfaceMapsPropertiesItem.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetStaticInterfaceMapsPropertiesItem.java deleted file mode 100644 index 8b1a06e857f4d..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/GetStaticInterfaceMapsPropertiesItem.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetStaticInterfaceMapsPropertiesItemInner; - -/** An immutable client-side representation of GetStaticInterfaceMapsPropertiesItem. */ -public interface GetStaticInterfaceMapsPropertiesItem { - /** - * Gets the name property: The interface name. - * - * @return the name value. - */ - String name(); - - /** - * Gets the description property: The interface description. - * - * @return the description value. - */ - String description(); - - /** - * Gets the identifier property: The interface identifier. - * - * @return the identifier value. - */ - String identifier(); - - /** - * Gets the interfaceType property: The interface type. Example: Ethernet. - * - * @return the interfaceType value. - */ - String interfaceType(); - - /** - * Gets the connectorType property: The physical cable connector type. Example: Optical. - * - * @return the connectorType value. - */ - String connectorType(); - - /** - * Gets the connectedTo property: Connected to ARM resource or external interface. - * - * @return the connectedTo value. - */ - String connectedTo(); - - /** - * Gets the speed property: The interface speed. Example: 100. - * - * @return the speed value. - */ - Float speed(); - - /** - * Gets the channelGroupId property: The port channel group id. - * - * @return the channelGroupId value. - */ - Float channelGroupId(); - - /** - * Gets the inner - * com.azure.resourcemanager.managednetworkfabric.fluent.models.GetStaticInterfaceMapsPropertiesItemInner object. - * - * @return the inner object. - */ - GetStaticInterfaceMapsPropertiesItemInner innerModel(); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicy.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicy.java new file mode 100644 index 0000000000000..1b6509cf99259 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicy.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Import Route Policy either IPv4 or IPv6. */ +@Fluent +public final class ImportRoutePolicy { + /* + * ARM resource ID of RoutePolicy. + */ + @JsonProperty(value = "importIpv4RoutePolicyId") + private String importIpv4RoutePolicyId; + + /* + * ARM resource ID of RoutePolicy. + */ + @JsonProperty(value = "importIpv6RoutePolicyId") + private String importIpv6RoutePolicyId; + + /** Creates an instance of ImportRoutePolicy class. */ + public ImportRoutePolicy() { + } + + /** + * Get the importIpv4RoutePolicyId property: ARM resource ID of RoutePolicy. + * + * @return the importIpv4RoutePolicyId value. + */ + public String importIpv4RoutePolicyId() { + return this.importIpv4RoutePolicyId; + } + + /** + * Set the importIpv4RoutePolicyId property: ARM resource ID of RoutePolicy. + * + * @param importIpv4RoutePolicyId the importIpv4RoutePolicyId value to set. + * @return the ImportRoutePolicy object itself. + */ + public ImportRoutePolicy withImportIpv4RoutePolicyId(String importIpv4RoutePolicyId) { + this.importIpv4RoutePolicyId = importIpv4RoutePolicyId; + return this; + } + + /** + * Get the importIpv6RoutePolicyId property: ARM resource ID of RoutePolicy. + * + * @return the importIpv6RoutePolicyId value. + */ + public String importIpv6RoutePolicyId() { + return this.importIpv6RoutePolicyId; + } + + /** + * Set the importIpv6RoutePolicyId property: ARM resource ID of RoutePolicy. + * + * @param importIpv6RoutePolicyId the importIpv6RoutePolicyId value to set. + * @return the ImportRoutePolicy object itself. + */ + public ImportRoutePolicy withImportIpv6RoutePolicyId(String importIpv6RoutePolicyId) { + this.importIpv6RoutePolicyId = importIpv6RoutePolicyId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformation.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformation.java new file mode 100644 index 0000000000000..26a63d6f29b41 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ImportRoutePolicyInformation.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Import Route Policy Configuration. */ +@Fluent +public final class ImportRoutePolicyInformation { + /* + * Import IPv4 Route Policy Id. + */ + @JsonProperty(value = "importIpv4RoutePolicyId") + private String importIpv4RoutePolicyId; + + /* + * Import IPv6 Route Policy Id. + */ + @JsonProperty(value = "importIpv6RoutePolicyId") + private String importIpv6RoutePolicyId; + + /** Creates an instance of ImportRoutePolicyInformation class. */ + public ImportRoutePolicyInformation() { + } + + /** + * Get the importIpv4RoutePolicyId property: Import IPv4 Route Policy Id. + * + * @return the importIpv4RoutePolicyId value. + */ + public String importIpv4RoutePolicyId() { + return this.importIpv4RoutePolicyId; + } + + /** + * Set the importIpv4RoutePolicyId property: Import IPv4 Route Policy Id. + * + * @param importIpv4RoutePolicyId the importIpv4RoutePolicyId value to set. + * @return the ImportRoutePolicyInformation object itself. + */ + public ImportRoutePolicyInformation withImportIpv4RoutePolicyId(String importIpv4RoutePolicyId) { + this.importIpv4RoutePolicyId = importIpv4RoutePolicyId; + return this; + } + + /** + * Get the importIpv6RoutePolicyId property: Import IPv6 Route Policy Id. + * + * @return the importIpv6RoutePolicyId value. + */ + public String importIpv6RoutePolicyId() { + return this.importIpv6RoutePolicyId; + } + + /** + * Set the importIpv6RoutePolicyId property: Import IPv6 Route Policy Id. + * + * @param importIpv6RoutePolicyId the importIpv6RoutePolicyId value to set. + * @return the ImportRoutePolicyInformation object itself. + */ + public ImportRoutePolicyInformation withImportIpv6RoutePolicyId(String importIpv6RoutePolicyId) { + this.importIpv6RoutePolicyId = importIpv6RoutePolicyId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InterfaceStatus.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InterfaceStatus.java deleted file mode 100644 index 62e6f3062f31f..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InterfaceStatus.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InterfaceStatusInner; - -/** An immutable client-side representation of InterfaceStatus. */ -public interface InterfaceStatus { - /** - * Gets the administrativeState property: The interface administrative state. - * - * @return the administrativeState value. - */ - EnabledDisabledState administrativeState(); - - /** - * Gets the operationalStatus property: The interface operational status. - * - * @return the operationalStatus value. - */ - String operationalStatus(); - - /** - * Gets the phyStatus property: The physical status. - * - * @return the phyStatus value. - */ - String phyStatus(); - - /** - * Gets the transceiverStatus property: The interface transceiver type. Example: up or down. - * - * @return the transceiverStatus value. - */ - String transceiverStatus(); - - /** - * Gets the connectedTo property: Connected to ARM resource or external interface. - * - * @return the connectedTo value. - */ - String connectedTo(); - - /** - * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.InterfaceStatusInner object. - * - * @return the inner object. - */ - InterfaceStatusInner innerModel(); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetwork.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetwork.java index 7f8babe99dd8d..ddabfdae5c5f5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetwork.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetwork.java @@ -40,57 +40,46 @@ public interface InternalNetwork { SystemData systemData(); /** - * Gets the disabledOnResources property: List of resources the InternalNetwork is disabled on. Can be either entire - * NetworkFabric or NetworkRack. - * - * @return the disabledOnResources value. - */ - List disabledOnResources(); - - /** - * Gets the administrativeState property: Administrative state of the InternalNetwork. Example: Enabled | Disabled. + * Gets the vlanId property: Vlan identifier. Example: 1001. * - * @return the administrativeState value. + * @return the vlanId value. */ - EnabledDisabledState administrativeState(); + int vlanId(); /** - * Gets the bgpDisabledOnResources property: List of resources the BGP is disabled on. Can be either entire - * NetworkFabric or NetworkRack. + * Gets the bgpConfiguration property: BGP configuration properties. * - * @return the bgpDisabledOnResources value. + * @return the bgpConfiguration value. */ - List bgpDisabledOnResources(); + InternalNetworkPropertiesBgpConfiguration bgpConfiguration(); /** - * Gets the bfdDisabledOnResources property: List of resources the BFD for BGP is disabled on. Can be either entire - * NetworkFabric or NetworkRack. + * Gets the staticRouteConfiguration property: Static Route Configuration properties. * - * @return the bfdDisabledOnResources value. + * @return the staticRouteConfiguration value. */ - List bfdDisabledOnResources(); + InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration(); /** - * Gets the bfdForStaticRoutesDisabledOnResources property: List of resources the BFD of StaticRoutes is disabled - * on. Can be either entire NetworkFabric or NetworkRack. + * Gets the configurationState property: Configuration state of the resource. * - * @return the bfdForStaticRoutesDisabledOnResources value. + * @return the configurationState value. */ - List bfdForStaticRoutesDisabledOnResources(); + ConfigurationState configurationState(); /** - * Gets the provisioningState property: Gets the provisioning state of the resource. + * Gets the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** - * Gets the vlanId property: Vlan identifier. Example: 1001. + * Gets the administrativeState property: Administrative state of the resource. * - * @return the vlanId value. + * @return the administrativeState value. */ - int vlanId(); + AdministrativeState administrativeState(); /** * Gets the mtu property: Maximum transmission unit. Default value is 1500. @@ -100,46 +89,76 @@ public interface InternalNetwork { Integer mtu(); /** - * Gets the connectedIPv4Subnets property: List with object connected IPv4 Subnets. + * Gets the connectedIPv4Subnets property: List of Connected IPv4 Subnets. * * @return the connectedIPv4Subnets value. */ List connectedIPv4Subnets(); /** - * Gets the connectedIPv6Subnets property: List with object connected IPv6 Subnets. + * Gets the connectedIPv6Subnets property: List of connected IPv6 Subnets. * * @return the connectedIPv6Subnets value. */ List connectedIPv6Subnets(); /** - * Gets the staticRouteConfiguration property: Static Route Configuration properties. + * Gets the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @return the staticRouteConfiguration value. + * @return the importRoutePolicyId value. */ - StaticRouteConfiguration staticRouteConfiguration(); + String importRoutePolicyId(); /** - * Gets the bgpConfiguration property: BGP configuration properties. + * Gets the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @return the bgpConfiguration value. + * @return the exportRoutePolicyId value. */ - BgpConfiguration bgpConfiguration(); + String exportRoutePolicyId(); /** - * Gets the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Gets the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @return the importRoutePolicyId value. + * @return the importRoutePolicy value. */ - String importRoutePolicyId(); + ImportRoutePolicy importRoutePolicy(); /** - * Gets the exportRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Gets the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @return the exportRoutePolicyId value. + * @return the exportRoutePolicy value. */ - String exportRoutePolicyId(); + ExportRoutePolicy exportRoutePolicy(); + + /** + * Gets the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @return the ingressAclId value. + */ + String ingressAclId(); + + /** + * Gets the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @return the egressAclId value. + */ + String egressAclId(); + + /** + * Gets the isMonitoringEnabled property: To check whether monitoring of internal network is enabled or not. + * + * @return the isMonitoringEnabled value. + */ + IsMonitoringEnabled isMonitoringEnabled(); + + /** + * Gets the extension property: Extension. Example: NoExtension | NPB. + * + * @return the extension value. + */ + Extension extension(); /** * Gets the annotation property: Switch configuration description. @@ -180,7 +199,7 @@ interface WithParentResource { * Specifies resourceGroupName, l3IsolationDomainName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @return the next definition stage. */ WithVlanId withExistingL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); @@ -200,13 +219,19 @@ interface WithVlanId { * resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithMtu, + extends DefinitionStages.WithBgpConfiguration, + DefinitionStages.WithStaticRouteConfiguration, + DefinitionStages.WithMtu, DefinitionStages.WithConnectedIPv4Subnets, DefinitionStages.WithConnectedIPv6Subnets, - DefinitionStages.WithStaticRouteConfiguration, - DefinitionStages.WithBgpConfiguration, DefinitionStages.WithImportRoutePolicyId, DefinitionStages.WithExportRoutePolicyId, + DefinitionStages.WithImportRoutePolicy, + DefinitionStages.WithExportRoutePolicy, + DefinitionStages.WithIngressAclId, + DefinitionStages.WithEgressAclId, + DefinitionStages.WithIsMonitoringEnabled, + DefinitionStages.WithExtension, DefinitionStages.WithAnnotation { /** * Executes the create request. @@ -223,6 +248,27 @@ interface WithCreate */ InternalNetwork create(Context context); } + /** The stage of the InternalNetwork definition allowing to specify bgpConfiguration. */ + interface WithBgpConfiguration { + /** + * Specifies the bgpConfiguration property: BGP configuration properties.. + * + * @param bgpConfiguration BGP configuration properties. + * @return the next definition stage. + */ + WithCreate withBgpConfiguration(InternalNetworkPropertiesBgpConfiguration bgpConfiguration); + } + /** The stage of the InternalNetwork definition allowing to specify staticRouteConfiguration. */ + interface WithStaticRouteConfiguration { + /** + * Specifies the staticRouteConfiguration property: Static Route Configuration properties.. + * + * @param staticRouteConfiguration Static Route Configuration properties. + * @return the next definition stage. + */ + WithCreate withStaticRouteConfiguration( + InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration); + } /** The stage of the InternalNetwork definition allowing to specify mtu. */ interface WithMtu { /** @@ -236,9 +282,9 @@ interface WithMtu { /** The stage of the InternalNetwork definition allowing to specify connectedIPv4Subnets. */ interface WithConnectedIPv4Subnets { /** - * Specifies the connectedIPv4Subnets property: List with object connected IPv4 Subnets.. + * Specifies the connectedIPv4Subnets property: List of Connected IPv4 Subnets.. * - * @param connectedIPv4Subnets List with object connected IPv4 Subnets. + * @param connectedIPv4Subnets List of Connected IPv4 Subnets. * @return the next definition stage. */ WithCreate withConnectedIPv4Subnets(List connectedIPv4Subnets); @@ -246,52 +292,97 @@ interface WithConnectedIPv4Subnets { /** The stage of the InternalNetwork definition allowing to specify connectedIPv6Subnets. */ interface WithConnectedIPv6Subnets { /** - * Specifies the connectedIPv6Subnets property: List with object connected IPv6 Subnets.. + * Specifies the connectedIPv6Subnets property: List of connected IPv6 Subnets.. * - * @param connectedIPv6Subnets List with object connected IPv6 Subnets. + * @param connectedIPv6Subnets List of connected IPv6 Subnets. * @return the next definition stage. */ WithCreate withConnectedIPv6Subnets(List connectedIPv6Subnets); } - /** The stage of the InternalNetwork definition allowing to specify staticRouteConfiguration. */ - interface WithStaticRouteConfiguration { + /** The stage of the InternalNetwork definition allowing to specify importRoutePolicyId. */ + interface WithImportRoutePolicyId { /** - * Specifies the staticRouteConfiguration property: Static Route Configuration properties.. + * Specifies the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the + * backward compatibility.. * - * @param staticRouteConfiguration Static Route Configuration properties. + * @param importRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * @return the next definition stage. */ - WithCreate withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration); + WithCreate withImportRoutePolicyId(String importRoutePolicyId); } - /** The stage of the InternalNetwork definition allowing to specify bgpConfiguration. */ - interface WithBgpConfiguration { + /** The stage of the InternalNetwork definition allowing to specify exportRoutePolicyId. */ + interface WithExportRoutePolicyId { /** - * Specifies the bgpConfiguration property: BGP configuration properties. + * Specifies the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the + * backward compatibility.. * - * @param bgpConfiguration BGP configuration properties. + * @param exportRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * @return the next definition stage. */ - WithCreate withBgpConfiguration(BgpConfiguration bgpConfiguration); + WithCreate withExportRoutePolicyId(String exportRoutePolicyId); } - /** The stage of the InternalNetwork definition allowing to specify importRoutePolicyId. */ - interface WithImportRoutePolicyId { + /** The stage of the InternalNetwork definition allowing to specify importRoutePolicy. */ + interface WithImportRoutePolicy { /** - * Specifies the importRoutePolicyId property: ARM resource ID of importRoutePolicy.. + * Specifies the importRoutePolicy property: Import Route Policy either IPv4 or IPv6.. * - * @param importRoutePolicyId ARM resource ID of importRoutePolicy. + * @param importRoutePolicy Import Route Policy either IPv4 or IPv6. * @return the next definition stage. */ - WithCreate withImportRoutePolicyId(String importRoutePolicyId); + WithCreate withImportRoutePolicy(ImportRoutePolicy importRoutePolicy); } - /** The stage of the InternalNetwork definition allowing to specify exportRoutePolicyId. */ - interface WithExportRoutePolicyId { + /** The stage of the InternalNetwork definition allowing to specify exportRoutePolicy. */ + interface WithExportRoutePolicy { /** - * Specifies the exportRoutePolicyId property: ARM resource ID of importRoutePolicy.. + * Specifies the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6.. * - * @param exportRoutePolicyId ARM resource ID of importRoutePolicy. + * @param exportRoutePolicy Export Route Policy either IPv4 or IPv6. * @return the next definition stage. */ - WithCreate withExportRoutePolicyId(String exportRoutePolicyId); + WithCreate withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy); + } + /** The stage of the InternalNetwork definition allowing to specify ingressAclId. */ + interface WithIngressAclId { + /** + * Specifies the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists.. + * + * @param ingressAclId Ingress Acl. ARM resource ID of Access Control Lists. + * @return the next definition stage. + */ + WithCreate withIngressAclId(String ingressAclId); + } + /** The stage of the InternalNetwork definition allowing to specify egressAclId. */ + interface WithEgressAclId { + /** + * Specifies the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists.. + * + * @param egressAclId Egress Acl. ARM resource ID of Access Control Lists. + * @return the next definition stage. + */ + WithCreate withEgressAclId(String egressAclId); + } + /** The stage of the InternalNetwork definition allowing to specify isMonitoringEnabled. */ + interface WithIsMonitoringEnabled { + /** + * Specifies the isMonitoringEnabled property: To check whether monitoring of internal network is enabled or + * not.. + * + * @param isMonitoringEnabled To check whether monitoring of internal network is enabled or not. + * @return the next definition stage. + */ + WithCreate withIsMonitoringEnabled(IsMonitoringEnabled isMonitoringEnabled); + } + /** The stage of the InternalNetwork definition allowing to specify extension. */ + interface WithExtension { + /** + * Specifies the extension property: Extension. Example: NoExtension | NPB.. + * + * @param extension Extension. Example: NoExtension | NPB. + * @return the next definition stage. + */ + WithCreate withExtension(Extension extension); } /** The stage of the InternalNetwork definition allowing to specify annotation. */ interface WithAnnotation { @@ -313,13 +404,18 @@ interface WithAnnotation { /** The template for InternalNetwork update. */ interface Update - extends UpdateStages.WithMtu, + extends UpdateStages.WithBgpConfiguration, + UpdateStages.WithStaticRouteConfiguration, + UpdateStages.WithMtu, UpdateStages.WithConnectedIPv4Subnets, UpdateStages.WithConnectedIPv6Subnets, - UpdateStages.WithStaticRouteConfiguration, - UpdateStages.WithBgpConfiguration, UpdateStages.WithImportRoutePolicyId, UpdateStages.WithExportRoutePolicyId, + UpdateStages.WithImportRoutePolicy, + UpdateStages.WithExportRoutePolicy, + UpdateStages.WithIngressAclId, + UpdateStages.WithEgressAclId, + UpdateStages.WithIsMonitoringEnabled, UpdateStages.WithAnnotation { /** * Executes the update request. @@ -338,6 +434,26 @@ interface Update } /** The InternalNetwork update stages. */ interface UpdateStages { + /** The stage of the InternalNetwork update allowing to specify bgpConfiguration. */ + interface WithBgpConfiguration { + /** + * Specifies the bgpConfiguration property: BGP configuration properties.. + * + * @param bgpConfiguration BGP configuration properties. + * @return the next definition stage. + */ + Update withBgpConfiguration(BgpConfiguration bgpConfiguration); + } + /** The stage of the InternalNetwork update allowing to specify staticRouteConfiguration. */ + interface WithStaticRouteConfiguration { + /** + * Specifies the staticRouteConfiguration property: Static Route Configuration properties.. + * + * @param staticRouteConfiguration Static Route Configuration properties. + * @return the next definition stage. + */ + Update withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration); + } /** The stage of the InternalNetwork update allowing to specify mtu. */ interface WithMtu { /** @@ -351,9 +467,9 @@ interface WithMtu { /** The stage of the InternalNetwork update allowing to specify connectedIPv4Subnets. */ interface WithConnectedIPv4Subnets { /** - * Specifies the connectedIPv4Subnets property: List with object connected IPv4 Subnets.. + * Specifies the connectedIPv4Subnets property: List of Connected IPv4 Subnets.. * - * @param connectedIPv4Subnets List with object connected IPv4 Subnets. + * @param connectedIPv4Subnets List of Connected IPv4 Subnets. * @return the next definition stage. */ Update withConnectedIPv4Subnets(List connectedIPv4Subnets); @@ -361,52 +477,87 @@ interface WithConnectedIPv4Subnets { /** The stage of the InternalNetwork update allowing to specify connectedIPv6Subnets. */ interface WithConnectedIPv6Subnets { /** - * Specifies the connectedIPv6Subnets property: List with object connected IPv6 Subnets.. + * Specifies the connectedIPv6Subnets property: List of connected IPv6 Subnets.. * - * @param connectedIPv6Subnets List with object connected IPv6 Subnets. + * @param connectedIPv6Subnets List of connected IPv6 Subnets. * @return the next definition stage. */ Update withConnectedIPv6Subnets(List connectedIPv6Subnets); } - /** The stage of the InternalNetwork update allowing to specify staticRouteConfiguration. */ - interface WithStaticRouteConfiguration { + /** The stage of the InternalNetwork update allowing to specify importRoutePolicyId. */ + interface WithImportRoutePolicyId { /** - * Specifies the staticRouteConfiguration property: Static Route Configuration properties.. + * Specifies the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the + * backward compatibility.. * - * @param staticRouteConfiguration Static Route Configuration properties. + * @param importRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * @return the next definition stage. */ - Update withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration); + Update withImportRoutePolicyId(String importRoutePolicyId); } - /** The stage of the InternalNetwork update allowing to specify bgpConfiguration. */ - interface WithBgpConfiguration { + /** The stage of the InternalNetwork update allowing to specify exportRoutePolicyId. */ + interface WithExportRoutePolicyId { /** - * Specifies the bgpConfiguration property: BGP configuration properties. + * Specifies the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the + * backward compatibility.. * - * @param bgpConfiguration BGP configuration properties. + * @param exportRoutePolicyId ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * @return the next definition stage. */ - Update withBgpConfiguration(BgpConfiguration bgpConfiguration); + Update withExportRoutePolicyId(String exportRoutePolicyId); } - /** The stage of the InternalNetwork update allowing to specify importRoutePolicyId. */ - interface WithImportRoutePolicyId { + /** The stage of the InternalNetwork update allowing to specify importRoutePolicy. */ + interface WithImportRoutePolicy { /** - * Specifies the importRoutePolicyId property: ARM resource ID of importRoutePolicy.. + * Specifies the importRoutePolicy property: Import Route Policy either IPv4 or IPv6.. * - * @param importRoutePolicyId ARM resource ID of importRoutePolicy. + * @param importRoutePolicy Import Route Policy either IPv4 or IPv6. * @return the next definition stage. */ - Update withImportRoutePolicyId(String importRoutePolicyId); + Update withImportRoutePolicy(ImportRoutePolicy importRoutePolicy); } - /** The stage of the InternalNetwork update allowing to specify exportRoutePolicyId. */ - interface WithExportRoutePolicyId { + /** The stage of the InternalNetwork update allowing to specify exportRoutePolicy. */ + interface WithExportRoutePolicy { /** - * Specifies the exportRoutePolicyId property: ARM resource ID of importRoutePolicy.. + * Specifies the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6.. * - * @param exportRoutePolicyId ARM resource ID of importRoutePolicy. + * @param exportRoutePolicy Export Route Policy either IPv4 or IPv6. * @return the next definition stage. */ - Update withExportRoutePolicyId(String exportRoutePolicyId); + Update withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy); + } + /** The stage of the InternalNetwork update allowing to specify ingressAclId. */ + interface WithIngressAclId { + /** + * Specifies the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists.. + * + * @param ingressAclId Ingress Acl. ARM resource ID of Access Control Lists. + * @return the next definition stage. + */ + Update withIngressAclId(String ingressAclId); + } + /** The stage of the InternalNetwork update allowing to specify egressAclId. */ + interface WithEgressAclId { + /** + * Specifies the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists.. + * + * @param egressAclId Egress Acl. ARM resource ID of Access Control Lists. + * @return the next definition stage. + */ + Update withEgressAclId(String egressAclId); + } + /** The stage of the InternalNetwork update allowing to specify isMonitoringEnabled. */ + interface WithIsMonitoringEnabled { + /** + * Specifies the isMonitoringEnabled property: To check whether monitoring of internal network is enabled or + * not.. + * + * @param isMonitoringEnabled To check whether monitoring of internal network is enabled or not. + * @return the next definition stage. + */ + Update withIsMonitoringEnabled(IsMonitoringEnabled isMonitoringEnabled); } /** The stage of the InternalNetwork update allowing to specify annotation. */ interface WithAnnotation { @@ -443,8 +594,9 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateAdministrativeState(UpdateAdministrativeState body); + CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); /** * Executes the operation to the underlying resources. @@ -456,8 +608,9 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateAdministrativeState(UpdateAdministrativeState body, Context context); + CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); /** * Executes the operation to the underlying resources for updating BGP state on edge devices. @@ -468,8 +621,9 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateBgpAdministrativeState(UpdateAdministrativeState body); + CommonPostActionResponseForStateUpdate updateBgpAdministrativeState(UpdateAdministrativeState body); /** * Executes the operation to the underlying resources for updating BGP state on edge devices. @@ -481,106 +635,36 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateBgpAdministrativeState(UpdateAdministrativeState body, Context context); + CommonPostActionResponseForStateUpdate updateBgpAdministrativeState( + UpdateAdministrativeState body, Context context); /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateBfdForBgpAdministrativeState(UpdateAdministrativeState body); + CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState(UpdateAdministrativeState body); /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. - * - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void updateBfdForBgpAdministrativeState(UpdateAdministrativeState body, Context context); - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearIpv6Neighbors(EnableDisableOnResources body); - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearIpv6Neighbors(EnableDisableOnResources body, Context context); - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearArpEntries(EnableDisableOnResources body); - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearArpEntries(EnableDisableOnResources body, Context context); - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. - * - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void updateBfdForStaticRouteAdministrativeState(UpdateAdministrativeState body); - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateBfdForStaticRouteAdministrativeState(UpdateAdministrativeState body, Context context); + CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState( + UpdateAdministrativeState body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatch.java index 324eba38796e6..dedbba049e3c7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatch.java @@ -31,6 +31,52 @@ private InternalNetworkPatchProperties innerProperties() { return this.innerProperties; } + /** + * Get the bgpConfiguration property: BGP configuration properties. + * + * @return the bgpConfiguration value. + */ + public BgpConfiguration bgpConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().bgpConfiguration(); + } + + /** + * Set the bgpConfiguration property: BGP configuration properties. + * + * @param bgpConfiguration the bgpConfiguration value to set. + * @return the InternalNetworkPatch object itself. + */ + public InternalNetworkPatch withBgpConfiguration(BgpConfiguration bgpConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkPatchProperties(); + } + this.innerProperties().withBgpConfiguration(bgpConfiguration); + return this; + } + + /** + * Get the staticRouteConfiguration property: Static Route Configuration properties. + * + * @return the staticRouteConfiguration value. + */ + public StaticRouteConfiguration staticRouteConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().staticRouteConfiguration(); + } + + /** + * Set the staticRouteConfiguration property: Static Route Configuration properties. + * + * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @return the InternalNetworkPatch object itself. + */ + public InternalNetworkPatch withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkPatchProperties(); + } + this.innerProperties().withStaticRouteConfiguration(staticRouteConfiguration); + return this; + } + /** * Get the mtu property: Maximum transmission unit. Default value is 1500. * @@ -55,7 +101,7 @@ public InternalNetworkPatch withMtu(Integer mtu) { } /** - * Get the connectedIPv4Subnets property: List with object connected IPv4 Subnets. + * Get the connectedIPv4Subnets property: List of Connected IPv4 Subnets. * * @return the connectedIPv4Subnets value. */ @@ -64,7 +110,7 @@ public List connectedIPv4Subnets() { } /** - * Set the connectedIPv4Subnets property: List with object connected IPv4 Subnets. + * Set the connectedIPv4Subnets property: List of Connected IPv4 Subnets. * * @param connectedIPv4Subnets the connectedIPv4Subnets value to set. * @return the InternalNetworkPatch object itself. @@ -78,7 +124,7 @@ public InternalNetworkPatch withConnectedIPv4Subnets(List conne } /** - * Get the connectedIPv6Subnets property: List with object connected IPv6 Subnets. + * Get the connectedIPv6Subnets property: List of connected IPv6 Subnets. * * @return the connectedIPv6Subnets value. */ @@ -87,7 +133,7 @@ public List connectedIPv6Subnets() { } /** - * Set the connectedIPv6Subnets property: List with object connected IPv6 Subnets. + * Set the connectedIPv6Subnets property: List of connected IPv6 Subnets. * * @param connectedIPv6Subnets the connectedIPv6Subnets value to set. * @return the InternalNetworkPatch object itself. @@ -101,94 +147,167 @@ public InternalNetworkPatch withConnectedIPv6Subnets(List conne } /** - * Get the staticRouteConfiguration property: Static Route Configuration properties. + * Get the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @return the staticRouteConfiguration value. + * @return the importRoutePolicyId value. */ - public StaticRouteConfiguration staticRouteConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().staticRouteConfiguration(); + public String importRoutePolicyId() { + return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicyId(); } /** - * Set the staticRouteConfiguration property: Static Route Configuration properties. + * Set the importRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @param staticRouteConfiguration the staticRouteConfiguration value to set. + * @param importRoutePolicyId the importRoutePolicyId value to set. * @return the InternalNetworkPatch object itself. */ - public InternalNetworkPatch withStaticRouteConfiguration(StaticRouteConfiguration staticRouteConfiguration) { + public InternalNetworkPatch withImportRoutePolicyId(String importRoutePolicyId) { if (this.innerProperties() == null) { this.innerProperties = new InternalNetworkPatchProperties(); } - this.innerProperties().withStaticRouteConfiguration(staticRouteConfiguration); + this.innerProperties().withImportRoutePolicyId(importRoutePolicyId); return this; } /** - * Get the bgpConfiguration property: BGP configuration properties. + * Get the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @return the bgpConfiguration value. + * @return the exportRoutePolicyId value. */ - public BgpConfiguration bgpConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().bgpConfiguration(); + public String exportRoutePolicyId() { + return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicyId(); } /** - * Set the bgpConfiguration property: BGP configuration properties. + * Set the exportRoutePolicyId property: ARM Resource ID of the RoutePolicy. This is used for the backward + * compatibility. * - * @param bgpConfiguration the bgpConfiguration value to set. + * @param exportRoutePolicyId the exportRoutePolicyId value to set. * @return the InternalNetworkPatch object itself. */ - public InternalNetworkPatch withBgpConfiguration(BgpConfiguration bgpConfiguration) { + public InternalNetworkPatch withExportRoutePolicyId(String exportRoutePolicyId) { if (this.innerProperties() == null) { this.innerProperties = new InternalNetworkPatchProperties(); } - this.innerProperties().withBgpConfiguration(bgpConfiguration); + this.innerProperties().withExportRoutePolicyId(exportRoutePolicyId); return this; } /** - * Get the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Get the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @return the importRoutePolicyId value. + * @return the importRoutePolicy value. */ - public String importRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicyId(); + public ImportRoutePolicy importRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicy(); } /** - * Set the importRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Set the importRoutePolicy property: Import Route Policy either IPv4 or IPv6. * - * @param importRoutePolicyId the importRoutePolicyId value to set. + * @param importRoutePolicy the importRoutePolicy value to set. * @return the InternalNetworkPatch object itself. */ - public InternalNetworkPatch withImportRoutePolicyId(String importRoutePolicyId) { + public InternalNetworkPatch withImportRoutePolicy(ImportRoutePolicy importRoutePolicy) { if (this.innerProperties() == null) { this.innerProperties = new InternalNetworkPatchProperties(); } - this.innerProperties().withImportRoutePolicyId(importRoutePolicyId); + this.innerProperties().withImportRoutePolicy(importRoutePolicy); return this; } /** - * Get the exportRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Get the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @return the exportRoutePolicyId value. + * @return the exportRoutePolicy value. */ - public String exportRoutePolicyId() { - return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicyId(); + public ExportRoutePolicy exportRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicy(); } /** - * Set the exportRoutePolicyId property: ARM resource ID of importRoutePolicy. + * Set the exportRoutePolicy property: Export Route Policy either IPv4 or IPv6. * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. + * @param exportRoutePolicy the exportRoutePolicy value to set. * @return the InternalNetworkPatch object itself. */ - public InternalNetworkPatch withExportRoutePolicyId(String exportRoutePolicyId) { + public InternalNetworkPatch withExportRoutePolicy(ExportRoutePolicy exportRoutePolicy) { if (this.innerProperties() == null) { this.innerProperties = new InternalNetworkPatchProperties(); } - this.innerProperties().withExportRoutePolicyId(exportRoutePolicyId); + this.innerProperties().withExportRoutePolicy(exportRoutePolicy); + return this; + } + + /** + * Get the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @return the ingressAclId value. + */ + public String ingressAclId() { + return this.innerProperties() == null ? null : this.innerProperties().ingressAclId(); + } + + /** + * Set the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @param ingressAclId the ingressAclId value to set. + * @return the InternalNetworkPatch object itself. + */ + public InternalNetworkPatch withIngressAclId(String ingressAclId) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkPatchProperties(); + } + this.innerProperties().withIngressAclId(ingressAclId); + return this; + } + + /** + * Get the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @return the egressAclId value. + */ + public String egressAclId() { + return this.innerProperties() == null ? null : this.innerProperties().egressAclId(); + } + + /** + * Set the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @param egressAclId the egressAclId value to set. + * @return the InternalNetworkPatch object itself. + */ + public InternalNetworkPatch withEgressAclId(String egressAclId) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkPatchProperties(); + } + this.innerProperties().withEgressAclId(egressAclId); + return this; + } + + /** + * Get the isMonitoringEnabled property: To check whether monitoring of internal network is enabled or not. + * + * @return the isMonitoringEnabled value. + */ + public IsMonitoringEnabled isMonitoringEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().isMonitoringEnabled(); + } + + /** + * Set the isMonitoringEnabled property: To check whether monitoring of internal network is enabled or not. + * + * @param isMonitoringEnabled the isMonitoringEnabled value to set. + * @return the InternalNetworkPatch object itself. + */ + public InternalNetworkPatch withIsMonitoringEnabled(IsMonitoringEnabled isMonitoringEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new InternalNetworkPatchProperties(); + } + this.innerProperties().withIsMonitoringEnabled(isMonitoringEnabled); return this; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatchableProperties.java index 805da8edff5da..c4298d64705da 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatchableProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPatchableProperties.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The ExternalNetwork patchable properties. */ +/** The InternalNetwork patchable properties. */ @Fluent public class InternalNetworkPatchableProperties { /* @@ -18,40 +18,58 @@ public class InternalNetworkPatchableProperties { private Integer mtu; /* - * List with object connected IPv4 Subnets. + * List of Connected IPv4 Subnets. */ @JsonProperty(value = "connectedIPv4Subnets") private List connectedIPv4Subnets; /* - * List with object connected IPv6 Subnets. + * List of connected IPv6 Subnets. */ @JsonProperty(value = "connectedIPv6Subnets") private List connectedIPv6Subnets; /* - * Static Route Configuration properties. + * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. */ - @JsonProperty(value = "staticRouteConfiguration") - private StaticRouteConfiguration staticRouteConfiguration; + @JsonProperty(value = "importRoutePolicyId") + private String importRoutePolicyId; /* - * BGP configuration properties + * ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. */ - @JsonProperty(value = "bgpConfiguration") - private BgpConfiguration bgpConfiguration; + @JsonProperty(value = "exportRoutePolicyId") + private String exportRoutePolicyId; /* - * ARM resource ID of importRoutePolicy. + * Import Route Policy either IPv4 or IPv6. */ - @JsonProperty(value = "importRoutePolicyId") - private String importRoutePolicyId; + @JsonProperty(value = "importRoutePolicy") + private ImportRoutePolicy importRoutePolicy; /* - * ARM resource ID of importRoutePolicy. + * Export Route Policy either IPv4 or IPv6. */ - @JsonProperty(value = "exportRoutePolicyId") - private String exportRoutePolicyId; + @JsonProperty(value = "exportRoutePolicy") + private ExportRoutePolicy exportRoutePolicy; + + /* + * Ingress Acl. ARM resource ID of Access Control Lists. + */ + @JsonProperty(value = "ingressAclId") + private String ingressAclId; + + /* + * Egress Acl. ARM resource ID of Access Control Lists. + */ + @JsonProperty(value = "egressAclId") + private String egressAclId; + + /* + * To check whether monitoring of internal network is enabled or not. + */ + @JsonProperty(value = "isMonitoringEnabled") + private IsMonitoringEnabled isMonitoringEnabled; /** Creates an instance of InternalNetworkPatchableProperties class. */ public InternalNetworkPatchableProperties() { @@ -78,7 +96,7 @@ public InternalNetworkPatchableProperties withMtu(Integer mtu) { } /** - * Get the connectedIPv4Subnets property: List with object connected IPv4 Subnets. + * Get the connectedIPv4Subnets property: List of Connected IPv4 Subnets. * * @return the connectedIPv4Subnets value. */ @@ -87,7 +105,7 @@ public List connectedIPv4Subnets() { } /** - * Set the connectedIPv4Subnets property: List with object connected IPv4 Subnets. + * Set the connectedIPv4Subnets property: List of Connected IPv4 Subnets. * * @param connectedIPv4Subnets the connectedIPv4Subnets value to set. * @return the InternalNetworkPatchableProperties object itself. @@ -98,7 +116,7 @@ public InternalNetworkPatchableProperties withConnectedIPv4Subnets(List connectedIPv6Subnets() { } /** - * Set the connectedIPv6Subnets property: List with object connected IPv6 Subnets. + * Set the connectedIPv6Subnets property: List of connected IPv6 Subnets. * * @param connectedIPv6Subnets the connectedIPv6Subnets value to set. * @return the InternalNetworkPatchableProperties object itself. @@ -118,83 +136,146 @@ public InternalNetworkPatchableProperties withConnectedIPv6Subnets(List e.validate()); } - if (staticRouteConfiguration() != null) { - staticRouteConfiguration().validate(); + if (importRoutePolicy() != null) { + importRoutePolicy().validate(); } - if (bgpConfiguration() != null) { - bgpConfiguration().validate(); + if (exportRoutePolicy() != null) { + exportRoutePolicy().validate(); } } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesBgpConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesBgpConfiguration.java new file mode 100644 index 0000000000000..dd58b0349fc25 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesBgpConfiguration.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import java.util.List; + +/** BGP configuration properties. */ +@Fluent +public final class InternalNetworkPropertiesBgpConfiguration extends BgpConfiguration { + /** Creates an instance of InternalNetworkPropertiesBgpConfiguration class. */ + public InternalNetworkPropertiesBgpConfiguration() { + } + + /** {@inheritDoc} */ + @Override + public InternalNetworkPropertiesBgpConfiguration withBfdConfiguration(BfdConfiguration bfdConfiguration) { + super.withBfdConfiguration(bfdConfiguration); + return this; + } + + /** {@inheritDoc} */ + @Override + public InternalNetworkPropertiesBgpConfiguration withDefaultRouteOriginate( + BooleanEnumProperty defaultRouteOriginate) { + super.withDefaultRouteOriginate(defaultRouteOriginate); + return this; + } + + /** {@inheritDoc} */ + @Override + public InternalNetworkPropertiesBgpConfiguration withAllowAS(Integer allowAS) { + super.withAllowAS(allowAS); + return this; + } + + /** {@inheritDoc} */ + @Override + public InternalNetworkPropertiesBgpConfiguration withAllowASOverride(AllowASOverride allowASOverride) { + super.withAllowASOverride(allowASOverride); + return this; + } + + /** {@inheritDoc} */ + @Override + public InternalNetworkPropertiesBgpConfiguration withPeerAsn(Long peerAsn) { + super.withPeerAsn(peerAsn); + return this; + } + + /** {@inheritDoc} */ + @Override + public InternalNetworkPropertiesBgpConfiguration withIpv4ListenRangePrefixes(List ipv4ListenRangePrefixes) { + super.withIpv4ListenRangePrefixes(ipv4ListenRangePrefixes); + return this; + } + + /** {@inheritDoc} */ + @Override + public InternalNetworkPropertiesBgpConfiguration withIpv6ListenRangePrefixes(List ipv6ListenRangePrefixes) { + super.withIpv6ListenRangePrefixes(ipv6ListenRangePrefixes); + return this; + } + + /** {@inheritDoc} */ + @Override + public InternalNetworkPropertiesBgpConfiguration withIpv4NeighborAddress( + List ipv4NeighborAddress) { + super.withIpv4NeighborAddress(ipv4NeighborAddress); + return this; + } + + /** {@inheritDoc} */ + @Override + public InternalNetworkPropertiesBgpConfiguration withIpv6NeighborAddress( + List ipv6NeighborAddress) { + super.withIpv6NeighborAddress(ipv6NeighborAddress); + return this; + } + + /** {@inheritDoc} */ + @Override + public InternalNetworkPropertiesBgpConfiguration withAnnotation(String annotation) { + super.withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesStaticRouteConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesStaticRouteConfiguration.java new file mode 100644 index 0000000000000..ea0fd78549d4c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworkPropertiesStaticRouteConfiguration.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Static Route Configuration properties. */ +@Fluent +public final class InternalNetworkPropertiesStaticRouteConfiguration extends StaticRouteConfiguration { + /* + * Extension. Example: NoExtension | NPB. + */ + @JsonProperty(value = "extension") + private Extension extension; + + /** Creates an instance of InternalNetworkPropertiesStaticRouteConfiguration class. */ + public InternalNetworkPropertiesStaticRouteConfiguration() { + } + + /** + * Get the extension property: Extension. Example: NoExtension | NPB. + * + * @return the extension value. + */ + public Extension extension() { + return this.extension; + } + + /** + * Set the extension property: Extension. Example: NoExtension | NPB. + * + * @param extension the extension value to set. + * @return the InternalNetworkPropertiesStaticRouteConfiguration object itself. + */ + public InternalNetworkPropertiesStaticRouteConfiguration withExtension(Extension extension) { + this.extension = extension; + return this; + } + + /** {@inheritDoc} */ + @Override + public InternalNetworkPropertiesStaticRouteConfiguration withBfdConfiguration(BfdConfiguration bfdConfiguration) { + super.withBfdConfiguration(bfdConfiguration); + return this; + } + + /** {@inheritDoc} */ + @Override + public InternalNetworkPropertiesStaticRouteConfiguration withIpv4Routes(List ipv4Routes) { + super.withIpv4Routes(ipv4Routes); + return this; + } + + /** {@inheritDoc} */ + @Override + public InternalNetworkPropertiesStaticRouteConfiguration withIpv6Routes(List ipv6Routes) { + super.withIpv6Routes(ipv6Routes); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworks.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworks.java index 448f78124bd32..2732a3af6c7db 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworks.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworks.java @@ -16,8 +16,8 @@ public interface InternalNetworks { *

Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -33,8 +33,8 @@ Response getWithResponse( *

Gets a InternalNetworks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -48,8 +48,8 @@ Response getWithResponse( *

Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -62,8 +62,8 @@ Response getWithResponse( *

Implements InternalNetworks DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -77,13 +77,13 @@ Response getWithResponse( *

Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternalNetworks as paginated response with {@link PagedIterable}. + * @return list of Internal Networks as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String l3IsolationDomainName); + PagedIterable listByL3IsolationDomain(String resourceGroupName, String l3IsolationDomainName); /** * Executes list operation to display list of all internal networks @@ -91,14 +91,15 @@ Response getWithResponse( *

Displays InternalNetworks list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of InternalNetworks as paginated response with {@link PagedIterable}. + * @return list of Internal Networks as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String l3IsolationDomainName, Context context); + PagedIterable listByL3IsolationDomain( + String resourceGroupName, String l3IsolationDomainName, Context context); /** * Executes the operation to the underlying resources. @@ -106,14 +107,15 @@ Response getWithResponse( *

Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateAdministrativeState( + CommonPostActionResponseForStateUpdate updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, @@ -125,15 +127,16 @@ void updateAdministrativeState( *

Update Administrative state of InternalNetworks on resources referred by their resource ids. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateAdministrativeState( + CommonPostActionResponseForStateUpdate updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, @@ -146,14 +149,15 @@ void updateAdministrativeState( *

Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateBgpAdministrativeState( + CommonPostActionResponseForStateUpdate updateBgpAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, @@ -165,15 +169,16 @@ void updateBgpAdministrativeState( *

Update BGP state for internalNetwork. Allowed only on edge devices. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateBgpAdministrativeState( + CommonPostActionResponseForStateUpdate updateBgpAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, @@ -183,17 +188,18 @@ void updateBgpAdministrativeState( /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateBfdForBgpAdministrativeState( + CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, @@ -202,138 +208,19 @@ void updateBfdForBgpAdministrativeState( /** * Implements the operation to the underlying resources. * - *

Update BfdForBgp for internalNetwork. + *

Update Static Route BFD administrative state for internalNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. + * @param internalNetworkName Name of the Internal Network. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateBfdForBgpAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body, - Context context); - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body); - - /** - * Implements the operation to the underlying resources. - * - *

clearIpv6Neighbors for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearIpv6Neighbors( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context); - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body); - - /** - * Executes clearArpEntries operation to the underlying resources. - * - *

clearArpEntries for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearArpEntries( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - EnableDisableOnResources body, - Context context); - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void updateBfdForStaticRouteAdministrativeState( - String resourceGroupName, - String l3IsolationDomainName, - String internalNetworkName, - UpdateAdministrativeState body); - - /** - * Executes update BfdForStaticRoutes operation to the underlying resources. - * - *

Update BfdForStaticRoutes for internalNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param internalNetworkName Name of the InternalNetwork. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void updateBfdForStaticRouteAdministrativeState( + CommonPostActionResponseForStateUpdate updateStaticRouteBfdAdministrativeState( String resourceGroupName, String l3IsolationDomainName, String internalNetworkName, diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworksList.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworksList.java index e241965f5d643..c7df4656721bb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworksList.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternalNetworksList.java @@ -9,11 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of InternalNetworks. */ +/** List of Internal Networks. */ @Fluent public final class InternalNetworksList { /* - * List of InternalNetworks resources. + * List of Internal Network resources. */ @JsonProperty(value = "value") private List value; @@ -29,7 +29,7 @@ public InternalNetworksList() { } /** - * Get the value property: List of InternalNetworks resources. + * Get the value property: List of Internal Network resources. * * @return the value value. */ @@ -38,7 +38,7 @@ public List value() { } /** - * Set the value property: List of InternalNetworks resources. + * Set the value property: List of Internal Network resources. * * @param value the value value to set. * @return the InternalNetworksList object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateway.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateway.java new file mode 100644 index 0000000000000..ddd753023507a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateway.java @@ -0,0 +1,311 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayInner; +import java.util.Map; + +/** An immutable client-side representation of InternetGateway. */ +public interface InternetGateway { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the ipv4Address property: IPv4 Address of Internet Gateway. + * + * @return the ipv4Address value. + */ + String ipv4Address(); + + /** + * Gets the port property: Port number of Internet Gateway. + * + * @return the port value. + */ + Integer port(); + + /** + * Gets the typePropertiesType property: Gateway Type of the resource. + * + * @return the typePropertiesType value. + */ + GatewayType typePropertiesType(); + + /** + * Gets the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller. + * + * @return the networkFabricControllerId value. + */ + String networkFabricControllerId(); + + /** + * Gets the provisioningState property: Provisioning state of resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * + * @return the internetGatewayRuleId value. + */ + String internetGatewayRuleId(); + + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayInner object. + * + * @return the inner object. + */ + InternetGatewayInner innerModel(); + + /** The entirety of the InternetGateway definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithTypePropertiesType, + DefinitionStages.WithNetworkFabricControllerId, + DefinitionStages.WithCreate { + } + /** The InternetGateway definition stages. */ + interface DefinitionStages { + /** The first stage of the InternetGateway definition. */ + interface Blank extends WithLocation { + } + /** The stage of the InternetGateway definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + /** The stage of the InternetGateway definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithTypePropertiesType withExistingResourceGroup(String resourceGroupName); + } + /** The stage of the InternetGateway definition allowing to specify typePropertiesType. */ + interface WithTypePropertiesType { + /** + * Specifies the typePropertiesType property: Gateway Type of the resource.. + * + * @param typePropertiesType Gateway Type of the resource. + * @return the next definition stage. + */ + WithNetworkFabricControllerId withTypePropertiesType(GatewayType typePropertiesType); + } + /** The stage of the InternetGateway definition allowing to specify networkFabricControllerId. */ + interface WithNetworkFabricControllerId { + /** + * Specifies the networkFabricControllerId property: ARM Resource ID of the Network Fabric Controller.. + * + * @param networkFabricControllerId ARM Resource ID of the Network Fabric Controller. + * @return the next definition stage. + */ + WithCreate withNetworkFabricControllerId(String networkFabricControllerId); + } + /** + * The stage of the InternetGateway definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithInternetGatewayRuleId, + DefinitionStages.WithAnnotation { + /** + * Executes the create request. + * + * @return the created resource. + */ + InternetGateway create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + InternetGateway create(Context context); + } + /** The stage of the InternetGateway definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the InternetGateway definition allowing to specify internetGatewayRuleId. */ + interface WithInternetGatewayRuleId { + /** + * Specifies the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule.. + * + * @param internetGatewayRuleId ARM Resource ID of the Internet Gateway Rule. + * @return the next definition stage. + */ + WithCreate withInternetGatewayRuleId(String internetGatewayRuleId); + } + /** The stage of the InternetGateway definition allowing to specify annotation. */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + WithCreate withAnnotation(String annotation); + } + } + /** + * Begins update for the InternetGateway resource. + * + * @return the stage of resource update. + */ + InternetGateway.Update update(); + + /** The template for InternetGateway update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithInternetGatewayRuleId { + /** + * Executes the update request. + * + * @return the updated resource. + */ + InternetGateway apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + InternetGateway apply(Context context); + } + /** The InternetGateway update stages. */ + interface UpdateStages { + /** The stage of the InternetGateway update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** The stage of the InternetGateway update allowing to specify internetGatewayRuleId. */ + interface WithInternetGatewayRuleId { + /** + * Specifies the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule.. + * + * @param internetGatewayRuleId ARM Resource ID of the Internet Gateway Rule. + * @return the next definition stage. + */ + Update withInternetGatewayRuleId(String internetGatewayRuleId); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + InternetGateway refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + InternetGateway refresh(Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayPatch.java new file mode 100644 index 0000000000000..ce6e7ad68960b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayPatch.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayPatchableProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The Internet Gateway patch resource definition. */ +@Fluent +public final class InternetGatewayPatch extends TagsUpdate { + /* + * Resource properties. + */ + @JsonProperty(value = "properties") + private InternetGatewayPatchableProperties innerProperties; + + /** Creates an instance of InternetGatewayPatch class. */ + public InternetGatewayPatch() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private InternetGatewayPatchableProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public InternetGatewayPatch withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * + * @return the internetGatewayRuleId value. + */ + public String internetGatewayRuleId() { + return this.innerProperties() == null ? null : this.innerProperties().internetGatewayRuleId(); + } + + /** + * Set the internetGatewayRuleId property: ARM Resource ID of the Internet Gateway Rule. + * + * @param internetGatewayRuleId the internetGatewayRuleId value to set. + * @return the InternetGatewayPatch object itself. + */ + public InternetGatewayPatch withInternetGatewayRuleId(String internetGatewayRuleId) { + if (this.innerProperties() == null) { + this.innerProperties = new InternetGatewayPatchableProperties(); + } + this.innerProperties().withInternetGatewayRuleId(internetGatewayRuleId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRule.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRule.java new file mode 100644 index 0000000000000..b1c2420a15938 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRule.java @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of InternetGatewayRule. */ +public interface InternetGatewayRule { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the ruleProperties property: Rules for the InternetGateways. + * + * @return the ruleProperties value. + */ + RuleProperties ruleProperties(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the internetGatewayIds property: List of Internet Gateway resource Id. + * + * @return the internetGatewayIds value. + */ + List internetGatewayIds(); + + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner object. + * + * @return the inner object. + */ + InternetGatewayRuleInner innerModel(); + + /** The entirety of the InternetGatewayRule definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithRuleProperties, + DefinitionStages.WithCreate { + } + /** The InternetGatewayRule definition stages. */ + interface DefinitionStages { + /** The first stage of the InternetGatewayRule definition. */ + interface Blank extends WithLocation { + } + /** The stage of the InternetGatewayRule definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + /** The stage of the InternetGatewayRule definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithRuleProperties withExistingResourceGroup(String resourceGroupName); + } + /** The stage of the InternetGatewayRule definition allowing to specify ruleProperties. */ + interface WithRuleProperties { + /** + * Specifies the ruleProperties property: Rules for the InternetGateways. + * + * @param ruleProperties Rules for the InternetGateways. + * @return the next definition stage. + */ + WithCreate withRuleProperties(RuleProperties ruleProperties); + } + /** + * The stage of the InternetGatewayRule definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithAnnotation { + /** + * Executes the create request. + * + * @return the created resource. + */ + InternetGatewayRule create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + InternetGatewayRule create(Context context); + } + /** The stage of the InternetGatewayRule definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the InternetGatewayRule definition allowing to specify annotation. */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + WithCreate withAnnotation(String annotation); + } + } + /** + * Begins update for the InternetGatewayRule resource. + * + * @return the stage of resource update. + */ + InternetGatewayRule.Update update(); + + /** The template for InternetGatewayRule update. */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + InternetGatewayRule apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + InternetGatewayRule apply(Context context); + } + /** The InternetGatewayRule update stages. */ + interface UpdateStages { + /** The stage of the InternetGatewayRule update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + InternetGatewayRule refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + InternetGatewayRule refresh(Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulePatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulePatch.java new file mode 100644 index 0000000000000..0c7b51273ec89 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulePatch.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import java.util.Map; + +/** The Internet Gateway Rules patch resource definition. */ +@Fluent +public final class InternetGatewayRulePatch extends TagsUpdate { + /** Creates an instance of InternetGatewayRulePatch class. */ + public InternetGatewayRulePatch() { + } + + /** {@inheritDoc} */ + @Override + public InternetGatewayRulePatch withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRules.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRules.java new file mode 100644 index 0000000000000..2963f4fc4331c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRules.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of InternetGatewayRules. */ +public interface InternetGatewayRules { + /** + * Gets an Internet Gateway Rule. + * + *

Gets an Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Internet Gateway Rule resource along with {@link Response}. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String internetGatewayRuleName, Context context); + + /** + * Gets an Internet Gateway Rule. + * + *

Gets an Internet Gateway Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Internet Gateway Rule resource. + */ + InternetGatewayRule getByResourceGroup(String resourceGroupName, String internetGatewayRuleName); + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String internetGatewayRuleName); + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayRuleName Name of the Internet Gateway rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String internetGatewayRuleName, Context context); + + /** + * List Internet Gateway Rules by resource group. + * + *

Implements Internet Gateway Rules list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List Internet Gateway Rules by resource group. + * + *

Implements Internet Gateway Rules list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List Internet Gateway Rules by subscription. + * + *

List all Internet Gateway rules in the given subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List Internet Gateway Rules by subscription. + * + *

List all Internet Gateway rules in the given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Internet Gateway Rules as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Gets an Internet Gateway Rule. + * + *

Gets an Internet Gateway Rule resource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Internet Gateway Rule resource along with {@link Response}. + */ + InternetGatewayRule getById(String id); + + /** + * Gets an Internet Gateway Rule. + * + *

Gets an Internet Gateway Rule resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Internet Gateway Rule resource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes an Internet Gateway Rule. + * + *

Implements Internet Gateway Rules DELETE method. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new InternetGatewayRule resource. + * + * @param name resource name. + * @return the first stage of the new InternetGatewayRule definition. + */ + InternetGatewayRule.DefinitionStages.Blank define(String name); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulesListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulesListResult.java new file mode 100644 index 0000000000000..bdb44d913ae6a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewayRulesListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayRuleInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of Internet Gateway Rules. */ +@Fluent +public final class InternetGatewayRulesListResult { + /* + * List of Internet Gateway Rule resources. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Url to follow for getting next page of resources. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of InternetGatewayRulesListResult class. */ + public InternetGatewayRulesListResult() { + } + + /** + * Get the value property: List of Internet Gateway Rule resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of Internet Gateway Rule resources. + * + * @param value the value value to set. + * @return the InternetGatewayRulesListResult object itself. + */ + public InternetGatewayRulesListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Url to follow for getting next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Url to follow for getting next page of resources. + * + * @param nextLink the nextLink value to set. + * @return the InternetGatewayRulesListResult object itself. + */ + public InternetGatewayRulesListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateways.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateways.java new file mode 100644 index 0000000000000..267f37971f35d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGateways.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of InternetGateways. */ +public interface InternetGateways { + /** + * Retrieves details of Network Fabric Service Internet Gateway. + * + *

Implements Gateway GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition along with {@link Response}. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String internetGatewayName, Context context); + + /** + * Retrieves details of Network Fabric Service Internet Gateway. + * + *

Implements Gateway GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition. + */ + InternetGateway getByResourceGroup(String resourceGroupName, String internetGatewayName); + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String internetGatewayName); + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param internetGatewayName Name of the Internet Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String internetGatewayName, Context context); + + /** + * List Internet Gateways by resource group. + * + *

Displays Internet Gateways list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List Internet Gateways by resource group. + * + *

Displays Internet Gateways list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List Internet Gateways by subscription. + * + *

Displays Internet Gateways list by subscription GET method. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List Internet Gateways by subscription. + * + *

Displays Internet Gateways list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of InternetGateways as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Retrieves details of Network Fabric Service Internet Gateway. + * + *

Implements Gateway GET method. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition along with {@link Response}. + */ + InternetGateway getById(String id); + + /** + * Retrieves details of Network Fabric Service Internet Gateway. + * + *

Implements Gateway GET method. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Internet Gateway resource definition along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a Network Fabric Service Internet Gateway. + * + *

Execute a delete on Network Fabric Service Internet Gateway. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new InternetGateway resource. + * + * @param name resource name. + * @return the first stage of the new InternetGateway definition. + */ + InternetGateway.DefinitionStages.Blank define(String name); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewaysListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewaysListResult.java new file mode 100644 index 0000000000000..0c6fe55aeb205 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/InternetGatewaysListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternetGatewayInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of InternetGateways. */ +@Fluent +public final class InternetGatewaysListResult { + /* + * Displays list of Internet Gateway resources. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Url to follow for getting next page of resources. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of InternetGatewaysListResult class. */ + public InternetGatewaysListResult() { + } + + /** + * Get the value property: Displays list of Internet Gateway resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Displays list of Internet Gateway resources. + * + * @param value the value value to set. + * @return the InternetGatewaysListResult object itself. + */ + public InternetGatewaysListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Url to follow for getting next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Url to follow for getting next page of resources. + * + * @param nextLink the nextLink value to set. + * @return the InternetGatewaysListResult object itself. + */ + public InternetGatewaysListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpAddressType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpAddressType.java new file mode 100644 index 0000000000000..66098b71e2342 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpAddressType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** IP Address type. */ +public final class IpAddressType extends ExpandableStringEnum { + /** Static value IPv4 for IpAddressType. */ + public static final IpAddressType IPV4 = fromString("IPv4"); + + /** Static value IPv6 for IpAddressType. */ + public static final IpAddressType IPV6 = fromString("IPv6"); + + /** + * Creates a new instance of IpAddressType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IpAddressType() { + } + + /** + * Creates or finds a IpAddressType from its string representation. + * + * @param name a name to look for. + * @return the corresponding IpAddressType. + */ + @JsonCreator + public static IpAddressType fromString(String name) { + return fromString(name, IpAddressType.class); + } + + /** + * Gets known IpAddressType values. + * + * @return known IpAddressType values. + */ + public static Collection values() { + return values(IpAddressType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunities.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunities.java index 264ad43f4900b..1738c42dd7e73 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunities.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunities.java @@ -21,7 +21,7 @@ public interface IpCommunities { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition along with {@link Response}. + * @return the IP Community resource definition along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String ipCommunityName, Context context); @@ -36,7 +36,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition. + * @return the IP Community resource definition. */ IpCommunity getByResourceGroup(String resourceGroupName, String ipCommunityName); @@ -68,53 +68,53 @@ Response getByResourceGroupWithResponse( void delete(String resourceGroupName, String ipCommunityName, Context context); /** - * List IpCommunities by resource group. + * List IP Communities by resource group. * - *

Implements IpCommunities list by resource group GET method. + *

Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Communities as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List IpCommunities by resource group. + * List IP Communities by resource group. * - *

Implements IpCommunities list by resource group GET method. + *

Implements IP Communities list by resource group GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Communities as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List IpCommunities by subscription. + * List IP Communities by subscription. * - *

Implements IpCommunities list by subscription GET method. + *

Implements IP Communities list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Communities as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List IpCommunities by subscription. + * List IP Communities by subscription. * - *

Implements IpCommunities list by subscription GET method. + *

Implements IP Communities list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IPCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Communities as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -127,7 +127,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition along with {@link Response}. + * @return the IP Community resource definition along with {@link Response}. */ IpCommunity getById(String id); @@ -141,7 +141,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpCommunity resource definition along with {@link Response}. + * @return the IP Community resource definition along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitiesListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitiesListResult.java index d2aab00a32ad8..d32ca48c349dc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitiesListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitiesListResult.java @@ -9,11 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of IPCommunities. */ +/** List of IP Communities. */ @Fluent public final class IpCommunitiesListResult { /* - * List of IpCommunity resources. + * List of IP Community resources. */ @JsonProperty(value = "value") private List value; @@ -29,7 +29,7 @@ public IpCommunitiesListResult() { } /** - * Get the value property: List of IpCommunity resources. + * Get the value property: List of IP Community resources. * * @return the value value. */ @@ -38,7 +38,7 @@ public List value() { } /** - * Set the value property: List of IpCommunity resources. + * Set the value property: List of IP Community resources. * * @param value the value value to set. * @return the IpCommunitiesListResult object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunity.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunity.java index 28e5fc6b54da6..9a9d99de7b6e6 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunity.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunity.java @@ -56,32 +56,32 @@ public interface IpCommunity { SystemData systemData(); /** - * Gets the action property: Action to be taken on the configuration. Example: Permit | Deny. + * Gets the configurationState property: Configuration state of the resource. * - * @return the action value. + * @return the configurationState value. */ - CommunityActionTypes action(); + ConfigurationState configurationState(); /** - * Gets the wellKnownCommunities property: Supported well known Community List. + * Gets the provisioningState property: Provisioning state of the resource. * - * @return the wellKnownCommunities value. + * @return the provisioningState value. */ - List wellKnownCommunities(); + ProvisioningState provisioningState(); /** - * Gets the communityMembers property: List the communityMembers of IP Community . + * Gets the administrativeState property: Administrative state of the resource. * - * @return the communityMembers value. + * @return the administrativeState value. */ - List communityMembers(); + AdministrativeState administrativeState(); /** - * Gets the provisioningState property: Gets the provisioning state of the resource. + * Gets the ipCommunityRules property: List of IP Community Rules. * - * @return the provisioningState value. + * @return the ipCommunityRules value. */ - ProvisioningState provisioningState(); + List ipCommunityRules(); /** * Gets the annotation property: Switch configuration description. @@ -163,11 +163,7 @@ interface WithResourceGroup { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithAction, - DefinitionStages.WithWellKnownCommunities, - DefinitionStages.WithCommunityMembers, - DefinitionStages.WithAnnotation { + extends DefinitionStages.WithTags, DefinitionStages.WithIpCommunityRules, DefinitionStages.WithAnnotation { /** * Executes the create request. * @@ -193,35 +189,15 @@ interface WithTags { */ WithCreate withTags(Map tags); } - /** The stage of the IpCommunity definition allowing to specify action. */ - interface WithAction { - /** - * Specifies the action property: Action to be taken on the configuration. Example: Permit | Deny.. - * - * @param action Action to be taken on the configuration. Example: Permit | Deny. - * @return the next definition stage. - */ - WithCreate withAction(CommunityActionTypes action); - } - /** The stage of the IpCommunity definition allowing to specify wellKnownCommunities. */ - interface WithWellKnownCommunities { + /** The stage of the IpCommunity definition allowing to specify ipCommunityRules. */ + interface WithIpCommunityRules { /** - * Specifies the wellKnownCommunities property: Supported well known Community List.. + * Specifies the ipCommunityRules property: List of IP Community Rules.. * - * @param wellKnownCommunities Supported well known Community List. + * @param ipCommunityRules List of IP Community Rules. * @return the next definition stage. */ - WithCreate withWellKnownCommunities(List wellKnownCommunities); - } - /** The stage of the IpCommunity definition allowing to specify communityMembers. */ - interface WithCommunityMembers { - /** - * Specifies the communityMembers property: List the communityMembers of IP Community .. - * - * @param communityMembers List the communityMembers of IP Community . - * @return the next definition stage. - */ - WithCreate withCommunityMembers(List communityMembers); + WithCreate withIpCommunityRules(List ipCommunityRules); } /** The stage of the IpCommunity definition allowing to specify annotation. */ interface WithAnnotation { @@ -242,7 +218,7 @@ interface WithAnnotation { IpCommunity.Update update(); /** The template for IpCommunity update. */ - interface Update extends UpdateStages.WithTags { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIpCommunityRules { /** * Executes the update request. * @@ -270,6 +246,16 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the IpCommunity update allowing to specify ipCommunityRules. */ + interface WithIpCommunityRules { + /** + * Specifies the ipCommunityRules property: List of IP Community Rules.. + * + * @param ipCommunityRules List of IP Community Rules. + * @return the next definition stage. + */ + Update withIpCommunityRules(List ipCommunityRules); + } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityAddOperationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityAddOperationProperties.java index b1cb9edc72660..121349d380f52 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityAddOperationProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityAddOperationProperties.java @@ -11,7 +11,7 @@ @Fluent public class IpCommunityAddOperationProperties { /* - * IP Community ID list properties. + * List of IP Community IDs. */ @JsonProperty(value = "add") private IpCommunityIdList add; @@ -21,7 +21,7 @@ public IpCommunityAddOperationProperties() { } /** - * Get the add property: IP Community ID list properties. + * Get the add property: List of IP Community IDs. * * @return the add value. */ @@ -30,7 +30,7 @@ public IpCommunityIdList add() { } /** - * Set the add property: IP Community ID list properties. + * Set the add property: List of IP Community IDs. * * @param add the add value to set. * @return the IpCommunityAddOperationProperties object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityDeleteOperationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityDeleteOperationProperties.java index bf3bdd123249e..7c7f13a987763 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityDeleteOperationProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityDeleteOperationProperties.java @@ -11,7 +11,7 @@ @Fluent public class IpCommunityDeleteOperationProperties { /* - * IP Community ID list properties. + * List of IP Community IDs. */ @JsonProperty(value = "delete") private IpCommunityIdList delete; @@ -21,7 +21,7 @@ public IpCommunityDeleteOperationProperties() { } /** - * Get the delete property: IP Community ID list properties. + * Get the delete property: List of IP Community IDs. * * @return the delete value. */ @@ -30,7 +30,7 @@ public IpCommunityIdList delete() { } /** - * Set the delete property: IP Community ID list properties. + * Set the delete property: List of IP Community IDs. * * @param delete the delete value to set. * @return the IpCommunityDeleteOperationProperties object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityPatch.java index da61a769cb810..ed27845c9960c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityPatch.java @@ -5,41 +5,60 @@ package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityPatchableProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; import java.util.Map; -/** The IPCommunity patch resource definition. */ +/** The IP Community patch resource definition. */ @Fluent -public final class IpCommunityPatch { +public final class IpCommunityPatch extends TagsUpdate { /* - * Resource tags + * IP Community patchable properties. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; + @JsonProperty(value = "properties") + private IpCommunityPatchableProperties innerProperties; /** Creates an instance of IpCommunityPatch class. */ public IpCommunityPatch() { } /** - * Get the tags property: Resource tags. + * Get the innerProperties property: IP Community patchable properties. * - * @return the tags value. + * @return the innerProperties value. */ - public Map tags() { - return this.tags; + private IpCommunityPatchableProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public IpCommunityPatch withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the ipCommunityRules property: List of IP Community Rules. + * + * @return the ipCommunityRules value. + */ + public List ipCommunityRules() { + return this.innerProperties() == null ? null : this.innerProperties().ipCommunityRules(); } /** - * Set the tags property: Resource tags. + * Set the ipCommunityRules property: List of IP Community Rules. * - * @param tags the tags value to set. + * @param ipCommunityRules the ipCommunityRules value to set. * @return the IpCommunityPatch object itself. */ - public IpCommunityPatch withTags(Map tags) { - this.tags = tags; + public IpCommunityPatch withIpCommunityRules(List ipCommunityRules) { + if (this.innerProperties() == null) { + this.innerProperties = new IpCommunityPatchableProperties(); + } + this.innerProperties().withIpCommunityRules(ipCommunityRules); return this; } @@ -48,6 +67,11 @@ public IpCommunityPatch withTags(Map tags) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityRule.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityRule.java new file mode 100644 index 0000000000000..235025d6fcada --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunityRule.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** IP Community patchable properties. */ +@Fluent +public final class IpCommunityRule { + /* + * Action to be taken on the configuration. Example: Permit | Deny. + */ + @JsonProperty(value = "action", required = true) + private CommunityActionTypes action; + + /* + * 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. + */ + @JsonProperty(value = "sequenceNumber", required = true) + private long sequenceNumber; + + /* + * Supported well known Community List. + */ + @JsonProperty(value = "wellKnownCommunities") + private List wellKnownCommunities; + + /* + * List the community members of IP Community. + */ + @JsonProperty(value = "communityMembers", required = true) + private List communityMembers; + + /** Creates an instance of IpCommunityRule class. */ + public IpCommunityRule() { + } + + /** + * Get the action property: Action to be taken on the configuration. Example: Permit | Deny. + * + * @return the action value. + */ + public CommunityActionTypes action() { + return this.action; + } + + /** + * Set the action property: Action to be taken on the configuration. Example: Permit | Deny. + * + * @param action the action value to set. + * @return the IpCommunityRule object itself. + */ + public IpCommunityRule withAction(CommunityActionTypes action) { + this.action = action; + return this; + } + + /** + * Get the sequenceNumber property: 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. + * + * @return the sequenceNumber value. + */ + public long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set the sequenceNumber property: 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. + * + * @param sequenceNumber the sequenceNumber value to set. + * @return the IpCommunityRule object itself. + */ + public IpCommunityRule withSequenceNumber(long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get the wellKnownCommunities property: Supported well known Community List. + * + * @return the wellKnownCommunities value. + */ + public List wellKnownCommunities() { + return this.wellKnownCommunities; + } + + /** + * Set the wellKnownCommunities property: Supported well known Community List. + * + * @param wellKnownCommunities the wellKnownCommunities value to set. + * @return the IpCommunityRule object itself. + */ + public IpCommunityRule withWellKnownCommunities(List wellKnownCommunities) { + this.wellKnownCommunities = wellKnownCommunities; + return this; + } + + /** + * Get the communityMembers property: List the community members of IP Community. + * + * @return the communityMembers value. + */ + public List communityMembers() { + return this.communityMembers; + } + + /** + * Set the communityMembers property: List the community members of IP Community. + * + * @param communityMembers the communityMembers value to set. + * @return the IpCommunityRule object itself. + */ + public IpCommunityRule withCommunityMembers(List communityMembers) { + this.communityMembers = communityMembers; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (action() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property action in model IpCommunityRule")); + } + if (communityMembers() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property communityMembers in model IpCommunityRule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IpCommunityRule.class); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitySetOperationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitySetOperationProperties.java index 2946278717817..787e1971cbf51 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitySetOperationProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpCommunitySetOperationProperties.java @@ -11,7 +11,7 @@ @Fluent public class IpCommunitySetOperationProperties { /* - * IP Community ID list properties. + * List of IP Community IDs. */ @JsonProperty(value = "set") private IpCommunityIdList set; @@ -21,7 +21,7 @@ public IpCommunitySetOperationProperties() { } /** - * Get the set property: IP Community ID list properties. + * Get the set property: List of IP Community IDs. * * @return the set value. */ @@ -30,7 +30,7 @@ public IpCommunityIdList set() { } /** - * Set the set property: IP Community ID list properties. + * Set the set property: List of IP Community IDs. * * @param set the set value to set. * @return the IpCommunitySetOperationProperties object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunities.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunities.java index 061b14953bd2f..99327b7706ada 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunities.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunities.java @@ -21,7 +21,7 @@ public interface IpExtendedCommunities { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition along with {@link Response}. + * @return the IP Extended Community resource definition along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String ipExtendedCommunityName, Context context); @@ -36,7 +36,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition. + * @return the IP Extended Community resource definition. */ IpExtendedCommunity getByResourceGroup(String resourceGroupName, String ipExtendedCommunityName); @@ -76,7 +76,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -90,7 +90,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -101,7 +101,7 @@ Response getByResourceGroupWithResponse( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -114,7 +114,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpExtendedCommunities as paginated response with {@link PagedIterable}. + * @return list of IP Extended Communities as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -127,7 +127,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition along with {@link Response}. + * @return the IP Extended Community resource definition along with {@link Response}. */ IpExtendedCommunity getById(String id); @@ -141,7 +141,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IpExtendedCommunity resource definition along with {@link Response}. + * @return the IP Extended Community resource definition along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunity.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunity.java index 573179715ebda..6c0b71c832f81 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunity.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunity.java @@ -56,27 +56,32 @@ public interface IpExtendedCommunity { SystemData systemData(); /** - * Gets the action property: Action to be taken on the configuration. Example: Permit | Deny. + * Gets the configurationState property: Configuration state of the resource. * - * @return the action value. + * @return the configurationState value. */ - CommunityActionTypes action(); + ConfigurationState configurationState(); /** - * Gets the routeTargets property: 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 provisioningState property: Provisioning state of the resource. * - * @return the routeTargets value. + * @return the provisioningState value. */ - List routeTargets(); + ProvisioningState provisioningState(); /** - * Gets the provisioningState property: Gets the provisioning state of the resource. + * Gets the administrativeState property: Administrative state of the resource. * - * @return the provisioningState value. + * @return the administrativeState value. */ - ProvisioningState provisioningState(); + AdministrativeState administrativeState(); + + /** + * Gets the ipExtendedCommunityRules property: List of IP Extended Community Rules. + * + * @return the ipExtendedCommunityRules value. + */ + List ipExtendedCommunityRules(); /** * Gets the annotation property: Switch configuration description. @@ -118,6 +123,7 @@ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, + DefinitionStages.WithIpExtendedCommunityRules, DefinitionStages.WithCreate { } /** The IpExtendedCommunity definition stages. */ @@ -151,17 +157,23 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithIpExtendedCommunityRules withExistingResourceGroup(String resourceGroupName); + } + /** The stage of the IpExtendedCommunity definition allowing to specify ipExtendedCommunityRules. */ + interface WithIpExtendedCommunityRules { + /** + * Specifies the ipExtendedCommunityRules property: List of IP Extended Community Rules.. + * + * @param ipExtendedCommunityRules List of IP Extended Community Rules. + * @return the next definition stage. + */ + WithCreate withIpExtendedCommunityRules(List ipExtendedCommunityRules); } /** * The stage of the IpExtendedCommunity definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithAction, - DefinitionStages.WithRouteTargets, - DefinitionStages.WithAnnotation { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithAnnotation { /** * Executes the create request. * @@ -187,32 +199,6 @@ interface WithTags { */ WithCreate withTags(Map tags); } - /** The stage of the IpExtendedCommunity definition allowing to specify action. */ - interface WithAction { - /** - * Specifies the action property: Action to be taken on the configuration. Example: Permit | Deny.. - * - * @param action Action to be taken on the configuration. Example: Permit | Deny. - * @return the next definition stage. - */ - WithCreate withAction(CommunityActionTypes action); - } - /** The stage of the IpExtendedCommunity definition allowing to specify routeTargets. */ - interface WithRouteTargets { - /** - * Specifies the routeTargets property: 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.. - * - * @param routeTargets 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. - * @return the next definition stage. - */ - WithCreate withRouteTargets(List routeTargets); - } /** The stage of the IpExtendedCommunity definition allowing to specify annotation. */ interface WithAnnotation { /** @@ -232,7 +218,8 @@ interface WithAnnotation { IpExtendedCommunity.Update update(); /** The template for IpExtendedCommunity update. */ - interface Update extends UpdateStages.WithTags { + interface Update + extends UpdateStages.WithTags, UpdateStages.WithAnnotation, UpdateStages.WithIpExtendedCommunityRules { /** * Executes the update request. * @@ -260,6 +247,26 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the IpExtendedCommunity update allowing to specify annotation. */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + Update withAnnotation(String annotation); + } + /** The stage of the IpExtendedCommunity update allowing to specify ipExtendedCommunityRules. */ + interface WithIpExtendedCommunityRules { + /** + * Specifies the ipExtendedCommunityRules property: List of IP Extended Community Rules.. + * + * @param ipExtendedCommunityRules List of IP Extended Community Rules. + * @return the next definition stage. + */ + Update withIpExtendedCommunityRules(List ipExtendedCommunityRules); + } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityAddOperationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityAddOperationProperties.java index 3c173546ed330..4bd025e3c153b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityAddOperationProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityAddOperationProperties.java @@ -11,7 +11,7 @@ @Fluent public class IpExtendedCommunityAddOperationProperties { /* - * IP Extended Community Id list properties. + * List of IP Extended Community IDs. */ @JsonProperty(value = "add") private IpExtendedCommunityIdList add; @@ -21,7 +21,7 @@ public IpExtendedCommunityAddOperationProperties() { } /** - * Get the add property: IP Extended Community Id list properties. + * Get the add property: List of IP Extended Community IDs. * * @return the add value. */ @@ -30,7 +30,7 @@ public IpExtendedCommunityIdList add() { } /** - * Set the add property: IP Extended Community Id list properties. + * Set the add property: List of IP Extended Community IDs. * * @param add the add value to set. * @return the IpExtendedCommunityAddOperationProperties object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityDeleteOperationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityDeleteOperationProperties.java index f01b1c7846a43..c1f2f56d00fbd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityDeleteOperationProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityDeleteOperationProperties.java @@ -11,7 +11,7 @@ @Fluent public class IpExtendedCommunityDeleteOperationProperties { /* - * IP Extended Community Id list properties. + * List of IP Extended Community IDs. */ @JsonProperty(value = "delete") private IpExtendedCommunityIdList delete; @@ -21,7 +21,7 @@ public IpExtendedCommunityDeleteOperationProperties() { } /** - * Get the delete property: IP Extended Community Id list properties. + * Get the delete property: List of IP Extended Community IDs. * * @return the delete value. */ @@ -30,7 +30,7 @@ public IpExtendedCommunityIdList delete() { } /** - * Set the delete property: IP Extended Community Id list properties. + * Set the delete property: List of IP Extended Community IDs. * * @param delete the delete value to set. * @return the IpExtendedCommunityDeleteOperationProperties object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityListResult.java index 8c60441eac1ee..85ab45166a625 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityListResult.java @@ -9,11 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of IpExtendedCommunities. */ +/** List of IP Extended Communities. */ @Fluent public final class IpExtendedCommunityListResult { /* - * List of IpExtendedCommunities resources. + * List of IP Extended Communities resources. */ @JsonProperty(value = "value") private List value; @@ -29,7 +29,7 @@ public IpExtendedCommunityListResult() { } /** - * Get the value property: List of IpExtendedCommunities resources. + * Get the value property: List of IP Extended Communities resources. * * @return the value value. */ @@ -38,7 +38,7 @@ public List value() { } /** - * Set the value property: List of IpExtendedCommunities resources. + * Set the value property: List of IP Extended Communities resources. * * @param value the value value to set. * @return the IpExtendedCommunityListResult object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatch.java index 6b5faccd471dd..e6aa10f4f6fc0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatch.java @@ -5,41 +5,84 @@ package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpExtendedCommunityPatchProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; import java.util.Map; -/** The IpExtendedCommunities patch resource definition. */ +/** The IP Extended Communities patch resource definition. */ @Fluent -public final class IpExtendedCommunityPatch { +public final class IpExtendedCommunityPatch extends TagsUpdate { /* - * Resource tags + * IP Extended Community patchable properties. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; + @JsonProperty(value = "properties") + private IpExtendedCommunityPatchProperties innerProperties; /** Creates an instance of IpExtendedCommunityPatch class. */ public IpExtendedCommunityPatch() { } /** - * Get the tags property: Resource tags. + * Get the innerProperties property: IP Extended Community patchable properties. * - * @return the tags value. + * @return the innerProperties value. */ - public Map tags() { - return this.tags; + private IpExtendedCommunityPatchProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public IpExtendedCommunityPatch withTags(Map tags) { + super.withTags(tags); + return this; } /** - * Set the tags property: Resource tags. + * Get the annotation property: Switch configuration description. * - * @param tags the tags value to set. + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. * @return the IpExtendedCommunityPatch object itself. */ - public IpExtendedCommunityPatch withTags(Map tags) { - this.tags = tags; + public IpExtendedCommunityPatch withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new IpExtendedCommunityPatchProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * Get the ipExtendedCommunityRules property: List of IP Extended Community Rules. + * + * @return the ipExtendedCommunityRules value. + */ + public List ipExtendedCommunityRules() { + return this.innerProperties() == null ? null : this.innerProperties().ipExtendedCommunityRules(); + } + + /** + * Set the ipExtendedCommunityRules property: List of IP Extended Community Rules. + * + * @param ipExtendedCommunityRules the ipExtendedCommunityRules value to set. + * @return the IpExtendedCommunityPatch object itself. + */ + public IpExtendedCommunityPatch withIpExtendedCommunityRules( + List ipExtendedCommunityRules) { + if (this.innerProperties() == null) { + this.innerProperties = new IpExtendedCommunityPatchProperties(); + } + this.innerProperties().withIpExtendedCommunityRules(ipExtendedCommunityRules); return this; } @@ -48,6 +91,11 @@ public IpExtendedCommunityPatch withTags(Map tags) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatchableProperties.java new file mode 100644 index 0000000000000..43edc372a04d7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityPatchableProperties.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** IP Extended Community patchable properties. */ +@Fluent +public class IpExtendedCommunityPatchableProperties { + /* + * List of IP Extended Community Rules. + */ + @JsonProperty(value = "ipExtendedCommunityRules", required = true) + private List ipExtendedCommunityRules; + + /** Creates an instance of IpExtendedCommunityPatchableProperties class. */ + public IpExtendedCommunityPatchableProperties() { + } + + /** + * Get the ipExtendedCommunityRules property: List of IP Extended Community Rules. + * + * @return the ipExtendedCommunityRules value. + */ + public List ipExtendedCommunityRules() { + return this.ipExtendedCommunityRules; + } + + /** + * Set the ipExtendedCommunityRules property: List of IP Extended Community Rules. + * + * @param ipExtendedCommunityRules the ipExtendedCommunityRules value to set. + * @return the IpExtendedCommunityPatchableProperties object itself. + */ + public IpExtendedCommunityPatchableProperties withIpExtendedCommunityRules( + List ipExtendedCommunityRules) { + this.ipExtendedCommunityRules = ipExtendedCommunityRules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ipExtendedCommunityRules() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property ipExtendedCommunityRules in model" + + " IpExtendedCommunityPatchableProperties")); + } else { + ipExtendedCommunityRules().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IpExtendedCommunityPatchableProperties.class); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityRule.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityRule.java new file mode 100644 index 0000000000000..6cf01644acb0e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunityRule.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of IP Extended Community Rules. */ +@Fluent +public final class IpExtendedCommunityRule { + /* + * Action to be taken on the configuration. Example: Permit | Deny. + */ + @JsonProperty(value = "action", required = true) + private CommunityActionTypes action; + + /* + * 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. + */ + @JsonProperty(value = "sequenceNumber", required = true) + private long sequenceNumber; + + /* + * 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. + */ + @JsonProperty(value = "routeTargets", required = true) + private List routeTargets; + + /** Creates an instance of IpExtendedCommunityRule class. */ + public IpExtendedCommunityRule() { + } + + /** + * Get the action property: Action to be taken on the configuration. Example: Permit | Deny. + * + * @return the action value. + */ + public CommunityActionTypes action() { + return this.action; + } + + /** + * Set the action property: Action to be taken on the configuration. Example: Permit | Deny. + * + * @param action the action value to set. + * @return the IpExtendedCommunityRule object itself. + */ + public IpExtendedCommunityRule withAction(CommunityActionTypes action) { + this.action = action; + return this; + } + + /** + * Get the sequenceNumber property: 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. + * + * @return the sequenceNumber value. + */ + public long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set the sequenceNumber property: 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. + * + * @param sequenceNumber the sequenceNumber value to set. + * @return the IpExtendedCommunityRule object itself. + */ + public IpExtendedCommunityRule withSequenceNumber(long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get the routeTargets property: 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. + * + * @return the routeTargets value. + */ + public List routeTargets() { + return this.routeTargets; + } + + /** + * Set the routeTargets property: 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. + * + * @param routeTargets the routeTargets value to set. + * @return the IpExtendedCommunityRule object itself. + */ + public IpExtendedCommunityRule withRouteTargets(List routeTargets) { + this.routeTargets = routeTargets; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (action() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property action in model IpExtendedCommunityRule")); + } + if (routeTargets() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property routeTargets in model IpExtendedCommunityRule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IpExtendedCommunityRule.class); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunitySetOperationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunitySetOperationProperties.java index 8440fde7301b5..532a690c5509e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunitySetOperationProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpExtendedCommunitySetOperationProperties.java @@ -11,7 +11,7 @@ @Fluent public class IpExtendedCommunitySetOperationProperties { /* - * IP Extended Community Id list properties. + * List of IP Extended Community IDs. */ @JsonProperty(value = "set") private IpExtendedCommunityIdList set; @@ -21,7 +21,7 @@ public IpExtendedCommunitySetOperationProperties() { } /** - * Get the set property: IP Extended Community Id list properties. + * Get the set property: List of IP Extended Community IDs. * * @return the set value. */ @@ -30,7 +30,7 @@ public IpExtendedCommunityIdList set() { } /** - * Set the set property: IP Extended Community Id list properties. + * Set the set property: List of IP Extended Community IDs. * * @param set the set value to set. * @return the IpExtendedCommunitySetOperationProperties object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupProperties.java new file mode 100644 index 0000000000000..f88777ce4b179 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpGroupProperties.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** IP Group properties. */ +@Fluent +public final class IpGroupProperties { + /* + * IP Group name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * IP Address type. + */ + @JsonProperty(value = "ipAddressType") + private IpAddressType ipAddressType; + + /* + * List of IP Prefixes. + */ + @JsonProperty(value = "ipPrefixes") + private List ipPrefixes; + + /** Creates an instance of IpGroupProperties class. */ + public IpGroupProperties() { + } + + /** + * Get the name property: IP Group name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: IP Group name. + * + * @param name the name value to set. + * @return the IpGroupProperties object itself. + */ + public IpGroupProperties withName(String name) { + this.name = name; + return this; + } + + /** + * Get the ipAddressType property: IP Address type. + * + * @return the ipAddressType value. + */ + public IpAddressType ipAddressType() { + return this.ipAddressType; + } + + /** + * Set the ipAddressType property: IP Address type. + * + * @param ipAddressType the ipAddressType value to set. + * @return the IpGroupProperties object itself. + */ + public IpGroupProperties withIpAddressType(IpAddressType ipAddressType) { + this.ipAddressType = ipAddressType; + return this; + } + + /** + * Get the ipPrefixes property: List of IP Prefixes. + * + * @return the ipPrefixes value. + */ + public List ipPrefixes() { + return this.ipPrefixes; + } + + /** + * Set the ipPrefixes property: List of IP Prefixes. + * + * @param ipPrefixes the ipPrefixes value to set. + * @return the IpGroupProperties object itself. + */ + public IpGroupProperties withIpPrefixes(List ipPrefixes) { + this.ipPrefixes = ipPrefixes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchCondition.java new file mode 100644 index 0000000000000..62e570856d54a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpMatchCondition.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Defines the condition that can be filtered using the selected IPs. */ +@Fluent +public final class IpMatchCondition { + /* + * IP Address type. + */ + @JsonProperty(value = "type") + private SourceDestinationType type; + + /* + * IP Prefix Type. + */ + @JsonProperty(value = "prefixType") + private PrefixType prefixType; + + /* + * The list of IP Prefixes. + */ + @JsonProperty(value = "ipPrefixValues") + private List ipPrefixValues; + + /* + * The List of IP Group Names that need to be matched. + */ + @JsonProperty(value = "ipGroupNames") + private List ipGroupNames; + + /** Creates an instance of IpMatchCondition class. */ + public IpMatchCondition() { + } + + /** + * Get the type property: IP Address type. + * + * @return the type value. + */ + public SourceDestinationType type() { + return this.type; + } + + /** + * Set the type property: IP Address type. + * + * @param type the type value to set. + * @return the IpMatchCondition object itself. + */ + public IpMatchCondition withType(SourceDestinationType type) { + this.type = type; + return this; + } + + /** + * Get the prefixType property: IP Prefix Type. + * + * @return the prefixType value. + */ + public PrefixType prefixType() { + return this.prefixType; + } + + /** + * Set the prefixType property: IP Prefix Type. + * + * @param prefixType the prefixType value to set. + * @return the IpMatchCondition object itself. + */ + public IpMatchCondition withPrefixType(PrefixType prefixType) { + this.prefixType = prefixType; + return this; + } + + /** + * Get the ipPrefixValues property: The list of IP Prefixes. + * + * @return the ipPrefixValues value. + */ + public List ipPrefixValues() { + return this.ipPrefixValues; + } + + /** + * Set the ipPrefixValues property: The list of IP Prefixes. + * + * @param ipPrefixValues the ipPrefixValues value to set. + * @return the IpMatchCondition object itself. + */ + public IpMatchCondition withIpPrefixValues(List ipPrefixValues) { + this.ipPrefixValues = ipPrefixValues; + return this; + } + + /** + * Get the ipGroupNames property: The List of IP Group Names that need to be matched. + * + * @return the ipGroupNames value. + */ + public List ipGroupNames() { + return this.ipGroupNames; + } + + /** + * Set the ipGroupNames property: The List of IP Group Names that need to be matched. + * + * @param ipGroupNames the ipGroupNames value to set. + * @return the IpMatchCondition object itself. + */ + public IpMatchCondition withIpGroupNames(List ipGroupNames) { + this.ipGroupNames = ipGroupNames; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefix.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefix.java index 9fcdf8903929b..7fc9315a582e9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefix.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefix.java @@ -56,19 +56,33 @@ public interface IpPrefix { SystemData systemData(); /** - * Gets the ipPrefixRules property: IpPrefix contains the list of IP PrefixRules objects. + * Gets the configurationState property: Configuration state of the resource. * - * @return the ipPrefixRules value. + * @return the configurationState value. */ - List ipPrefixRules(); + ConfigurationState configurationState(); /** - * Gets the provisioningState property: Gets the provisioning state of the resource. + * Gets the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ ProvisioningState provisioningState(); + /** + * Gets the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + AdministrativeState administrativeState(); + + /** + * Gets the ipPrefixRules property: The list of IP Prefix Rules. + * + * @return the ipPrefixRules value. + */ + List ipPrefixRules(); + /** * Gets the annotation property: Switch configuration description. * @@ -109,7 +123,6 @@ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, - DefinitionStages.WithIpPrefixRules, DefinitionStages.WithCreate { } /** The IpPrefix definition stages. */ @@ -143,23 +156,14 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithIpPrefixRules withExistingResourceGroup(String resourceGroupName); - } - /** The stage of the IpPrefix definition allowing to specify ipPrefixRules. */ - interface WithIpPrefixRules { - /** - * Specifies the ipPrefixRules property: IpPrefix contains the list of IP PrefixRules objects.. - * - * @param ipPrefixRules IpPrefix contains the list of IP PrefixRules objects. - * @return the next definition stage. - */ - WithCreate withIpPrefixRules(List ipPrefixRules); + WithCreate withExistingResourceGroup(String resourceGroupName); } /** * The stage of the IpPrefix definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithAnnotation { + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithIpPrefixRules, DefinitionStages.WithAnnotation { /** * Executes the create request. * @@ -185,6 +189,16 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the IpPrefix definition allowing to specify ipPrefixRules. */ + interface WithIpPrefixRules { + /** + * Specifies the ipPrefixRules property: The list of IP Prefix Rules.. + * + * @param ipPrefixRules The list of IP Prefix Rules. + * @return the next definition stage. + */ + WithCreate withIpPrefixRules(List ipPrefixRules); + } /** The stage of the IpPrefix definition allowing to specify annotation. */ interface WithAnnotation { /** @@ -204,7 +218,7 @@ interface WithAnnotation { IpPrefix.Update update(); /** The template for IpPrefix update. */ - interface Update extends UpdateStages.WithTags { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIpPrefixRules, UpdateStages.WithAnnotation { /** * Executes the update request. * @@ -232,6 +246,26 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the IpPrefix update allowing to specify ipPrefixRules. */ + interface WithIpPrefixRules { + /** + * Specifies the ipPrefixRules property: The list of IP Prefix Rules.. + * + * @param ipPrefixRules The list of IP Prefix Rules. + * @return the next definition stage. + */ + Update withIpPrefixRules(List ipPrefixRules); + } + /** The stage of the IpPrefix update allowing to specify annotation. */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + Update withAnnotation(String annotation); + } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatch.java index ab8744631f5ef..643588c84c38f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatch.java @@ -5,41 +5,83 @@ package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixPatchProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; import java.util.Map; -/** The IPPrefix patch resource definition. */ +/** The IP Prefix patch resource definition. */ @Fluent -public final class IpPrefixPatch { +public final class IpPrefixPatch extends TagsUpdate { /* - * Resource tags + * IP Prefix patchable properties. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; + @JsonProperty(value = "properties") + private IpPrefixPatchProperties innerProperties; /** Creates an instance of IpPrefixPatch class. */ public IpPrefixPatch() { } /** - * Get the tags property: Resource tags. + * Get the innerProperties property: IP Prefix patchable properties. * - * @return the tags value. + * @return the innerProperties value. */ - public Map tags() { - return this.tags; + private IpPrefixPatchProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public IpPrefixPatch withTags(Map tags) { + super.withTags(tags); + return this; } /** - * Set the tags property: Resource tags. + * Get the ipPrefixRules property: The list of IP Prefix Rules. * - * @param tags the tags value to set. + * @return the ipPrefixRules value. + */ + public List ipPrefixRules() { + return this.innerProperties() == null ? null : this.innerProperties().ipPrefixRules(); + } + + /** + * Set the ipPrefixRules property: The list of IP Prefix Rules. + * + * @param ipPrefixRules the ipPrefixRules value to set. * @return the IpPrefixPatch object itself. */ - public IpPrefixPatch withTags(Map tags) { - this.tags = tags; + public IpPrefixPatch withIpPrefixRules(List ipPrefixRules) { + if (this.innerProperties() == null) { + this.innerProperties = new IpPrefixPatchProperties(); + } + this.innerProperties().withIpPrefixRules(ipPrefixRules); + return this; + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the IpPrefixPatch object itself. + */ + public IpPrefixPatch withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new IpPrefixPatchProperties(); + } + this.innerProperties().withAnnotation(annotation); return this; } @@ -48,6 +90,11 @@ public IpPrefixPatch withTags(Map tags) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatchableProperties.java new file mode 100644 index 0000000000000..f5ecb8f5498a7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPatchableProperties.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** IP Prefix patchable properties. */ +@Fluent +public class IpPrefixPatchableProperties { + /* + * The list of IP Prefix Rules. + */ + @JsonProperty(value = "ipPrefixRules") + private List ipPrefixRules; + + /** Creates an instance of IpPrefixPatchableProperties class. */ + public IpPrefixPatchableProperties() { + } + + /** + * Get the ipPrefixRules property: The list of IP Prefix Rules. + * + * @return the ipPrefixRules value. + */ + public List ipPrefixRules() { + return this.ipPrefixRules; + } + + /** + * Set the ipPrefixRules property: The list of IP Prefix Rules. + * + * @param ipPrefixRules the ipPrefixRules value to set. + * @return the IpPrefixPatchableProperties object itself. + */ + public IpPrefixPatchableProperties withIpPrefixRules(List ipPrefixRules) { + this.ipPrefixRules = ipPrefixRules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ipPrefixRules() != null) { + ipPrefixRules().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPropertiesIpPrefixRulesItem.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixRule.java similarity index 72% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPropertiesIpPrefixRulesItem.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixRule.java index 1d90b9ccc44b0..174797b6c75f9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixPropertiesIpPrefixRulesItem.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixRule.java @@ -8,9 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The IpPrefixPropertiesIpPrefixRulesItem model. */ +/** IP Prefix Rule properties. */ @Fluent -public final class IpPrefixPropertiesIpPrefixRulesItem { +public final class IpPrefixRule { /* * Action to be taken on the configuration. Example: Permit | Deny. */ @@ -39,14 +39,14 @@ public final class IpPrefixPropertiesIpPrefixRulesItem { private Condition condition; /* - * SubnetMaskLength gives the minimum NetworkPrefix length to be matched.Possible values for IPv4 are 1 - 32. + * SubnetMaskLength gives the minimum NetworkPrefix length to be matched. Possible values for IPv4 are 1 - 32 . * Possible values of IPv6 are 1 - 128. */ @JsonProperty(value = "subnetMaskLength") - private Integer subnetMaskLength; + private String subnetMaskLength; - /** Creates an instance of IpPrefixPropertiesIpPrefixRulesItem class. */ - public IpPrefixPropertiesIpPrefixRulesItem() { + /** Creates an instance of IpPrefixRule class. */ + public IpPrefixRule() { } /** @@ -62,9 +62,9 @@ public CommunityActionTypes action() { * Set the action property: Action to be taken on the configuration. Example: Permit | Deny. * * @param action the action value to set. - * @return the IpPrefixPropertiesIpPrefixRulesItem object itself. + * @return the IpPrefixRule object itself. */ - public IpPrefixPropertiesIpPrefixRulesItem withAction(CommunityActionTypes action) { + public IpPrefixRule withAction(CommunityActionTypes action) { this.action = action; return this; } @@ -86,9 +86,9 @@ public long sequenceNumber() { * the permit or deny statement is applied to that network and the rest of the list is ignored. * * @param sequenceNumber the sequenceNumber value to set. - * @return the IpPrefixPropertiesIpPrefixRulesItem object itself. + * @return the IpPrefixRule object itself. */ - public IpPrefixPropertiesIpPrefixRulesItem withSequenceNumber(long sequenceNumber) { + public IpPrefixRule withSequenceNumber(long sequenceNumber) { this.sequenceNumber = sequenceNumber; return this; } @@ -108,9 +108,9 @@ public String networkPrefix() { * 1.1.1.0/24 | 3FFE:FFFF:0:CD30::/126. * * @param networkPrefix the networkPrefix value to set. - * @return the IpPrefixPropertiesIpPrefixRulesItem object itself. + * @return the IpPrefixRule object itself. */ - public IpPrefixPropertiesIpPrefixRulesItem withNetworkPrefix(String networkPrefix) { + public IpPrefixRule withNetworkPrefix(String networkPrefix) { this.networkPrefix = networkPrefix; return this; } @@ -128,31 +128,31 @@ public Condition condition() { * Set the condition property: Specify prefix-list bounds. * * @param condition the condition value to set. - * @return the IpPrefixPropertiesIpPrefixRulesItem object itself. + * @return the IpPrefixRule object itself. */ - public IpPrefixPropertiesIpPrefixRulesItem withCondition(Condition condition) { + public IpPrefixRule withCondition(Condition condition) { this.condition = condition; return this; } /** - * Get the subnetMaskLength property: SubnetMaskLength gives the minimum NetworkPrefix length to be matched.Possible - * values for IPv4 are 1 - 32. Possible values of IPv6 are 1 - 128. + * Get the subnetMaskLength property: SubnetMaskLength gives the minimum NetworkPrefix length to be matched. + * Possible values for IPv4 are 1 - 32 . Possible values of IPv6 are 1 - 128. * * @return the subnetMaskLength value. */ - public Integer subnetMaskLength() { + public String subnetMaskLength() { return this.subnetMaskLength; } /** - * Set the subnetMaskLength property: SubnetMaskLength gives the minimum NetworkPrefix length to be matched.Possible - * values for IPv4 are 1 - 32. Possible values of IPv6 are 1 - 128. + * Set the subnetMaskLength property: SubnetMaskLength gives the minimum NetworkPrefix length to be matched. + * Possible values for IPv4 are 1 - 32 . Possible values of IPv6 are 1 - 128. * * @param subnetMaskLength the subnetMaskLength value to set. - * @return the IpPrefixPropertiesIpPrefixRulesItem object itself. + * @return the IpPrefixRule object itself. */ - public IpPrefixPropertiesIpPrefixRulesItem withSubnetMaskLength(Integer subnetMaskLength) { + public IpPrefixRule withSubnetMaskLength(String subnetMaskLength) { this.subnetMaskLength = subnetMaskLength; return this; } @@ -166,16 +166,14 @@ public void validate() { if (action() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException( - "Missing required property action in model IpPrefixPropertiesIpPrefixRulesItem")); + new IllegalArgumentException("Missing required property action in model IpPrefixRule")); } if (networkPrefix() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException( - "Missing required property networkPrefix in model IpPrefixPropertiesIpPrefixRulesItem")); + new IllegalArgumentException("Missing required property networkPrefix in model IpPrefixRule")); } } - private static final ClientLogger LOGGER = new ClientLogger(IpPrefixPropertiesIpPrefixRulesItem.class); + private static final ClientLogger LOGGER = new ClientLogger(IpPrefixRule.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixes.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixes.java index c2ffe3ce88be4..0185403477a93 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixes.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixes.java @@ -21,7 +21,7 @@ public interface IpPrefixes { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition along with {@link Response}. + * @return the IP Prefix resource definition along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String ipPrefixName, Context context); @@ -35,7 +35,7 @@ public interface IpPrefixes { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition. + * @return the IP Prefix resource definition. */ IpPrefix getByResourceGroup(String resourceGroupName, String ipPrefixName); @@ -75,7 +75,7 @@ public interface IpPrefixes { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes as paginated response with {@link PagedIterable}. + * @return list of IP Prefixes as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -89,7 +89,7 @@ public interface IpPrefixes { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes as paginated response with {@link PagedIterable}. + * @return list of IP Prefixes as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -100,7 +100,7 @@ public interface IpPrefixes { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes as paginated response with {@link PagedIterable}. + * @return list of IP Prefixes as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -113,7 +113,7 @@ public interface IpPrefixes { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of IpPrefixes as paginated response with {@link PagedIterable}. + * @return list of IP Prefixes as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -126,7 +126,7 @@ public interface IpPrefixes { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition along with {@link Response}. + * @return the IP Prefix resource definition along with {@link Response}. */ IpPrefix getById(String id); @@ -140,7 +140,7 @@ public interface IpPrefixes { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IPPrefix resource definition along with {@link Response}. + * @return the IP Prefix resource definition along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixesListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixesListResult.java index b0ce880b8a338..a72bcafebe5ea 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixesListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IpPrefixesListResult.java @@ -9,11 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of IpPrefixes. */ +/** List of IP Prefixes. */ @Fluent public final class IpPrefixesListResult { /* - * List of IPPrefix resources. + * List of IP Prefix resources. */ @JsonProperty(value = "value") private List value; @@ -29,7 +29,7 @@ public IpPrefixesListResult() { } /** - * Get the value property: List of IPPrefix resources. + * Get the value property: List of IP Prefix resources. * * @return the value value. */ @@ -38,7 +38,7 @@ public List value() { } /** - * Set the value property: List of IPPrefix resources. + * Set the value property: List of IP Prefix resources. * * @param value the value value to set. * @return the IpPrefixesListResult object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsCurrentVersion.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsCurrentVersion.java deleted file mode 100644 index 091b354a5d6c8..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsCurrentVersion.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** If the current version is in use. */ -public final class IsCurrentVersion extends ExpandableStringEnum { - /** Static value true for IsCurrentVersion. */ - public static final IsCurrentVersion TRUE = fromString("true"); - - /** Static value false for IsCurrentVersion. */ - public static final IsCurrentVersion FALSE = fromString("false"); - - /** - * Creates a new instance of IsCurrentVersion value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IsCurrentVersion() { - } - - /** - * Creates or finds a IsCurrentVersion from its string representation. - * - * @param name a name to look for. - * @return the corresponding IsCurrentVersion. - */ - @JsonCreator - public static IsCurrentVersion fromString(String name) { - return fromString(name, IsCurrentVersion.class); - } - - /** - * Gets known IsCurrentVersion values. - * - * @return known IsCurrentVersion values. - */ - public static Collection values() { - return values(IsCurrentVersion.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsManagementType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsManagementType.java new file mode 100644 index 0000000000000..10ec1af4371eb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsManagementType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Configuration to use NNI for Infrastructure Management. Example: True/False. */ +public final class IsManagementType extends ExpandableStringEnum { + /** Static value True for IsManagementType. */ + public static final IsManagementType TRUE = fromString("True"); + + /** Static value False for IsManagementType. */ + public static final IsManagementType FALSE = fromString("False"); + + /** + * Creates a new instance of IsManagementType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IsManagementType() { + } + + /** + * Creates or finds a IsManagementType from its string representation. + * + * @param name a name to look for. + * @return the corresponding IsManagementType. + */ + @JsonCreator + public static IsManagementType fromString(String name) { + return fromString(name, IsManagementType.class); + } + + /** + * Gets known IsManagementType values. + * + * @return known IsManagementType values. + */ + public static Collection values() { + return values(IsManagementType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsMonitoringEnabled.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsMonitoringEnabled.java new file mode 100644 index 0000000000000..74d422b05dbba --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsMonitoringEnabled.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** To check whether monitoring of internal network is enabled or not. */ +public final class IsMonitoringEnabled extends ExpandableStringEnum { + /** Static value True for IsMonitoringEnabled. */ + public static final IsMonitoringEnabled TRUE = fromString("True"); + + /** Static value False for IsMonitoringEnabled. */ + public static final IsMonitoringEnabled FALSE = fromString("False"); + + /** + * Creates a new instance of IsMonitoringEnabled value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IsMonitoringEnabled() { + } + + /** + * Creates or finds a IsMonitoringEnabled from its string representation. + * + * @param name a name to look for. + * @return the corresponding IsMonitoringEnabled. + */ + @JsonCreator + public static IsMonitoringEnabled fromString(String name) { + return fromString(name, IsMonitoringEnabled.class); + } + + /** + * Gets known IsMonitoringEnabled values. + * + * @return known IsMonitoringEnabled values. + */ + public static Collection values() { + return values(IsMonitoringEnabled.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsTestVersion.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsTestVersion.java deleted file mode 100644 index d6f3b6865f35b..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsTestVersion.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** If the current version is a test version. */ -public final class IsTestVersion extends ExpandableStringEnum { - /** Static value true for IsTestVersion. */ - public static final IsTestVersion TRUE = fromString("true"); - - /** Static value false for IsTestVersion. */ - public static final IsTestVersion FALSE = fromString("false"); - - /** - * Creates a new instance of IsTestVersion value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IsTestVersion() { - } - - /** - * Creates or finds a IsTestVersion from its string representation. - * - * @param name a name to look for. - * @return the corresponding IsTestVersion. - */ - @JsonCreator - public static IsTestVersion fromString(String name) { - return fromString(name, IsTestVersion.class); - } - - /** - * Gets known IsTestVersion values. - * - * @return known IsTestVersion values. - */ - public static Collection values() { - return values(IsTestVersion.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsWorkloadManagementNetworkEnabled.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsWorkloadManagementNetworkEnabled.java new file mode 100644 index 0000000000000..0b74c57630bb2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsWorkloadManagementNetworkEnabled.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * 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 final class IsWorkloadManagementNetworkEnabled extends ExpandableStringEnum { + /** Static value True for IsWorkloadManagementNetworkEnabled. */ + public static final IsWorkloadManagementNetworkEnabled TRUE = fromString("True"); + + /** Static value False for IsWorkloadManagementNetworkEnabled. */ + public static final IsWorkloadManagementNetworkEnabled FALSE = fromString("False"); + + /** + * Creates a new instance of IsWorkloadManagementNetworkEnabled value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IsWorkloadManagementNetworkEnabled() { + } + + /** + * Creates or finds a IsWorkloadManagementNetworkEnabled from its string representation. + * + * @param name a name to look for. + * @return the corresponding IsWorkloadManagementNetworkEnabled. + */ + @JsonCreator + public static IsWorkloadManagementNetworkEnabled fromString(String name) { + return fromString(name, IsWorkloadManagementNetworkEnabled.class); + } + + /** + * Gets known IsWorkloadManagementNetworkEnabled values. + * + * @return known IsWorkloadManagementNetworkEnabled values. + */ + public static Collection values() { + return values(IsWorkloadManagementNetworkEnabled.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainProperties.java new file mode 100644 index 0000000000000..e9ff7c556c0e3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/IsolationDomainProperties.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Isolation Domain Properties. */ +@Fluent +public final class IsolationDomainProperties { + /* + * Type of encapsulation. + */ + @JsonProperty(value = "encapsulation") + private Encapsulation encapsulation; + + /* + * List of Neighbor Group IDs. + */ + @JsonProperty(value = "neighborGroupIds") + private List neighborGroupIds; + + /** Creates an instance of IsolationDomainProperties class. */ + public IsolationDomainProperties() { + } + + /** + * Get the encapsulation property: Type of encapsulation. + * + * @return the encapsulation value. + */ + public Encapsulation encapsulation() { + return this.encapsulation; + } + + /** + * Set the encapsulation property: Type of encapsulation. + * + * @param encapsulation the encapsulation value to set. + * @return the IsolationDomainProperties object itself. + */ + public IsolationDomainProperties withEncapsulation(Encapsulation encapsulation) { + this.encapsulation = encapsulation; + return this; + } + + /** + * Get the neighborGroupIds property: List of Neighbor Group IDs. + * + * @return the neighborGroupIds value. + */ + public List neighborGroupIds() { + return this.neighborGroupIds; + } + + /** + * Set the neighborGroupIds property: List of Neighbor Group IDs. + * + * @param neighborGroupIds the neighborGroupIds value to set. + * @return the IsolationDomainProperties object itself. + */ + public IsolationDomainProperties withNeighborGroupIds(List neighborGroupIds) { + this.neighborGroupIds = neighborGroupIds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomain.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomain.java index 542cba752b940..f248a1ff4230a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomain.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomain.java @@ -8,7 +8,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner; -import java.util.List; import java.util.Map; /** An immutable client-side representation of L2IsolationDomain. */ @@ -56,49 +55,46 @@ public interface L2IsolationDomain { SystemData systemData(); /** - * Gets the networkFabricId property: Network Fabric ARM resource id. + * Gets the networkFabricId property: ARM Resource ID of the Network Fabric. * * @return the networkFabricId value. */ String networkFabricId(); /** - * Gets the vlanId property: vlanId. Example: 501. + * Gets the vlanId property: Vlan Identifier of the Network Fabric. Example: 501. * * @return the vlanId value. */ int vlanId(); /** - * Gets the mtu property: maximum transmission unit. Default value is 1500. + * Gets the mtu property: Maximum transmission unit. Default value is 1500. * * @return the mtu value. */ Integer mtu(); /** - * Gets the disabledOnResources property: List of resources the L2 Isolation Domain is disabled on. Can be either - * entire NetworkFabric or NetworkRack. + * Gets the configurationState property: Configuration state of the resource. * - * @return the disabledOnResources value. + * @return the configurationState value. */ - List disabledOnResources(); + ConfigurationState configurationState(); /** - * Gets the administrativeState property: 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 provisioningState property: Provisioning state of the resource. * - * @return the administrativeState value. + * @return the provisioningState value. */ - EnabledDisabledState administrativeState(); + ProvisioningState provisioningState(); /** - * Gets the provisioningState property: Gets the provisioning state of the resource. + * Gets the administrativeState property: Administrative state of the resource. * - * @return the provisioningState value. + * @return the administrativeState value. */ - ProvisioningState provisioningState(); + AdministrativeState administrativeState(); /** * Gets the annotation property: Switch configuration description. @@ -140,6 +136,8 @@ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, + DefinitionStages.WithNetworkFabricId, + DefinitionStages.WithVlanId, DefinitionStages.WithCreate { } /** The L2IsolationDomain definition stages. */ @@ -173,18 +171,34 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithNetworkFabricId withExistingResourceGroup(String resourceGroupName); + } + /** The stage of the L2IsolationDomain definition allowing to specify networkFabricId. */ + interface WithNetworkFabricId { + /** + * Specifies the networkFabricId property: ARM Resource ID of the Network Fabric.. + * + * @param networkFabricId ARM Resource ID of the Network Fabric. + * @return the next definition stage. + */ + WithVlanId withNetworkFabricId(String networkFabricId); + } + /** The stage of the L2IsolationDomain definition allowing to specify vlanId. */ + interface WithVlanId { + /** + * Specifies the vlanId property: Vlan Identifier of the Network Fabric. Example: 501.. + * + * @param vlanId Vlan Identifier of the Network Fabric. Example: 501. + * @return the next definition stage. + */ + WithCreate withVlanId(int vlanId); } /** * The stage of the L2IsolationDomain definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithNetworkFabricId, - DefinitionStages.WithVlanId, - DefinitionStages.WithMtu, - DefinitionStages.WithAnnotation { + extends DefinitionStages.WithTags, DefinitionStages.WithMtu, DefinitionStages.WithAnnotation { /** * Executes the create request. * @@ -210,32 +224,12 @@ interface WithTags { */ WithCreate withTags(Map tags); } - /** The stage of the L2IsolationDomain definition allowing to specify networkFabricId. */ - interface WithNetworkFabricId { - /** - * Specifies the networkFabricId property: Network Fabric ARM resource id.. - * - * @param networkFabricId Network Fabric ARM resource id. - * @return the next definition stage. - */ - WithCreate withNetworkFabricId(String networkFabricId); - } - /** The stage of the L2IsolationDomain definition allowing to specify vlanId. */ - interface WithVlanId { - /** - * Specifies the vlanId property: vlanId. Example: 501.. - * - * @param vlanId vlanId. Example: 501. - * @return the next definition stage. - */ - WithCreate withVlanId(int vlanId); - } /** The stage of the L2IsolationDomain definition allowing to specify mtu. */ interface WithMtu { /** - * Specifies the mtu property: maximum transmission unit. Default value is 1500.. + * Specifies the mtu property: Maximum transmission unit. Default value is 1500.. * - * @param mtu maximum transmission unit. Default value is 1500. + * @param mtu Maximum transmission unit. Default value is 1500. * @return the next definition stage. */ WithCreate withMtu(Integer mtu); @@ -290,9 +284,9 @@ interface WithTags { /** The stage of the L2IsolationDomain update allowing to specify mtu. */ interface WithMtu { /** - * Specifies the mtu property: maximum transmission unit. Default value is 1500.. + * Specifies the mtu property: Maximum transmission unit. Default value is 1500.. * - * @param mtu maximum transmission unit. Default value is 1500. + * @param mtu Maximum transmission unit. Default value is 1500. * @return the next definition stage. */ Update withMtu(Integer mtu); @@ -332,8 +326,9 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ - void updateAdministrativeState(UpdateAdministrativeState body); + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body); /** * Implements the operation to the underlying resources. @@ -345,80 +340,51 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ - void updateAdministrativeState(UpdateAdministrativeState body, Context context); + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. */ - void clearArpTable(EnableDisableOnResources body); + ValidateConfigurationResponse validateConfiguration(); /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. */ - void clearArpTable(EnableDisableOnResources body, Context context); + ValidateConfigurationResponse validateConfiguration(Context context); /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void clearNeighborTable(EnableDisableOnResources body); + CommonPostActionResponseForStateUpdate commitConfiguration(); /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. - * - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearNeighborTable(EnableDisableOnResources body, Context context); - - /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return show ARP entries response per network device. - */ - Map getArpEntries(); - - /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return show ARP entries response per network device. + * @return common response for the state updates. */ - Map getArpEntries(Context context); + CommonPostActionResponseForStateUpdate commitConfiguration(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainPatch.java index 64bfaa34b064d..aa208ef2fe6f3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainPatch.java @@ -6,26 +6,18 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainPatchProperties; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The L2IsolationDomain patch resource definition. */ +/** The L2 Isolation Domain patch resource definition. */ @Fluent -public final class L2IsolationDomainPatch { +public final class L2IsolationDomainPatch extends TagsUpdate { /* * Resource properties. */ @JsonProperty(value = "properties") private L2IsolationDomainPatchProperties innerProperties; - /* - * Resource tags - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - /** Creates an instance of L2IsolationDomainPatch class. */ public L2IsolationDomainPatch() { } @@ -39,28 +31,15 @@ private L2IsolationDomainPatchProperties innerProperties() { return this.innerProperties; } - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the L2IsolationDomainPatch object itself. - */ + /** {@inheritDoc} */ + @Override public L2IsolationDomainPatch withTags(Map tags) { - this.tags = tags; + super.withTags(tags); return this; } /** - * Get the mtu property: maximum transmission unit. Default value is 1500. + * Get the mtu property: Maximum transmission unit. Default value is 1500. * * @return the mtu value. */ @@ -69,7 +48,7 @@ public Integer mtu() { } /** - * Set the mtu property: maximum transmission unit. Default value is 1500. + * Set the mtu property: Maximum transmission unit. Default value is 1500. * * @param mtu the mtu value to set. * @return the L2IsolationDomainPatch object itself. @@ -110,7 +89,9 @@ public L2IsolationDomainPatch withAnnotation(String annotation) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { + super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomains.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomains.java index 8cfcf9bdab27c..761525da17a55 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomains.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomains.java @@ -7,7 +7,6 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import java.util.Map; /** Resource collection API of L2IsolationDomains. */ public interface L2IsolationDomains { @@ -22,7 +21,7 @@ public interface L2IsolationDomains { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition along with {@link Response}. + * @return the L2 Isolation Domain resource definition along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String l2IsolationDomainName, Context context); @@ -37,12 +36,12 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition. + * @return the L2 Isolation Domain resource definition. */ L2IsolationDomain getByResourceGroup(String resourceGroupName, String l2IsolationDomainName); /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -55,7 +54,7 @@ Response getByResourceGroupWithResponse( void deleteByResourceGroup(String resourceGroupName, String l2IsolationDomainName); /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -74,13 +73,14 @@ Response getByResourceGroupWithResponse( *

Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ - void updateAdministrativeState( + CommonPostActionResponseForDeviceUpdate updateAdministrativeState( String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body); /** @@ -89,104 +89,72 @@ void updateAdministrativeState( *

Enables isolation domain across the fabric or on specified racks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ - void updateAdministrativeState( + CommonPostActionResponseForDeviceUpdate updateAdministrativeState( String resourceGroupName, String l2IsolationDomainName, UpdateAdministrativeState body, Context context); /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearArpTable(String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body); - - /** - * Implements the operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void clearArpTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context); - - /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. */ - void clearNeighborTable(String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body); + ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String l2IsolationDomainName); /** - * Implements the operation to the underlying resources. - * - *

Clears IPv6 neighbors for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. - * @param body Request payload. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. */ - void clearNeighborTable( - String resourceGroupName, String l2IsolationDomainName, EnableDisableOnResources body, Context context); + ValidateConfigurationResponse validateConfiguration( + String resourceGroupName, String l2IsolationDomainName, Context context); /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return show ARP entries response per network device. + * @return common response for the state updates. */ - Map getArpEntries(String resourceGroupName, String l2IsolationDomainName); + CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String l2IsolationDomainName); /** - * Implements the operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbors for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l2IsolationDomainName Name of the L2IsolationDomain. + * @param l2IsolationDomainName Name of the L2 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return show ARP entries response per network device. + * @return common response for the state updates. */ - Map getArpEntries(String resourceGroupName, String l2IsolationDomainName, Context context); + CommonPostActionResponseForStateUpdate commitConfiguration( + String resourceGroupName, String l2IsolationDomainName, Context context); /** * List L2IsolationDomains by resource group. @@ -197,7 +165,7 @@ void clearNeighborTable( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -211,7 +179,7 @@ void clearNeighborTable( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -222,7 +190,7 @@ void clearNeighborTable( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -235,7 +203,7 @@ void clearNeighborTable( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L2IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L2 Isolation Domains as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -248,7 +216,7 @@ void clearNeighborTable( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition along with {@link Response}. + * @return the L2 Isolation Domain resource definition along with {@link Response}. */ L2IsolationDomain getById(String id); @@ -262,12 +230,12 @@ void clearNeighborTable( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L2IsolationDomain resource definition along with {@link Response}. + * @return the L2 Isolation Domain resource definition along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * @@ -279,7 +247,7 @@ void clearNeighborTable( void deleteById(String id); /** - * Deletes named L2 Isolation Domain + * Deletes the L2 Isolation Domain. * *

Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainsListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainsListResult.java index f866fa62597ac..92fd2e77459ee 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainsListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L2IsolationDomainsListResult.java @@ -9,11 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of L2IsolationDomains. */ +/** List of L2 Isolation Domains. */ @Fluent public final class L2IsolationDomainsListResult { /* - * Displays list of L2IsolationDomain resources. + * Displays list of L2 Isolation Domain resources. */ @JsonProperty(value = "value") private List value; @@ -29,7 +29,7 @@ public L2IsolationDomainsListResult() { } /** - * Get the value property: Displays list of L2IsolationDomain resources. + * Get the value property: Displays list of L2 Isolation Domain resources. * * @return the value value. */ @@ -38,7 +38,7 @@ public List value() { } /** - * Set the value property: Displays list of L2IsolationDomain resources. + * Set the value property: Displays list of L2 Isolation Domain resources. * * @param value the value value to set. * @return the L2IsolationDomainsListResult object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicy.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicy.java new file mode 100644 index 0000000000000..2c12679c77ed6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3ExportRoutePolicy.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Array of ARM Resource ID of the RoutePolicies. */ +@Fluent +public final class L3ExportRoutePolicy { + /* + * ARM Resource ID of the RoutePolicy. + */ + @JsonProperty(value = "exportIpv4RoutePolicyId") + private String exportIpv4RoutePolicyId; + + /* + * ARM Resource ID of the RoutePolicy. + */ + @JsonProperty(value = "exportIpv6RoutePolicyId") + private String exportIpv6RoutePolicyId; + + /** Creates an instance of L3ExportRoutePolicy class. */ + public L3ExportRoutePolicy() { + } + + /** + * Get the exportIpv4RoutePolicyId property: ARM Resource ID of the RoutePolicy. + * + * @return the exportIpv4RoutePolicyId value. + */ + public String exportIpv4RoutePolicyId() { + return this.exportIpv4RoutePolicyId; + } + + /** + * Set the exportIpv4RoutePolicyId property: ARM Resource ID of the RoutePolicy. + * + * @param exportIpv4RoutePolicyId the exportIpv4RoutePolicyId value to set. + * @return the L3ExportRoutePolicy object itself. + */ + public L3ExportRoutePolicy withExportIpv4RoutePolicyId(String exportIpv4RoutePolicyId) { + this.exportIpv4RoutePolicyId = exportIpv4RoutePolicyId; + return this; + } + + /** + * Get the exportIpv6RoutePolicyId property: ARM Resource ID of the RoutePolicy. + * + * @return the exportIpv6RoutePolicyId value. + */ + public String exportIpv6RoutePolicyId() { + return this.exportIpv6RoutePolicyId; + } + + /** + * Set the exportIpv6RoutePolicyId property: ARM Resource ID of the RoutePolicy. + * + * @param exportIpv6RoutePolicyId the exportIpv6RoutePolicyId value to set. + * @return the L3ExportRoutePolicy object itself. + */ + public L3ExportRoutePolicy withExportIpv6RoutePolicyId(String exportIpv6RoutePolicyId) { + this.exportIpv6RoutePolicyId = exportIpv6RoutePolicyId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomain.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomain.java index 7b33fcaec50bc..a176d613e9231 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomain.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomain.java @@ -8,7 +8,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; -import java.util.List; import java.util.Map; /** An immutable client-side representation of L3IsolationDomain. */ @@ -56,41 +55,32 @@ public interface L3IsolationDomain { SystemData systemData(); /** - * Gets the networkFabricId property: Network Fabric ARM resource id. + * Gets the networkFabricId property: ARM Resource ID of the Network Fabric. * * @return the networkFabricId value. */ String networkFabricId(); /** - * Gets the disabledOnResources property: List of resources the L3 Isolation Domain is disabled on. Can be either - * entire NetworkFabric or NetworkRack. + * Gets the configurationState property: Configuration state of the resource. * - * @return the disabledOnResources value. + * @return the configurationState value. */ - List disabledOnResources(); + ConfigurationState configurationState(); /** - * Gets the administrativeState property: Administrative state of the IsolationDomain. Example: Enabled | Disabled. + * Gets the provisioningState property: Provisioning state of the resource. * - * @return the administrativeState value. - */ - EnabledDisabledState administrativeState(); - - /** - * Gets the optionBDisabledOnResources property: List of resources the OptionB is disabled on. Can be either entire - * NetworkFabric or NetworkRack. - * - * @return the optionBDisabledOnResources value. + * @return the provisioningState value. */ - List optionBDisabledOnResources(); + ProvisioningState provisioningState(); /** - * Gets the provisioningState property: Gets the provisioning state of the resource. + * Gets the administrativeState property: Administrative state of the resource. * - * @return the provisioningState value. + * @return the administrativeState value. */ - ProvisioningState provisioningState(); + AdministrativeState administrativeState(); /** * Gets the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False". @@ -107,25 +97,18 @@ public interface L3IsolationDomain { RedistributeStaticRoutes redistributeStaticRoutes(); /** - * Gets the aggregateRouteConfiguration property: List of Ipv4 and Ipv6 route configurations. + * Gets the aggregateRouteConfiguration property: Aggregate route configurations. * * @return the aggregateRouteConfiguration value. */ AggregateRouteConfiguration aggregateRouteConfiguration(); - /** - * Gets the description property: L3 Isolation Domain description. - * - * @return the description value. - */ - String description(); - /** * Gets the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. * * @return the connectedSubnetRoutePolicy value. */ - L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy(); + ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy(); /** * Gets the annotation property: Switch configuration description. @@ -167,6 +150,7 @@ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, + DefinitionStages.WithNetworkFabricId, DefinitionStages.WithCreate { } /** The L3IsolationDomain definition stages. */ @@ -200,7 +184,17 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); + WithNetworkFabricId withExistingResourceGroup(String resourceGroupName); + } + /** The stage of the L3IsolationDomain definition allowing to specify networkFabricId. */ + interface WithNetworkFabricId { + /** + * Specifies the networkFabricId property: ARM Resource ID of the Network Fabric.. + * + * @param networkFabricId ARM Resource ID of the Network Fabric. + * @return the next definition stage. + */ + WithCreate withNetworkFabricId(String networkFabricId); } /** * The stage of the L3IsolationDomain definition which contains all the minimum required properties for the @@ -208,11 +202,9 @@ interface WithResourceGroup { */ interface WithCreate extends DefinitionStages.WithTags, - DefinitionStages.WithNetworkFabricId, DefinitionStages.WithRedistributeConnectedSubnets, DefinitionStages.WithRedistributeStaticRoutes, DefinitionStages.WithAggregateRouteConfiguration, - DefinitionStages.WithDescription, DefinitionStages.WithConnectedSubnetRoutePolicy, DefinitionStages.WithAnnotation { /** @@ -240,16 +232,6 @@ interface WithTags { */ WithCreate withTags(Map tags); } - /** The stage of the L3IsolationDomain definition allowing to specify networkFabricId. */ - interface WithNetworkFabricId { - /** - * Specifies the networkFabricId property: Network Fabric ARM resource id.. - * - * @param networkFabricId Network Fabric ARM resource id. - * @return the next definition stage. - */ - WithCreate withNetworkFabricId(String networkFabricId); - } /** The stage of the L3IsolationDomain definition allowing to specify redistributeConnectedSubnets. */ interface WithRedistributeConnectedSubnets { /** @@ -273,23 +255,13 @@ interface WithRedistributeStaticRoutes { /** The stage of the L3IsolationDomain definition allowing to specify aggregateRouteConfiguration. */ interface WithAggregateRouteConfiguration { /** - * Specifies the aggregateRouteConfiguration property: List of Ipv4 and Ipv6 route configurations.. + * Specifies the aggregateRouteConfiguration property: Aggregate route configurations.. * - * @param aggregateRouteConfiguration List of Ipv4 and Ipv6 route configurations. + * @param aggregateRouteConfiguration Aggregate route configurations. * @return the next definition stage. */ WithCreate withAggregateRouteConfiguration(AggregateRouteConfiguration aggregateRouteConfiguration); } - /** The stage of the L3IsolationDomain definition allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: L3 Isolation Domain description.. - * - * @param description L3 Isolation Domain description. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } /** The stage of the L3IsolationDomain definition allowing to specify connectedSubnetRoutePolicy. */ interface WithConnectedSubnetRoutePolicy { /** @@ -298,8 +270,7 @@ interface WithConnectedSubnetRoutePolicy { * @param connectedSubnetRoutePolicy Connected Subnet RoutePolicy. * @return the next definition stage. */ - WithCreate withConnectedSubnetRoutePolicy( - L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy); + WithCreate withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy); } /** The stage of the L3IsolationDomain definition allowing to specify annotation. */ interface WithAnnotation { @@ -325,8 +296,8 @@ interface Update UpdateStages.WithRedistributeConnectedSubnets, UpdateStages.WithRedistributeStaticRoutes, UpdateStages.WithAggregateRouteConfiguration, - UpdateStages.WithDescription, - UpdateStages.WithConnectedSubnetRoutePolicy { + UpdateStages.WithConnectedSubnetRoutePolicy, + UpdateStages.WithAnnotation { /** * Executes the update request. * @@ -377,33 +348,32 @@ interface WithRedistributeStaticRoutes { /** The stage of the L3IsolationDomain update allowing to specify aggregateRouteConfiguration. */ interface WithAggregateRouteConfiguration { /** - * Specifies the aggregateRouteConfiguration property: List of Ipv4 and Ipv6 route configurations.. + * Specifies the aggregateRouteConfiguration property: Aggregate route configurations.. * - * @param aggregateRouteConfiguration List of Ipv4 and Ipv6 route configurations. + * @param aggregateRouteConfiguration Aggregate route configurations. * @return the next definition stage. */ Update withAggregateRouteConfiguration(AggregateRouteConfiguration aggregateRouteConfiguration); } - /** The stage of the L3IsolationDomain update allowing to specify description. */ - interface WithDescription { + /** The stage of the L3IsolationDomain update allowing to specify connectedSubnetRoutePolicy. */ + interface WithConnectedSubnetRoutePolicy { /** - * Specifies the description property: L3 Isolation Domain description.. + * Specifies the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. * - * @param description L3 Isolation Domain description. + * @param connectedSubnetRoutePolicy Connected Subnet RoutePolicy. * @return the next definition stage. */ - Update withDescription(String description); + Update withConnectedSubnetRoutePolicy(ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy); } - /** The stage of the L3IsolationDomain update allowing to specify connectedSubnetRoutePolicy. */ - interface WithConnectedSubnetRoutePolicy { + /** The stage of the L3IsolationDomain update allowing to specify annotation. */ + interface WithAnnotation { /** - * Specifies the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. + * Specifies the annotation property: Switch configuration description.. * - * @param connectedSubnetRoutePolicy Connected Subnet RoutePolicy. + * @param annotation Switch configuration description. * @return the next definition stage. */ - Update withConnectedSubnetRoutePolicy( - L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy); + Update withAnnotation(String annotation); } } /** @@ -430,8 +400,9 @@ Update withConnectedSubnetRoutePolicy( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ - void updateAdministrativeState(UpdateAdministrativeState body); + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body); /** * executes enable operation to the underlying resources. @@ -443,81 +414,51 @@ Update withConnectedSubnetRoutePolicy( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ - void updateAdministrativeState(UpdateAdministrativeState body, Context context); - - /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. - * - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void updateOptionBAdministrativeState(UpdateAdministrativeState body); - - /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. - * - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void updateOptionBAdministrativeState(UpdateAdministrativeState body, Context context); + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. */ - void clearArpTable(EnableDisableOnResources body); + ValidateConfigurationResponse validateConfiguration(); /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. */ - void clearArpTable(EnableDisableOnResources body, Context context); + ValidateConfigurationResponse validateConfiguration(Context context); /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void clearNeighborTable(EnableDisableOnResources body); + CommonPostActionResponseForStateUpdate commitConfiguration(); /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * - * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void clearNeighborTable(EnableDisableOnResources body, Context context); + CommonPostActionResponseForStateUpdate commitConfiguration(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatch.java index 152a6bb96ff44..385a8669f599c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatch.java @@ -6,26 +6,18 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainPatchProperties; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The L3IsolationDomain patch resource definition. */ +/** The L3 Isolation Domain patch resource definition. */ @Fluent -public final class L3IsolationDomainPatch { +public final class L3IsolationDomainPatch extends TagsUpdate { /* * Resource properties. */ @JsonProperty(value = "properties") private L3IsolationDomainPatchProperties innerProperties; - /* - * Resource tags - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - /** Creates an instance of L3IsolationDomainPatch class. */ public L3IsolationDomainPatch() { } @@ -39,23 +31,10 @@ private L3IsolationDomainPatchProperties innerProperties() { return this.innerProperties; } - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the L3IsolationDomainPatch object itself. - */ + /** {@inheritDoc} */ + @Override public L3IsolationDomainPatch withTags(Map tags) { - this.tags = tags; + super.withTags(tags); return this; } @@ -107,7 +86,7 @@ public L3IsolationDomainPatch withRedistributeStaticRoutes(RedistributeStaticRou } /** - * Get the aggregateRouteConfiguration property: List of Ipv4 and Ipv6 route configurations. + * Get the aggregateRouteConfiguration property: Aggregate route configurations. * * @return the aggregateRouteConfiguration value. */ @@ -116,7 +95,7 @@ public AggregateRouteConfiguration aggregateRouteConfiguration() { } /** - * Set the aggregateRouteConfiguration property: List of Ipv4 and Ipv6 route configurations. + * Set the aggregateRouteConfiguration property: Aggregate route configurations. * * @param aggregateRouteConfiguration the aggregateRouteConfiguration value to set. * @return the L3IsolationDomainPatch object itself. @@ -131,49 +110,49 @@ public L3IsolationDomainPatch withAggregateRouteConfiguration( } /** - * Get the description property: L3 Isolation Domain description. + * Get the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. * - * @return the description value. + * @return the connectedSubnetRoutePolicy value. */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); + public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().connectedSubnetRoutePolicy(); } /** - * Set the description property: L3 Isolation Domain description. + * Set the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. * - * @param description the description value to set. + * @param connectedSubnetRoutePolicy the connectedSubnetRoutePolicy value to set. * @return the L3IsolationDomainPatch object itself. */ - public L3IsolationDomainPatch withDescription(String description) { + public L3IsolationDomainPatch withConnectedSubnetRoutePolicy( + ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { if (this.innerProperties() == null) { this.innerProperties = new L3IsolationDomainPatchProperties(); } - this.innerProperties().withDescription(description); + this.innerProperties().withConnectedSubnetRoutePolicy(connectedSubnetRoutePolicy); return this; } /** - * Get the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. + * Get the annotation property: Switch configuration description. * - * @return the connectedSubnetRoutePolicy value. + * @return the annotation value. */ - public L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { - return this.innerProperties() == null ? null : this.innerProperties().connectedSubnetRoutePolicy(); + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); } /** - * Set the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. + * Set the annotation property: Switch configuration description. * - * @param connectedSubnetRoutePolicy the connectedSubnetRoutePolicy value to set. + * @param annotation the annotation value to set. * @return the L3IsolationDomainPatch object itself. */ - public L3IsolationDomainPatch withConnectedSubnetRoutePolicy( - L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { + public L3IsolationDomainPatch withAnnotation(String annotation) { if (this.innerProperties() == null) { this.innerProperties = new L3IsolationDomainPatchProperties(); } - this.innerProperties().withConnectedSubnetRoutePolicy(connectedSubnetRoutePolicy); + this.innerProperties().withAnnotation(annotation); return this; } @@ -182,7 +161,9 @@ public L3IsolationDomainPatch withConnectedSubnetRoutePolicy( * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { + super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy.java deleted file mode 100644 index 2e9c3ac7918c3..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Connected Subnet RoutePolicy. */ -@Fluent -public final class L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy { - /* - * exportRoutePolicyId value. - */ - @JsonProperty(value = "exportRoutePolicyId") - private String exportRoutePolicyId; - - /* - * Enabled/Disabled connected subnet route policy. Ex: Enabled | Disabled. - */ - @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) - private EnabledDisabledState administrativeState; - - /** Creates an instance of L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy class. */ - public L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy() { - } - - /** - * Get the exportRoutePolicyId property: exportRoutePolicyId value. - * - * @return the exportRoutePolicyId value. - */ - public String exportRoutePolicyId() { - return this.exportRoutePolicyId; - } - - /** - * Set the exportRoutePolicyId property: exportRoutePolicyId value. - * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. - * @return the L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy object itself. - */ - public L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy withExportRoutePolicyId( - String exportRoutePolicyId) { - this.exportRoutePolicyId = exportRoutePolicyId; - return this; - } - - /** - * Get the administrativeState property: Enabled/Disabled connected subnet route policy. Ex: Enabled | Disabled. - * - * @return the administrativeState value. - */ - public EnabledDisabledState administrativeState() { - return this.administrativeState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatchableProperties.java new file mode 100644 index 0000000000000..8cbd17eeae328 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainPatchableProperties.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** L3 Isolation Domain Patch Properties defines the patchable properties of the resource. */ +@Fluent +public class L3IsolationDomainPatchableProperties { + /* + * Advertise Connected Subnets. Ex: "True" | "False". + */ + @JsonProperty(value = "redistributeConnectedSubnets") + private RedistributeConnectedSubnets redistributeConnectedSubnets; + + /* + * Advertise Static Routes. Ex: "True" | "False". + */ + @JsonProperty(value = "redistributeStaticRoutes") + private RedistributeStaticRoutes redistributeStaticRoutes; + + /* + * Aggregate route configurations. + */ + @JsonProperty(value = "aggregateRouteConfiguration") + private AggregateRouteConfiguration aggregateRouteConfiguration; + + /* + * Connected Subnet RoutePolicy + */ + @JsonProperty(value = "connectedSubnetRoutePolicy") + private ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy; + + /** Creates an instance of L3IsolationDomainPatchableProperties class. */ + public L3IsolationDomainPatchableProperties() { + } + + /** + * Get the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False". + * + * @return the redistributeConnectedSubnets value. + */ + public RedistributeConnectedSubnets redistributeConnectedSubnets() { + return this.redistributeConnectedSubnets; + } + + /** + * Set the redistributeConnectedSubnets property: Advertise Connected Subnets. Ex: "True" | "False". + * + * @param redistributeConnectedSubnets the redistributeConnectedSubnets value to set. + * @return the L3IsolationDomainPatchableProperties object itself. + */ + public L3IsolationDomainPatchableProperties withRedistributeConnectedSubnets( + RedistributeConnectedSubnets redistributeConnectedSubnets) { + this.redistributeConnectedSubnets = redistributeConnectedSubnets; + return this; + } + + /** + * Get the redistributeStaticRoutes property: Advertise Static Routes. Ex: "True" | "False". + * + * @return the redistributeStaticRoutes value. + */ + public RedistributeStaticRoutes redistributeStaticRoutes() { + return this.redistributeStaticRoutes; + } + + /** + * Set the redistributeStaticRoutes property: Advertise Static Routes. Ex: "True" | "False". + * + * @param redistributeStaticRoutes the redistributeStaticRoutes value to set. + * @return the L3IsolationDomainPatchableProperties object itself. + */ + public L3IsolationDomainPatchableProperties withRedistributeStaticRoutes( + RedistributeStaticRoutes redistributeStaticRoutes) { + this.redistributeStaticRoutes = redistributeStaticRoutes; + return this; + } + + /** + * Get the aggregateRouteConfiguration property: Aggregate route configurations. + * + * @return the aggregateRouteConfiguration value. + */ + public AggregateRouteConfiguration aggregateRouteConfiguration() { + return this.aggregateRouteConfiguration; + } + + /** + * Set the aggregateRouteConfiguration property: Aggregate route configurations. + * + * @param aggregateRouteConfiguration the aggregateRouteConfiguration value to set. + * @return the L3IsolationDomainPatchableProperties object itself. + */ + public L3IsolationDomainPatchableProperties withAggregateRouteConfiguration( + AggregateRouteConfiguration aggregateRouteConfiguration) { + this.aggregateRouteConfiguration = aggregateRouteConfiguration; + return this; + } + + /** + * Get the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. + * + * @return the connectedSubnetRoutePolicy value. + */ + public ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy() { + return this.connectedSubnetRoutePolicy; + } + + /** + * Set the connectedSubnetRoutePolicy property: Connected Subnet RoutePolicy. + * + * @param connectedSubnetRoutePolicy the connectedSubnetRoutePolicy value to set. + * @return the L3IsolationDomainPatchableProperties object itself. + */ + public L3IsolationDomainPatchableProperties withConnectedSubnetRoutePolicy( + ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy) { + this.connectedSubnetRoutePolicy = connectedSubnetRoutePolicy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (aggregateRouteConfiguration() != null) { + aggregateRouteConfiguration().validate(); + } + if (connectedSubnetRoutePolicy() != null) { + connectedSubnetRoutePolicy().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomains.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomains.java index 2d215adc72c63..e5f88de7944d2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomains.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomains.java @@ -21,7 +21,7 @@ public interface L3IsolationDomains { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition along with {@link Response}. + * @return the L3 Isolation Domain resource definition along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String l3IsolationDomainName, Context context); @@ -36,7 +36,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition. + * @return the L3 Isolation Domain resource definition. */ L3IsolationDomain getByResourceGroup(String resourceGroupName, String l3IsolationDomainName); @@ -76,7 +76,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -90,7 +90,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -101,7 +101,7 @@ Response getByResourceGroupWithResponse( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -114,7 +114,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of L3IsolationDomains as paginated response with {@link PagedIterable}. + * @return list of L3 Isolation Domains as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -124,13 +124,14 @@ Response getByResourceGroupWithResponse( *

Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ - void updateAdministrativeState( + CommonPostActionResponseForDeviceUpdate updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body); /** @@ -139,106 +140,72 @@ void updateAdministrativeState( *

Enables racks for this Isolation Domain. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void updateAdministrativeState( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context); - - /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void updateOptionBAdministrativeState( - String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body); - - /** - * Update route targets on CE devices. List the CE network device ARM resource IDs in the request body payload. - * - *

Update administrative state of option B on CE devices. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ - void updateOptionBAdministrativeState( + CommonPostActionResponseForDeviceUpdate updateAdministrativeState( String resourceGroupName, String l3IsolationDomainName, UpdateAdministrativeState body, Context context); /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. */ - void clearArpTable(String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body); + ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String l3IsolationDomainName); /** - * executes clear ARP operation to the underlying resources. - * - *

Clears ARP tables for this Isolation Domain. + * Validates the configuration of the resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. */ - void clearArpTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context); + ValidateConfigurationResponse validateConfiguration( + String resourceGroupName, String l3IsolationDomainName, Context context); /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void clearNeighborTable(String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body); + CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String l3IsolationDomainName); /** - * executes ipv6 clear neighbor tables operation to the underlying resources. + * Execute the commit on the resources. * - *

Clears IPv6 neighbor tables for this Isolation Domain. + *

Commits the configuration of the given resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param l3IsolationDomainName Name of the L3IsolationDomain. - * @param body Request payload. + * @param l3IsolationDomainName Name of the L3 Isolation Domain. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void clearNeighborTable( - String resourceGroupName, String l3IsolationDomainName, EnableDisableOnResources body, Context context); + CommonPostActionResponseForStateUpdate commitConfiguration( + String resourceGroupName, String l3IsolationDomainName, Context context); /** * Gets a L3 Isolation Domain. @@ -249,7 +216,7 @@ void clearNeighborTable( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition along with {@link Response}. + * @return the L3 Isolation Domain resource definition along with {@link Response}. */ L3IsolationDomain getById(String id); @@ -263,7 +230,7 @@ void clearNeighborTable( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the L3IsolationDomain resource definition along with {@link Response}. + * @return the L3 Isolation Domain resource definition along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainsListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainsListResult.java index 652bbc1d6e720..2630e06bf6d6b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainsListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3IsolationDomainsListResult.java @@ -9,11 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of L3IsolationDomains. */ +/** List of L3 Isolation Domains. */ @Fluent public final class L3IsolationDomainsListResult { /* - * List of L3IsolationDomain resources. + * List of L3 Isolation Domain resources. */ @JsonProperty(value = "value") private List value; @@ -29,7 +29,7 @@ public L3IsolationDomainsListResult() { } /** - * Get the value property: List of L3IsolationDomain resources. + * Get the value property: List of L3 Isolation Domain resources. * * @return the value value. */ @@ -38,7 +38,7 @@ public List value() { } /** - * Set the value property: List of L3IsolationDomain resources. + * Set the value property: List of L3 Isolation Domain resources. * * @param value the value value to set. * @return the L3IsolationDomainsListResult object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3OptionAProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionAProperties.java similarity index 58% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3OptionAProperties.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionAProperties.java index 3bea6efdb90eb..d71a3ba646949 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3OptionAProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionAProperties.java @@ -9,7 +9,7 @@ /** Peering optionA properties. */ @Fluent -public class Layer3OptionAProperties extends Layer3IpPrefixProperties { +public class L3OptionAProperties { /* * MTU to use for option A peering. */ @@ -26,13 +26,13 @@ public class Layer3OptionAProperties extends Layer3IpPrefixProperties { * Fabric ASN number. Example 65001 */ @JsonProperty(value = "fabricASN", access = JsonProperty.Access.WRITE_ONLY) - private Integer fabricAsn; + private Long fabricAsn; /* * Peer ASN number.Example : 28 */ @JsonProperty(value = "peerASN") - private Integer peerAsn; + private Long peerAsn; /* * BFD configuration properties @@ -40,8 +40,20 @@ public class Layer3OptionAProperties extends Layer3IpPrefixProperties { @JsonProperty(value = "bfdConfiguration") private BfdConfiguration bfdConfiguration; - /** Creates an instance of Layer3OptionAProperties class. */ - public Layer3OptionAProperties() { + /* + * Ingress Acl. ARM resource ID of Access Control Lists. + */ + @JsonProperty(value = "ingressAclId") + private String ingressAclId; + + /* + * Egress Acl. ARM resource ID of Access Control Lists. + */ + @JsonProperty(value = "egressAclId") + private String egressAclId; + + /** Creates an instance of L3OptionAProperties class. */ + public L3OptionAProperties() { } /** @@ -57,9 +69,9 @@ public Integer mtu() { * Set the mtu property: MTU to use for option A peering. * * @param mtu the mtu value to set. - * @return the Layer3OptionAProperties object itself. + * @return the L3OptionAProperties object itself. */ - public Layer3OptionAProperties withMtu(Integer mtu) { + public L3OptionAProperties withMtu(Integer mtu) { this.mtu = mtu; return this; } @@ -77,9 +89,9 @@ public Integer vlanId() { * Set the vlanId property: Vlan identifier. Example : 501. * * @param vlanId the vlanId value to set. - * @return the Layer3OptionAProperties object itself. + * @return the L3OptionAProperties object itself. */ - public Layer3OptionAProperties withVlanId(Integer vlanId) { + public L3OptionAProperties withVlanId(Integer vlanId) { this.vlanId = vlanId; return this; } @@ -89,7 +101,7 @@ public Layer3OptionAProperties withVlanId(Integer vlanId) { * * @return the fabricAsn value. */ - public Integer fabricAsn() { + public Long fabricAsn() { return this.fabricAsn; } @@ -98,7 +110,7 @@ public Integer fabricAsn() { * * @return the peerAsn value. */ - public Integer peerAsn() { + public Long peerAsn() { return this.peerAsn; } @@ -106,9 +118,9 @@ public Integer peerAsn() { * Set the peerAsn property: Peer ASN number.Example : 28. * * @param peerAsn the peerAsn value to set. - * @return the Layer3OptionAProperties object itself. + * @return the L3OptionAProperties object itself. */ - public Layer3OptionAProperties withPeerAsn(Integer peerAsn) { + public L3OptionAProperties withPeerAsn(Long peerAsn) { this.peerAsn = peerAsn; return this; } @@ -126,38 +138,50 @@ public BfdConfiguration bfdConfiguration() { * Set the bfdConfiguration property: BFD configuration properties. * * @param bfdConfiguration the bfdConfiguration value to set. - * @return the Layer3OptionAProperties object itself. + * @return the L3OptionAProperties object itself. */ - public Layer3OptionAProperties withBfdConfiguration(BfdConfiguration bfdConfiguration) { + public L3OptionAProperties withBfdConfiguration(BfdConfiguration bfdConfiguration) { this.bfdConfiguration = bfdConfiguration; return this; } - /** {@inheritDoc} */ - @Override - public Layer3OptionAProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) { - super.withPrimaryIpv4Prefix(primaryIpv4Prefix); - return this; + /** + * Get the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @return the ingressAclId value. + */ + public String ingressAclId() { + return this.ingressAclId; } - /** {@inheritDoc} */ - @Override - public Layer3OptionAProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) { - super.withPrimaryIpv6Prefix(primaryIpv6Prefix); + /** + * Set the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @param ingressAclId the ingressAclId value to set. + * @return the L3OptionAProperties object itself. + */ + public L3OptionAProperties withIngressAclId(String ingressAclId) { + this.ingressAclId = ingressAclId; return this; } - /** {@inheritDoc} */ - @Override - public Layer3OptionAProperties withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { - super.withSecondaryIpv4Prefix(secondaryIpv4Prefix); - return this; + /** + * Get the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @return the egressAclId value. + */ + public String egressAclId() { + return this.egressAclId; } - /** {@inheritDoc} */ - @Override - public Layer3OptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { - super.withSecondaryIpv6Prefix(secondaryIpv6Prefix); + /** + * Set the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @param egressAclId the egressAclId value to set. + * @return the L3OptionAProperties object itself. + */ + public L3OptionAProperties withEgressAclId(String egressAclId) { + this.egressAclId = egressAclId; return this; } @@ -166,9 +190,7 @@ public Layer3OptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefi * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); if (bfdConfiguration() != null) { bfdConfiguration().validate(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBProperties.java new file mode 100644 index 0000000000000..bb1d37a576f59 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/L3OptionBProperties.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Option B configuration. */ +@Fluent +public final class L3OptionBProperties { + /* + * RouteTargets to be applied. This is used for the backward compatibility. + */ + @JsonProperty(value = "importRouteTargets") + private List importRouteTargets; + + /* + * RouteTargets to be applied. This is used for the backward compatibility. + */ + @JsonProperty(value = "exportRouteTargets") + private List exportRouteTargets; + + /* + * RouteTargets to be applied. + */ + @JsonProperty(value = "routeTargets") + private RouteTargetInformation routeTargets; + + /** Creates an instance of L3OptionBProperties class. */ + public L3OptionBProperties() { + } + + /** + * Get the importRouteTargets property: RouteTargets to be applied. This is used for the backward compatibility. + * + * @return the importRouteTargets value. + */ + public List importRouteTargets() { + return this.importRouteTargets; + } + + /** + * Set the importRouteTargets property: RouteTargets to be applied. This is used for the backward compatibility. + * + * @param importRouteTargets the importRouteTargets value to set. + * @return the L3OptionBProperties object itself. + */ + public L3OptionBProperties withImportRouteTargets(List importRouteTargets) { + this.importRouteTargets = importRouteTargets; + return this; + } + + /** + * Get the exportRouteTargets property: RouteTargets to be applied. This is used for the backward compatibility. + * + * @return the exportRouteTargets value. + */ + public List exportRouteTargets() { + return this.exportRouteTargets; + } + + /** + * Set the exportRouteTargets property: RouteTargets to be applied. This is used for the backward compatibility. + * + * @param exportRouteTargets the exportRouteTargets value to set. + * @return the L3OptionBProperties object itself. + */ + public L3OptionBProperties withExportRouteTargets(List exportRouteTargets) { + this.exportRouteTargets = exportRouteTargets; + return this; + } + + /** + * Get the routeTargets property: RouteTargets to be applied. + * + * @return the routeTargets value. + */ + public RouteTargetInformation routeTargets() { + return this.routeTargets; + } + + /** + * Set the routeTargets property: RouteTargets to be applied. + * + * @param routeTargets the routeTargets value to set. + * @return the L3OptionBProperties object itself. + */ + public L3OptionBProperties withRouteTargets(RouteTargetInformation routeTargets) { + this.routeTargets = routeTargets; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (routeTargets() != null) { + routeTargets().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2Configuration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2Configuration.java index 158eece66a76b..89a3b46a461f9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2Configuration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer2Configuration.java @@ -8,57 +8,31 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** layer2Configuration. */ +/** Common properties for Layer2 Configuration. */ @Fluent public final class Layer2Configuration { - /* - * Number of ports connected between PE/CE. Maximum value depends on FabricSKU. - */ - @JsonProperty(value = "portCount") - private Integer portCount; - /* * MTU of the packets between PE & CE. */ - @JsonProperty(value = "mtu", required = true) - private int mtu; + @JsonProperty(value = "mtu") + private Integer mtu; /* * List of network device interfaces resource IDs. */ - @JsonProperty(value = "interfaces", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "interfaces") private List interfaces; /** Creates an instance of Layer2Configuration class. */ public Layer2Configuration() { } - /** - * Get the portCount property: Number of ports connected between PE/CE. Maximum value depends on FabricSKU. - * - * @return the portCount value. - */ - public Integer portCount() { - return this.portCount; - } - - /** - * Set the portCount property: Number of ports connected between PE/CE. Maximum value depends on FabricSKU. - * - * @param portCount the portCount value to set. - * @return the Layer2Configuration object itself. - */ - public Layer2Configuration withPortCount(Integer portCount) { - this.portCount = portCount; - return this; - } - /** * Get the mtu property: MTU of the packets between PE & CE. * * @return the mtu value. */ - public int mtu() { + public Integer mtu() { return this.mtu; } @@ -68,7 +42,7 @@ public int mtu() { * @param mtu the mtu value to set. * @return the Layer2Configuration object itself. */ - public Layer2Configuration withMtu(int mtu) { + public Layer2Configuration withMtu(Integer mtu) { this.mtu = mtu; return this; } @@ -82,6 +56,17 @@ public List interfaces() { return this.interfaces; } + /** + * Set the interfaces property: List of network device interfaces resource IDs. + * + * @param interfaces the interfaces value to set. + * @return the Layer2Configuration object itself. + */ + public Layer2Configuration withInterfaces(List interfaces) { + this.interfaces = interfaces; + return this; + } + /** * Validates the instance. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3IpPrefixProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3IpPrefixProperties.java index ad4eec6ee6cf1..c2a49b9489bfe 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3IpPrefixProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3IpPrefixProperties.java @@ -7,41 +7,29 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Layer 3 primary and secondary ip address prefixes. */ +/** Layer 3 primary and secondary IP Address prefixes. */ @Fluent public class 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. + * IPv4 Address Prefix. */ @JsonProperty(value = "primaryIpv4Prefix") private String primaryIpv4Prefix; /* - * 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. */ @JsonProperty(value = "primaryIpv6Prefix") private String primaryIpv6Prefix; /* - * 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. */ @JsonProperty(value = "secondaryIpv4Prefix") private String secondaryIpv4Prefix; /* - * 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. */ @JsonProperty(value = "secondaryIpv6Prefix") private String secondaryIpv6Prefix; @@ -51,10 +39,7 @@ public Layer3IpPrefixProperties() { } /** - * Get the primaryIpv4Prefix property: 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. + * Get the primaryIpv4Prefix property: IPv4 Address Prefix. * * @return the primaryIpv4Prefix value. */ @@ -63,10 +48,7 @@ public String primaryIpv4Prefix() { } /** - * Set the primaryIpv4Prefix property: 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. + * Set the primaryIpv4Prefix property: IPv4 Address Prefix. * * @param primaryIpv4Prefix the primaryIpv4Prefix value to set. * @return the Layer3IpPrefixProperties object itself. @@ -77,10 +59,7 @@ public Layer3IpPrefixProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) } /** - * Get the primaryIpv6Prefix property: 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. + * Get the primaryIpv6Prefix property: IPv6 Address Prefix. * * @return the primaryIpv6Prefix value. */ @@ -89,10 +68,7 @@ public String primaryIpv6Prefix() { } /** - * Set the primaryIpv6Prefix property: 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. + * Set the primaryIpv6Prefix property: IPv6 Address Prefix. * * @param primaryIpv6Prefix the primaryIpv6Prefix value to set. * @return the Layer3IpPrefixProperties object itself. @@ -103,10 +79,7 @@ public Layer3IpPrefixProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) } /** - * Get the secondaryIpv4Prefix property: 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. + * Get the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. * * @return the secondaryIpv4Prefix value. */ @@ -115,10 +88,7 @@ public String secondaryIpv4Prefix() { } /** - * Set the secondaryIpv4Prefix property: 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. + * Set the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. * * @param secondaryIpv4Prefix the secondaryIpv4Prefix value to set. * @return the Layer3IpPrefixProperties object itself. @@ -129,10 +99,7 @@ public Layer3IpPrefixProperties withSecondaryIpv4Prefix(String secondaryIpv4Pref } /** - * Get the secondaryIpv6Prefix property: 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. + * Get the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. * * @return the secondaryIpv6Prefix value. */ @@ -141,10 +108,7 @@ public String secondaryIpv6Prefix() { } /** - * Set the secondaryIpv6Prefix property: 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. + * Set the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. * * @param secondaryIpv6Prefix the secondaryIpv6Prefix value to set. * @return the Layer3IpPrefixProperties object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer4Protocol.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer4Protocol.java new file mode 100644 index 0000000000000..53b075769d3df --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer4Protocol.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Layer4 protocol type that needs to be matched. */ +public final class Layer4Protocol extends ExpandableStringEnum { + /** Static value TCP for Layer4Protocol. */ + public static final Layer4Protocol TCP = fromString("TCP"); + + /** Static value UDP for Layer4Protocol. */ + public static final Layer4Protocol UDP = fromString("UDP"); + + /** + * Creates a new instance of Layer4Protocol value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Layer4Protocol() { + } + + /** + * Creates or finds a Layer4Protocol from its string representation. + * + * @param name a name to look for. + * @return the corresponding Layer4Protocol. + */ + @JsonCreator + public static Layer4Protocol fromString(String name) { + return fromString(name, Layer4Protocol.class); + } + + /** + * Gets known Layer4Protocol values. + * + * @return known Layer4Protocol values. + */ + public static Collection values() { + return values(Layer4Protocol.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationPatchableProperties.java new file mode 100644 index 0000000000000..3a058fab41ee7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationPatchableProperties.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Configuration to be used to setup the management network. */ +@Fluent +public final class ManagementNetworkConfigurationPatchableProperties { + /* + * VPN Configuration properties. + */ + @JsonProperty(value = "infrastructureVpnConfiguration") + private VpnConfigurationPatchableProperties infrastructureVpnConfiguration; + + /* + * VPN Configuration properties. + */ + @JsonProperty(value = "workloadVpnConfiguration") + private VpnConfigurationPatchableProperties workloadVpnConfiguration; + + /** Creates an instance of ManagementNetworkConfigurationPatchableProperties class. */ + public ManagementNetworkConfigurationPatchableProperties() { + } + + /** + * Get the infrastructureVpnConfiguration property: VPN Configuration properties. + * + * @return the infrastructureVpnConfiguration value. + */ + public VpnConfigurationPatchableProperties infrastructureVpnConfiguration() { + return this.infrastructureVpnConfiguration; + } + + /** + * Set the infrastructureVpnConfiguration property: VPN Configuration properties. + * + * @param infrastructureVpnConfiguration the infrastructureVpnConfiguration value to set. + * @return the ManagementNetworkConfigurationPatchableProperties object itself. + */ + public ManagementNetworkConfigurationPatchableProperties withInfrastructureVpnConfiguration( + VpnConfigurationPatchableProperties infrastructureVpnConfiguration) { + this.infrastructureVpnConfiguration = infrastructureVpnConfiguration; + return this; + } + + /** + * Get the workloadVpnConfiguration property: VPN Configuration properties. + * + * @return the workloadVpnConfiguration value. + */ + public VpnConfigurationPatchableProperties workloadVpnConfiguration() { + return this.workloadVpnConfiguration; + } + + /** + * Set the workloadVpnConfiguration property: VPN Configuration properties. + * + * @param workloadVpnConfiguration the workloadVpnConfiguration value to set. + * @return the ManagementNetworkConfigurationPatchableProperties object itself. + */ + public ManagementNetworkConfigurationPatchableProperties withWorkloadVpnConfiguration( + VpnConfigurationPatchableProperties workloadVpnConfiguration) { + this.workloadVpnConfiguration = workloadVpnConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (infrastructureVpnConfiguration() != null) { + infrastructureVpnConfiguration().validate(); + } + if (workloadVpnConfiguration() != null) { + workloadVpnConfiguration().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationProperties.java similarity index 69% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfiguration.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationProperties.java index 66ef5efddb09b..fd4163521383d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ManagementNetworkConfigurationProperties.java @@ -10,25 +10,25 @@ /** Configuration to be used to setup the management network. */ @Fluent -public final class ManagementNetworkConfiguration { +public final class ManagementNetworkConfigurationProperties { /* - * Configuration for infrastructure vpn. + * VPN Configuration properties. */ @JsonProperty(value = "infrastructureVpnConfiguration", required = true) private VpnConfigurationProperties infrastructureVpnConfiguration; /* - * Configuration for workload vpn. + * VPN Configuration properties. */ @JsonProperty(value = "workloadVpnConfiguration", required = true) private VpnConfigurationProperties workloadVpnConfiguration; - /** Creates an instance of ManagementNetworkConfiguration class. */ - public ManagementNetworkConfiguration() { + /** Creates an instance of ManagementNetworkConfigurationProperties class. */ + public ManagementNetworkConfigurationProperties() { } /** - * Get the infrastructureVpnConfiguration property: Configuration for infrastructure vpn. + * Get the infrastructureVpnConfiguration property: VPN Configuration properties. * * @return the infrastructureVpnConfiguration value. */ @@ -37,19 +37,19 @@ public VpnConfigurationProperties infrastructureVpnConfiguration() { } /** - * Set the infrastructureVpnConfiguration property: Configuration for infrastructure vpn. + * Set the infrastructureVpnConfiguration property: VPN Configuration properties. * * @param infrastructureVpnConfiguration the infrastructureVpnConfiguration value to set. - * @return the ManagementNetworkConfiguration object itself. + * @return the ManagementNetworkConfigurationProperties object itself. */ - public ManagementNetworkConfiguration withInfrastructureVpnConfiguration( + public ManagementNetworkConfigurationProperties withInfrastructureVpnConfiguration( VpnConfigurationProperties infrastructureVpnConfiguration) { this.infrastructureVpnConfiguration = infrastructureVpnConfiguration; return this; } /** - * Get the workloadVpnConfiguration property: Configuration for workload vpn. + * Get the workloadVpnConfiguration property: VPN Configuration properties. * * @return the workloadVpnConfiguration value. */ @@ -58,12 +58,12 @@ public VpnConfigurationProperties workloadVpnConfiguration() { } /** - * Set the workloadVpnConfiguration property: Configuration for workload vpn. + * Set the workloadVpnConfiguration property: VPN Configuration properties. * * @param workloadVpnConfiguration the workloadVpnConfiguration value to set. - * @return the ManagementNetworkConfiguration object itself. + * @return the ManagementNetworkConfigurationProperties object itself. */ - public ManagementNetworkConfiguration withWorkloadVpnConfiguration( + public ManagementNetworkConfigurationProperties withWorkloadVpnConfiguration( VpnConfigurationProperties workloadVpnConfiguration) { this.workloadVpnConfiguration = workloadVpnConfiguration; return this; @@ -80,7 +80,7 @@ public void validate() { .logExceptionAsError( new IllegalArgumentException( "Missing required property infrastructureVpnConfiguration in model" - + " ManagementNetworkConfiguration")); + + " ManagementNetworkConfigurationProperties")); } else { infrastructureVpnConfiguration().validate(); } @@ -88,11 +88,12 @@ public void validate() { throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property workloadVpnConfiguration in model ManagementNetworkConfiguration")); + "Missing required property workloadVpnConfiguration in model" + + " ManagementNetworkConfigurationProperties")); } else { workloadVpnConfiguration().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(ManagementNetworkConfiguration.class); + private static final ClientLogger LOGGER = new ClientLogger(ManagementNetworkConfigurationProperties.class); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddress.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddress.java index 25ec50bab3ea5..f7d789888ed29 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddress.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborAddress.java @@ -17,10 +17,10 @@ public final class NeighborAddress { private String address; /* - * OperationalState of the NeighborAddress. + * Configuration state of the resource. */ - @JsonProperty(value = "operationalState", access = JsonProperty.Access.WRITE_ONLY) - private String operationalState; + @JsonProperty(value = "configurationState", access = JsonProperty.Access.WRITE_ONLY) + private ConfigurationState configurationState; /** Creates an instance of NeighborAddress class. */ public NeighborAddress() { @@ -47,12 +47,12 @@ public NeighborAddress withAddress(String address) { } /** - * Get the operationalState property: OperationalState of the NeighborAddress. + * Get the configurationState property: Configuration state of the resource. * - * @return the operationalState value. + * @return the configurationState value. */ - public String operationalState() { - return this.operationalState; + public ConfigurationState configurationState() { + return this.configurationState; } /** diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroup.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroup.java new file mode 100644 index 0000000000000..d810430fee163 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroup.java @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of NeighborGroup. */ +public interface NeighborGroup { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the networkTapIds property: List of NetworkTap IDs where neighbor group is associated. + * + * @return the networkTapIds value. + */ + List networkTapIds(); + + /** + * Gets the networkTapRuleIds property: List of Network Tap Rule IDs where neighbor group is associated. + * + * @return the networkTapRuleIds value. + */ + List networkTapRuleIds(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * + * @return the destination value. + */ + NeighborGroupDestination destination(); + + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner object. + * + * @return the inner object. + */ + NeighborGroupInner innerModel(); + + /** The entirety of the NeighborGroup definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The NeighborGroup definition stages. */ + interface DefinitionStages { + /** The first stage of the NeighborGroup definition. */ + interface Blank extends WithLocation { + } + /** The stage of the NeighborGroup definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + /** The stage of the NeighborGroup definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the NeighborGroup definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithDestination, DefinitionStages.WithAnnotation { + /** + * Executes the create request. + * + * @return the created resource. + */ + NeighborGroup create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + NeighborGroup create(Context context); + } + /** The stage of the NeighborGroup definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the NeighborGroup definition allowing to specify destination. */ + interface WithDestination { + /** + * Specifies the destination property: An array of destination IPv4 Addresses or IPv6 Addresses.. + * + * @param destination An array of destination IPv4 Addresses or IPv6 Addresses. + * @return the next definition stage. + */ + WithCreate withDestination(NeighborGroupDestination destination); + } + /** The stage of the NeighborGroup definition allowing to specify annotation. */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + WithCreate withAnnotation(String annotation); + } + } + /** + * Begins update for the NeighborGroup resource. + * + * @return the stage of resource update. + */ + NeighborGroup.Update update(); + + /** The template for NeighborGroup update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithDestination, UpdateStages.WithAnnotation { + /** + * Executes the update request. + * + * @return the updated resource. + */ + NeighborGroup apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + NeighborGroup apply(Context context); + } + /** The NeighborGroup update stages. */ + interface UpdateStages { + /** The stage of the NeighborGroup update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** The stage of the NeighborGroup update allowing to specify destination. */ + interface WithDestination { + /** + * Specifies the destination property: An array of destination IPv4 Addresses or IPv6 Addresses.. + * + * @param destination An array of destination IPv4 Addresses or IPv6 Addresses. + * @return the next definition stage. + */ + Update withDestination(NeighborGroupDestination destination); + } + /** The stage of the NeighborGroup update allowing to specify annotation. */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + Update withAnnotation(String annotation); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + NeighborGroup refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + NeighborGroup refresh(Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestination.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestination.java new file mode 100644 index 0000000000000..9bd8b835e8310 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupDestination.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** An array of destination IPv4 Addresses or IPv6 Addresses. */ +@Fluent +public final class NeighborGroupDestination { + /* + * Array of IPv4 Addresses. + */ + @JsonProperty(value = "ipv4Addresses") + private List ipv4Addresses; + + /* + * Array of IPv6 Addresses. + */ + @JsonProperty(value = "ipv6Addresses") + private List ipv6Addresses; + + /** Creates an instance of NeighborGroupDestination class. */ + public NeighborGroupDestination() { + } + + /** + * Get the ipv4Addresses property: Array of IPv4 Addresses. + * + * @return the ipv4Addresses value. + */ + public List ipv4Addresses() { + return this.ipv4Addresses; + } + + /** + * Set the ipv4Addresses property: Array of IPv4 Addresses. + * + * @param ipv4Addresses the ipv4Addresses value to set. + * @return the NeighborGroupDestination object itself. + */ + public NeighborGroupDestination withIpv4Addresses(List ipv4Addresses) { + this.ipv4Addresses = ipv4Addresses; + return this; + } + + /** + * Get the ipv6Addresses property: Array of IPv6 Addresses. + * + * @return the ipv6Addresses value. + */ + public List ipv6Addresses() { + return this.ipv6Addresses; + } + + /** + * Set the ipv6Addresses property: Array of IPv6 Addresses. + * + * @param ipv6Addresses the ipv6Addresses value to set. + * @return the NeighborGroupDestination object itself. + */ + public NeighborGroupDestination withIpv6Addresses(List ipv6Addresses) { + this.ipv6Addresses = ipv6Addresses; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatch.java new file mode 100644 index 0000000000000..6d7f9e7fcf1dd --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatch.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupPatchProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The Neighbor Group Patch definition. */ +@Fluent +public final class NeighborGroupPatch extends TagsUpdate { + /* + * Neighbor Group Patch properties. + */ + @JsonProperty(value = "properties") + private NeighborGroupPatchProperties innerProperties; + + /** Creates an instance of NeighborGroupPatch class. */ + public NeighborGroupPatch() { + } + + /** + * Get the innerProperties property: Neighbor Group Patch properties. + * + * @return the innerProperties value. + */ + private NeighborGroupPatchProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public NeighborGroupPatch withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * + * @return the destination value. + */ + public NeighborGroupDestination destination() { + return this.innerProperties() == null ? null : this.innerProperties().destination(); + } + + /** + * Set the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * + * @param destination the destination value to set. + * @return the NeighborGroupPatch object itself. + */ + public NeighborGroupPatch withDestination(NeighborGroupDestination destination) { + if (this.innerProperties() == null) { + this.innerProperties = new NeighborGroupPatchProperties(); + } + this.innerProperties().withDestination(destination); + return this; + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NeighborGroupPatch object itself. + */ + public NeighborGroupPatch withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NeighborGroupPatchProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatchableProperties.java new file mode 100644 index 0000000000000..c70192511f8b4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupPatchableProperties.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Neighbor Group Patchable Properties defines the patchable properties of the resource. */ +@Fluent +public class NeighborGroupPatchableProperties { + /* + * An array of destination IPv4 Addresses or IPv6 Addresses. + */ + @JsonProperty(value = "destination") + private NeighborGroupDestination destination; + + /** Creates an instance of NeighborGroupPatchableProperties class. */ + public NeighborGroupPatchableProperties() { + } + + /** + * Get the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * + * @return the destination value. + */ + public NeighborGroupDestination destination() { + return this.destination; + } + + /** + * Set the destination property: An array of destination IPv4 Addresses or IPv6 Addresses. + * + * @param destination the destination value to set. + * @return the NeighborGroupPatchableProperties object itself. + */ + public NeighborGroupPatchableProperties withDestination(NeighborGroupDestination destination) { + this.destination = destination; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (destination() != null) { + destination().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroups.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroups.java new file mode 100644 index 0000000000000..50ff9d5fa1202 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroups.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of NeighborGroups. */ +public interface NeighborGroups { + /** + * Retrieves details of neighbor Group using GET method. + * + *

Gets the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Neighbor Group along with {@link Response}. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String neighborGroupName, Context context); + + /** + * Retrieves details of neighbor Group using GET method. + * + *

Gets the Neighbor Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Neighbor Group. + */ + NeighborGroup getByResourceGroup(String resourceGroupName, String neighborGroupName); + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String neighborGroupName); + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param neighborGroupName Name of the Neighbor Group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String neighborGroupName, Context context); + + /** + * List Neighbor Groups by resource group. + * + *

Displays NeighborGroups list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List Neighbor Groups by resource group. + * + *

Displays NeighborGroups list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List Neighbor Groups by subscription. + * + *

Displays NeighborGroups list by subscription GET method. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List Neighbor Groups by subscription. + * + *

Displays NeighborGroups list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Neighbor Group as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Retrieves details of neighbor Group using GET method. + * + *

Gets the Neighbor Group. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Neighbor Group along with {@link Response}. + */ + NeighborGroup getById(String id); + + /** + * Retrieves details of neighbor Group using GET method. + * + *

Gets the Neighbor Group. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Neighbor Group along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a Neighbor Group. + * + *

Implements Neighbor Group DELETE method. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new NeighborGroup resource. + * + * @param name resource name. + * @return the first stage of the new NeighborGroup definition. + */ + NeighborGroup.DefinitionStages.Blank define(String name); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupsListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupsListResult.java new file mode 100644 index 0000000000000..f26ca5dee544a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NeighborGroupsListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NeighborGroupInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of Neighbor Group. */ +@Fluent +public final class NeighborGroupsListResult { + /* + * List of Neighbor Group resources. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Url to follow for getting next page of resources. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of NeighborGroupsListResult class. */ + public NeighborGroupsListResult() { + } + + /** + * Get the value property: List of Neighbor Group resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of Neighbor Group resources. + * + * @param value the value value to set. + * @return the NeighborGroupsListResult object itself. + */ + public NeighborGroupsListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Url to follow for getting next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Url to follow for getting next page of resources. + * + * @param nextLink the nextLink value to set. + * @return the NeighborGroupsListResult object itself. + */ + public NeighborGroupsListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevice.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevice.java index 797c8dd38f0b1..520961e4b99a3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevice.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevice.java @@ -8,7 +8,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; -import java.util.List; import java.util.Map; /** An immutable client-side representation of NetworkDevice. */ @@ -70,36 +69,64 @@ public interface NetworkDevice { String networkDeviceSku(); /** - * Gets the networkDeviceRole property: networkDeviceRole is the device role: Example: CE | ToR. + * Gets the networkDeviceRole property: NetworkDeviceRole is the device role: Example: CE | ToR. * * @return the networkDeviceRole value. */ - NetworkDeviceRoleTypes networkDeviceRole(); + NetworkDeviceRole networkDeviceRole(); /** - * Gets the provisioningState property: Gets the provisioning state of the resource. + * Gets the networkRackId property: Reference to network rack resource id. + * + * @return the networkRackId value. + */ + String networkRackId(); + + /** + * Gets the managementIpv4Address property: Management IPv4 Address. + * + * @return the managementIpv4Address value. + */ + String managementIpv4Address(); + + /** + * Gets the managementIpv6Address property: Management IPv6 Address. + * + * @return the managementIpv6Address value. + */ + String managementIpv6Address(); + + /** + * Gets the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** - * Gets the networkRackId property: Reference to network rack resource id. + * Gets the administrativeState property: Administrative state of the resource. * - * @return the networkRackId value. + * @return the administrativeState value. */ - String networkRackId(); + AdministrativeState administrativeState(); /** - * Gets the hostname property: The host Name of the device. + * Gets the hostname property: The host name of the device. * * @return the hostname value. */ String hostname(); /** - * Gets the serialNumber property: serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: - * Arista;DCS-7280DR3-24;12.05;JPE21116969. + * Gets the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. * * @return the serialNumber value. */ @@ -187,7 +214,6 @@ interface WithResourceGroup { interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithNetworkDeviceSku, - DefinitionStages.WithNetworkDeviceRole, DefinitionStages.WithHostname, DefinitionStages.WithSerialNumber, DefinitionStages.WithAnnotation { @@ -226,22 +252,12 @@ interface WithNetworkDeviceSku { */ WithCreate withNetworkDeviceSku(String networkDeviceSku); } - /** The stage of the NetworkDevice definition allowing to specify networkDeviceRole. */ - interface WithNetworkDeviceRole { - /** - * Specifies the networkDeviceRole property: networkDeviceRole is the device role: Example: CE | ToR.. - * - * @param networkDeviceRole networkDeviceRole is the device role: Example: CE | ToR. - * @return the next definition stage. - */ - WithCreate withNetworkDeviceRole(NetworkDeviceRoleTypes networkDeviceRole); - } /** The stage of the NetworkDevice definition allowing to specify hostname. */ interface WithHostname { /** - * Specifies the hostname property: The host Name of the device.. + * Specifies the hostname property: The host name of the device.. * - * @param hostname The host Name of the device. + * @param hostname The host name of the device. * @return the next definition stage. */ WithCreate withHostname(String hostname); @@ -249,11 +265,11 @@ interface WithHostname { /** The stage of the NetworkDevice definition allowing to specify serialNumber. */ interface WithSerialNumber { /** - * Specifies the serialNumber property: serialNumber of the format - * Make;Model;HardwareRevisionId;SerialNumber. Example: Arista;DCS-7280DR3-24;12.05;JPE21116969. + * Specifies the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber.. * - * @param serialNumber serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: - * Arista;DCS-7280DR3-24;12.05;JPE21116969. + * @param serialNumber Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. * @return the next definition stage. */ WithCreate withSerialNumber(String serialNumber); @@ -302,9 +318,9 @@ interface UpdateStages { /** The stage of the NetworkDevice update allowing to specify tags. */ interface WithTags { /** - * Specifies the tags property: Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags. * - * @param tags Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); @@ -312,9 +328,9 @@ interface WithTags { /** The stage of the NetworkDevice update allowing to specify hostname. */ interface WithHostname { /** - * Specifies the hostname property: The host Name of the device.. + * Specifies the hostname property: The host name of the device.. * - * @param hostname The host Name of the device. + * @param hostname The host name of the device. * @return the next definition stage. */ Update withHostname(String hostname); @@ -322,11 +338,11 @@ interface WithHostname { /** The stage of the NetworkDevice update allowing to specify serialNumber. */ interface WithSerialNumber { /** - * Specifies the serialNumber property: serialNumber of the format - * Make;Model;HardwareRevisionId;SerialNumber. Example: Arista;DCS-7280DR3-24;12.05;JPE21116969. + * Specifies the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber.. * - * @param serialNumber serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: - * Arista;DCS-7280DR3-24;12.05;JPE21116969. + * @param serialNumber Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. * @return the next definition stage. */ Update withSerialNumber(String serialNumber); @@ -362,188 +378,104 @@ interface WithAnnotation { * *

Reboot the Network Device. * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void reboot(); - - /** - * Implements the operation to the underlying resources. - * - *

Reboot the Network Device. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void reboot(Context context); - - /** - * Restores the configuration to last applied good configuration from Azure. - * - *

Restore the configuration of the Network Device resource to last known good configuration. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void restoreConfig(); - - /** - * Restores the configuration to last applied good configuration from Azure. - * - *

Restore the configuration of the Network Device resource to last known good configuration. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void restoreConfig(Context context); - - /** - * Implements SKU version upgrade of network device. - * - *

Update the SKU version of the Network Device resource. - * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateVersion(UpdateVersionProperties body); + CommonPostActionResponseForStateUpdate reboot(RebootProperties body); /** - * Implements SKU version upgrade of network device. + * Implements the operation to the underlying resources. * - *

Update the SKU version of the Network Device resource. + *

Reboot the Network Device. * * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateVersion(UpdateVersionProperties body, Context context); + CommonPostActionResponseForStateUpdate reboot(RebootProperties body, Context context); /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Refreshes the configuration the Network Device. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return generate support package post action properties. + * @return common response for the state updates. */ - SupportPackageProperties generateSupportPackage(); + CommonPostActionResponseForStateUpdate refreshConfiguration(); /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Refreshes the configuration the Network Device. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return generate support package post action properties. + * @return common response for the state updates. */ - SupportPackageProperties generateSupportPackage(Context context); + CommonPostActionResponseForStateUpdate refreshConfiguration(Context context); /** * Implements the operation to the underlying resources. * - *

Update PDU power cycle of the Network Device. + *

Updates the Administrative state of the Network Device. * * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updatePowerCycle(UpdatePowerCycleProperties body); + CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateDeviceAdministrativeState body); /** * Implements the operation to the underlying resources. * - *

Update PDU power cycle of the Network Device. + *

Updates the Administrative state of the Network Device. * * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updatePowerCycle(UpdatePowerCycleProperties body, Context context); - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Device. - */ - GetDeviceStatusProperties getStatus(); - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Device. - */ - GetDeviceStatusProperties getStatus(Context context); - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the static interface maps for the given Network Device. - */ - List getStaticInterfaceMaps(); - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the static interface maps for the given Network Device. - */ - List getStaticInterfaceMaps(Context context); + CommonPostActionResponseForStateUpdate updateAdministrativeState( + UpdateDeviceAdministrativeState body, Context context); /** * Implements the operation to the underlying resources. * - *

Get the dynamic interface maps for the given Network Device. + *

Upgrades the version of the Network Device. * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the dynamic interface maps for the given Network Device. + * @return common response for the state updates. */ - List getDynamicInterfaceMaps(); + CommonPostActionResponseForStateUpdate upgrade(UpdateVersion body); /** * Implements the operation to the underlying resources. * - *

Get the dynamic interface maps for the given Network Device. + *

Upgrades the version of the Network Device. * + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the dynamic interface maps for the given Network Device. + * @return common response for the state updates. */ - List getDynamicInterfaceMaps(Context context); + CommonPostActionResponseForStateUpdate upgrade(UpdateVersion body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchParameters.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchParameters.java index e9f5256b0478f..abcc9d47e6b7b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchParameters.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchParameters.java @@ -6,26 +6,18 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDevicePatchParametersProperties; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The NetworkDevicePatchParameters resource definition. */ +/** The Network Device Patch Parameters defines the patch parameters of the resource. */ @Fluent -public final class NetworkDevicePatchParameters { +public final class NetworkDevicePatchParameters extends TagsUpdate { /* * Network Device Patch properties. */ @JsonProperty(value = "properties") private NetworkDevicePatchParametersProperties innerProperties; - /* - * Azure resource tags that will replace the existing ones. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - /** Creates an instance of NetworkDevicePatchParameters class. */ public NetworkDevicePatchParameters() { } @@ -39,28 +31,15 @@ private NetworkDevicePatchParametersProperties innerProperties() { return this.innerProperties; } - /** - * Get the tags property: Azure resource tags that will replace the existing ones. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Azure resource tags that will replace the existing ones. - * - * @param tags the tags value to set. - * @return the NetworkDevicePatchParameters object itself. - */ + /** {@inheritDoc} */ + @Override public NetworkDevicePatchParameters withTags(Map tags) { - this.tags = tags; + super.withTags(tags); return this; } /** - * Get the hostname property: The host Name of the device. + * Get the hostname property: The host name of the device. * * @return the hostname value. */ @@ -69,7 +48,7 @@ public String hostname() { } /** - * Set the hostname property: The host Name of the device. + * Set the hostname property: The host name of the device. * * @param hostname the hostname value to set. * @return the NetworkDevicePatchParameters object itself. @@ -83,8 +62,8 @@ public NetworkDevicePatchParameters withHostname(String hostname) { } /** - * Get the serialNumber property: serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: - * Arista;DCS-7280DR3-24;12.05;JPE21116969. + * Get the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. * * @return the serialNumber value. */ @@ -93,8 +72,8 @@ public String serialNumber() { } /** - * Set the serialNumber property: serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: - * Arista;DCS-7280DR3-24;12.05;JPE21116969. + * Set the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. * * @param serialNumber the serialNumber value to set. * @return the NetworkDevicePatchParameters object itself. @@ -135,7 +114,9 @@ public NetworkDevicePatchParameters withAnnotation(String annotation) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { + super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchableProperties.java index 74ad53686dfc3..7b1aaafdddbf5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchableProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevicePatchableProperties.java @@ -11,14 +11,13 @@ @Fluent public class NetworkDevicePatchableProperties { /* - * The host Name of the device. + * The host name of the device. */ @JsonProperty(value = "hostName") private String hostname; /* - * 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. */ @JsonProperty(value = "serialNumber") private String serialNumber; @@ -28,7 +27,7 @@ public NetworkDevicePatchableProperties() { } /** - * Get the hostname property: The host Name of the device. + * Get the hostname property: The host name of the device. * * @return the hostname value. */ @@ -37,7 +36,7 @@ public String hostname() { } /** - * Set the hostname property: The host Name of the device. + * Set the hostname property: The host name of the device. * * @param hostname the hostname value to set. * @return the NetworkDevicePatchableProperties object itself. @@ -48,8 +47,8 @@ public NetworkDevicePatchableProperties withHostname(String hostname) { } /** - * Get the serialNumber property: serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: - * Arista;DCS-7280DR3-24;12.05;JPE21116969. + * Get the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. * * @return the serialNumber value. */ @@ -58,8 +57,8 @@ public String serialNumber() { } /** - * Set the serialNumber property: serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: - * Arista;DCS-7280DR3-24;12.05;JPE21116969. + * Set the serialNumber property: Serial number of the device. Format of serial Number - + * Make;Model;HardwareRevisionId;SerialNumber. * * @param serialNumber the serialNumber value to set. * @return the NetworkDevicePatchableProperties object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRackRoleType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRackRoleType.java deleted file mode 100644 index 6190a24f10556..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRackRoleType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Role for the network device. */ -public final class NetworkDeviceRackRoleType extends ExpandableStringEnum { - /** Static value CE for NetworkDeviceRackRoleType. */ - public static final NetworkDeviceRackRoleType CE = fromString("CE"); - - /** Static value ToR for NetworkDeviceRackRoleType. */ - public static final NetworkDeviceRackRoleType TOR = fromString("ToR"); - - /** Static value NPB for NetworkDeviceRackRoleType. */ - public static final NetworkDeviceRackRoleType NPB = fromString("NPB"); - - /** Static value TS for NetworkDeviceRackRoleType. */ - public static final NetworkDeviceRackRoleType TS = fromString("TS"); - - /** Static value Management for NetworkDeviceRackRoleType. */ - public static final NetworkDeviceRackRoleType MANAGEMENT = fromString("Management"); - - /** - * Creates a new instance of NetworkDeviceRackRoleType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkDeviceRackRoleType() { - } - - /** - * Creates or finds a NetworkDeviceRackRoleType from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkDeviceRackRoleType. - */ - @JsonCreator - public static NetworkDeviceRackRoleType fromString(String name) { - return fromString(name, NetworkDeviceRackRoleType.class); - } - - /** - * Gets known NetworkDeviceRackRoleType values. - * - * @return known NetworkDeviceRackRoleType values. - */ - public static Collection values() { - return values(NetworkDeviceRackRoleType.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRole.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRole.java new file mode 100644 index 0000000000000..5c8b1a410511e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRole.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** NetworkDeviceRole is the device role: Example: CE | ToR. */ +public final class NetworkDeviceRole extends ExpandableStringEnum { + /** Static value CE for NetworkDeviceRole. */ + public static final NetworkDeviceRole CE = fromString("CE"); + + /** Static value ToR for NetworkDeviceRole. */ + public static final NetworkDeviceRole TOR = fromString("ToR"); + + /** Static value NPB for NetworkDeviceRole. */ + public static final NetworkDeviceRole NPB = fromString("NPB"); + + /** Static value TS for NetworkDeviceRole. */ + public static final NetworkDeviceRole TS = fromString("TS"); + + /** Static value Management for NetworkDeviceRole. */ + public static final NetworkDeviceRole MANAGEMENT = fromString("Management"); + + /** + * Creates a new instance of NetworkDeviceRole value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkDeviceRole() { + } + + /** + * Creates or finds a NetworkDeviceRole from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkDeviceRole. + */ + @JsonCreator + public static NetworkDeviceRole fromString(String name) { + return fromString(name, NetworkDeviceRole.class); + } + + /** + * Gets known NetworkDeviceRole values. + * + * @return known NetworkDeviceRole values. + */ + public static Collection values() { + return values(NetworkDeviceRole.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleProperties.java deleted file mode 100644 index 1aeea9beed5bc..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleProperties.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Network device properties / role for the Network Rack. */ -@Fluent -public final class NetworkDeviceRoleProperties { - /* - * Name of the associated Network Device SKU. - */ - @JsonProperty(value = "networkDeviceSkuName") - private String networkDeviceSkuName; - - /* - * Role for the network device. - */ - @JsonProperty(value = "roleType") - private NetworkDeviceRackRoleType roleType; - - /* - * Rack slot for the network device. - */ - @JsonProperty(value = "rackSlot") - private Integer rackSlot; - - /** Creates an instance of NetworkDeviceRoleProperties class. */ - public NetworkDeviceRoleProperties() { - } - - /** - * Get the networkDeviceSkuName property: Name of the associated Network Device SKU. - * - * @return the networkDeviceSkuName value. - */ - public String networkDeviceSkuName() { - return this.networkDeviceSkuName; - } - - /** - * Set the networkDeviceSkuName property: Name of the associated Network Device SKU. - * - * @param networkDeviceSkuName the networkDeviceSkuName value to set. - * @return the NetworkDeviceRoleProperties object itself. - */ - public NetworkDeviceRoleProperties withNetworkDeviceSkuName(String networkDeviceSkuName) { - this.networkDeviceSkuName = networkDeviceSkuName; - return this; - } - - /** - * Get the roleType property: Role for the network device. - * - * @return the roleType value. - */ - public NetworkDeviceRackRoleType roleType() { - return this.roleType; - } - - /** - * Set the roleType property: Role for the network device. - * - * @param roleType the roleType value to set. - * @return the NetworkDeviceRoleProperties object itself. - */ - public NetworkDeviceRoleProperties withRoleType(NetworkDeviceRackRoleType roleType) { - this.roleType = roleType; - return this; - } - - /** - * Get the rackSlot property: Rack slot for the network device. - * - * @return the rackSlot value. - */ - public Integer rackSlot() { - return this.rackSlot; - } - - /** - * Set the rackSlot property: Rack slot for the network device. - * - * @param rackSlot the rackSlot value to set. - * @return the NetworkDeviceRoleProperties object itself. - */ - public NetworkDeviceRoleProperties withRackSlot(Integer rackSlot) { - this.rackSlot = rackSlot; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleTypes.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleTypes.java deleted file mode 100644 index 91e736618b217..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceRoleTypes.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Available roles for the network device. */ -public final class NetworkDeviceRoleTypes extends ExpandableStringEnum { - /** Static value CE for NetworkDeviceRoleTypes. */ - public static final NetworkDeviceRoleTypes CE = fromString("CE"); - - /** Static value ToR for NetworkDeviceRoleTypes. */ - public static final NetworkDeviceRoleTypes TOR = fromString("ToR"); - - /** Static value NPB for NetworkDeviceRoleTypes. */ - public static final NetworkDeviceRoleTypes NPB = fromString("NPB"); - - /** Static value TS for NetworkDeviceRoleTypes. */ - public static final NetworkDeviceRoleTypes TS = fromString("TS"); - - /** Static value Management for NetworkDeviceRoleTypes. */ - public static final NetworkDeviceRoleTypes MANAGEMENT = fromString("Management"); - - /** - * Creates a new instance of NetworkDeviceRoleTypes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkDeviceRoleTypes() { - } - - /** - * Creates or finds a NetworkDeviceRoleTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkDeviceRoleTypes. - */ - @JsonCreator - public static NetworkDeviceRoleTypes fromString(String name) { - return fromString(name, NetworkDeviceRoleTypes.class); - } - - /** - * Gets known NetworkDeviceRoleTypes values. - * - * @return known NetworkDeviceRoleTypes values. - */ - public static Collection values() { - return values(NetworkDeviceRoleTypes.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSku.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSku.java index 236bccad4bc5f..129fc35fc95bf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSku.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSku.java @@ -53,19 +53,12 @@ public interface NetworkDeviceSku { String manufacturer(); /** - * Gets the supportedVersions property: List of network device interfaces. + * Gets the supportedVersions property: List of supported version details of network device. * * @return the supportedVersions value. */ List supportedVersions(); - /** - * Gets the limits property: Network device limits. - * - * @return the limits value. - */ - DeviceLimits limits(); - /** * Gets the supportedRoleTypes property: Available roles for the network device. * @@ -81,7 +74,7 @@ public interface NetworkDeviceSku { List interfaces(); /** - * Gets the provisioningState property: Gets the provisioning state of the resource. + * Gets the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkus.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkus.java index b30b9889bd00d..fbd5fc125b89b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkus.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkus.java @@ -13,43 +13,43 @@ public interface NetworkDeviceSkus { /** * Gets a Network Device Sku. * - *

Get Network Device SKU details. + *

Get a Network Device SKU details. * - * @param networkDeviceSkuName Name of the Network Device Sku. + * @param networkDeviceSkuName Name of the Network Device SKU. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Device SKU details along with {@link Response}. + * @return a Network Device SKU details along with {@link Response}. */ Response getWithResponse(String networkDeviceSkuName, Context context); /** * Gets a Network Device Sku. * - *

Get Network Device SKU details. + *

Get a Network Device SKU details. * - * @param networkDeviceSkuName Name of the Network Device Sku. + * @param networkDeviceSkuName Name of the Network Device SKU. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Device SKU details. + * @return a Network Device SKU details. */ NetworkDeviceSku get(String networkDeviceSkuName); /** - * List NetworkDeviceSkus by subscription. + * List Network Device SKUs by subscription. * *

List Network Device SKUs for the given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDeviceSkus as paginated response with {@link PagedIterable}. + * @return list of Network Device SKUs as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List NetworkDeviceSkus by subscription. + * List Network Device SKUs by subscription. * *

List Network Device SKUs for the given subscription. * @@ -57,7 +57,7 @@ public interface NetworkDeviceSkus { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkDeviceSkus as paginated response with {@link PagedIterable}. + * @return list of Network Device SKUs as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkusListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkusListResult.java index 31628d598c7c2..8168d88250471 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkusListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDeviceSkusListResult.java @@ -9,11 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of NetworkDeviceSkus. */ +/** List of Network Device SKUs. */ @Fluent public final class NetworkDeviceSkusListResult { /* - * List of NetworkDeviceSku resources. + * List of Network Device SKU resources. */ @JsonProperty(value = "value") private List value; @@ -29,7 +29,7 @@ public NetworkDeviceSkusListResult() { } /** - * Get the value property: List of NetworkDeviceSku resources. + * Get the value property: List of Network Device SKU resources. * * @return the value value. */ @@ -38,7 +38,7 @@ public List value() { } /** - * Set the value property: List of NetworkDeviceSku resources. + * Set the value property: List of Network Device SKU resources. * * @param value the value value to set. * @return the NetworkDeviceSkusListResult object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevices.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevices.java index 7084859ef89b0..0da7577abcf18 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevices.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkDevices.java @@ -7,14 +7,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import java.util.List; /** Resource collection API of NetworkDevices. */ public interface NetworkDevices { /** * Gets a Network Device. * - *

Get the Network Device resource details. + *

Gets the Network Device resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. @@ -30,7 +29,7 @@ Response getByResourceGroupWithResponse( /** * Gets a Network Device. * - *

Get the Network Device resource details. + *

Gets the Network Device resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkDeviceName Name of the Network Device. @@ -125,12 +124,15 @@ Response getByResourceGroupWithResponse( *

Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void reboot(String resourceGroupName, String networkDeviceName); + CommonPostActionResponseForStateUpdate reboot( + String resourceGroupName, String networkDeviceName, RebootProperties body); /** * Implements the operation to the underlying resources. @@ -138,226 +140,117 @@ Response getByResourceGroupWithResponse( *

Reboot the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void reboot(String resourceGroupName, String networkDeviceName, Context context); - - /** - * Restores the configuration to last applied good configuration from Azure. - * - *

Restore the configuration of the Network Device resource to last known good configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void restoreConfig(String resourceGroupName, String networkDeviceName); - - /** - * Restores the configuration to last applied good configuration from Azure. - * - *

Restore the configuration of the Network Device resource to last known good configuration. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void restoreConfig(String resourceGroupName, String networkDeviceName, Context context); - - /** - * Implements SKU version upgrade of network device. - * - *

Update the SKU version of the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param body Request payload. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void updateVersion(String resourceGroupName, String networkDeviceName, UpdateVersionProperties body); - - /** - * Implements SKU version upgrade of network device. - * - *

Update the SKU version of the Network Device resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateVersion( - String resourceGroupName, String networkDeviceName, UpdateVersionProperties body, Context context); + CommonPostActionResponseForStateUpdate reboot( + String resourceGroupName, String networkDeviceName, RebootProperties body, Context context); /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return generate support package post action properties. + * @return common response for the state updates. */ - SupportPackageProperties generateSupportPackage(String resourceGroupName, String networkDeviceName); + CommonPostActionResponseForStateUpdate refreshConfiguration(String resourceGroupName, String networkDeviceName); /** * Implements the operation to the underlying resources. * - *

Generate Support Package for the given Network Device. + *

Refreshes the configuration the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return generate support package post action properties. + * @return common response for the state updates. */ - SupportPackageProperties generateSupportPackage( + CommonPostActionResponseForStateUpdate refreshConfiguration( String resourceGroupName, String networkDeviceName, Context context); /** * Implements the operation to the underlying resources. * - *

Update PDU power cycle of the Network Device. + *

Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updatePowerCycle(String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body); + CommonPostActionResponseForStateUpdate updateAdministrativeState( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body); /** * Implements the operation to the underlying resources. * - *

Update PDU power cycle of the Network Device. + *

Updates the Administrative state of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updatePowerCycle( - String resourceGroupName, String networkDeviceName, UpdatePowerCycleProperties body, Context context); - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Device. - */ - GetDeviceStatusProperties getStatus(String resourceGroupName, String networkDeviceName); - - /** - * Gets the running status of the network device. - * - *

Get the running status of the Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Device. - */ - GetDeviceStatusProperties getStatus(String resourceGroupName, String networkDeviceName, Context context); - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the static interface maps for the given Network Device. - */ - List getStaticInterfaceMaps( - String resourceGroupName, String networkDeviceName); - - /** - * Show the interface maps as per the topology. - * - *

Get the static interface maps for the given Network Device. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the static interface maps for the given Network Device. - */ - List getStaticInterfaceMaps( - String resourceGroupName, String networkDeviceName, Context context); + CommonPostActionResponseForStateUpdate updateAdministrativeState( + String resourceGroupName, String networkDeviceName, UpdateDeviceAdministrativeState body, Context context); /** * Implements the operation to the underlying resources. * - *

Get the dynamic interface maps for the given Network Device. + *

Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the dynamic interface maps for the given Network Device. + * @return common response for the state updates. */ - List getDynamicInterfaceMaps( - String resourceGroupName, String networkDeviceName); + CommonPostActionResponseForStateUpdate upgrade( + String resourceGroupName, String networkDeviceName, UpdateVersion body); /** * Implements the operation to the underlying resources. * - *

Get the dynamic interface maps for the given Network Device. + *

Upgrades the version of the Network Device. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. + * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the dynamic interface maps for the given Network Device. + * @return common response for the state updates. */ - List getDynamicInterfaceMaps( - String resourceGroupName, String networkDeviceName, Context context); + CommonPostActionResponseForStateUpdate upgrade( + String resourceGroupName, String networkDeviceName, UpdateVersion body, Context context); /** * Gets a Network Device. * - *

Get the Network Device resource details. + *

Gets the Network Device resource details. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -370,7 +263,7 @@ List getDynamicInterfaceMaps( /** * Gets a Network Device. * - *

Get the Network Device resource details. + *

Gets the Network Device resource details. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabric.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabric.java index 1ff93812a9b7e..a93565bd01e9a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabric.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabric.java @@ -65,11 +65,33 @@ public interface NetworkFabric { String networkFabricSku(); /** - * Gets the rackCount property: Number of racks associated to Network Fabric.Possible values are from 2-8. + * Gets the fabricVersion property: The version of Network Fabric. + * + * @return the fabricVersion value. + */ + String fabricVersion(); + + /** + * Gets the routerIds property: Array of router IDs. + * + * @return the routerIds value. + */ + List routerIds(); + + /** + * Gets the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the NetworkFabric + * belongs. + * + * @return the networkFabricControllerId value. + */ + String networkFabricControllerId(); + + /** + * Gets the rackCount property: Number of compute racks associated to Network Fabric. * * @return the rackCount value. */ - int rackCount(); + Integer rackCount(); /** * Gets the serverCountPerRack property: Number of servers.Possible values are from 1-16. @@ -92,27 +114,12 @@ public interface NetworkFabric { */ String ipv6Prefix(); - /** - * Gets the routerId property: Router Id of CE to be used for MP-BGP between PE and CE. - * - * @return the routerId value. - */ - String routerId(); - /** * Gets the fabricAsn property: ASN of CE devices for CE/PE connectivity. * * @return the fabricAsn value. */ - int fabricAsn(); - - /** - * Gets the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the NetworkFabric - * belongs. - * - * @return the networkFabricControllerId value. - */ - String networkFabricControllerId(); + long fabricAsn(); /** * Gets the terminalServerConfiguration property: Network and credentials configuration currently applied to @@ -127,21 +134,7 @@ public interface NetworkFabric { * * @return the managementNetworkConfiguration value. */ - ManagementNetworkConfiguration managementNetworkConfiguration(); - - /** - * Gets the operationalState property: Gets the operational state of the resource. - * - * @return the operationalState value. - */ - NetworkFabricOperationalState operationalState(); - - /** - * Gets the provisioningState property: Gets the provisioning state of the resource. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); + ManagementNetworkConfigurationProperties managementNetworkConfiguration(); /** * Gets the racks property: List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed @@ -152,19 +145,42 @@ public interface NetworkFabric { List racks(); /** - * Gets the l2IsolationDomains property: List of L2IsolationDomain resource IDs under the Network Fabric. + * Gets the l2IsolationDomains property: List of L2 Isolation Domain resource IDs under the Network Fabric. * * @return the l2IsolationDomains value. */ List l2IsolationDomains(); /** - * Gets the l3IsolationDomains property: List of L3IsolationDomain resource IDs under the Network Fabric. + * Gets the l3IsolationDomains property: List of L3 Isolation Domain resource IDs under the Network Fabric. * * @return the l3IsolationDomains value. */ List l3IsolationDomains(); + /** + * Gets the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + + /** + * Gets the provisioningState property: 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. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + AdministrativeState administrativeState(); + /** * Gets the annotation property: Switch configuration description. * @@ -205,6 +221,13 @@ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, + DefinitionStages.WithNetworkFabricSku, + DefinitionStages.WithNetworkFabricControllerId, + DefinitionStages.WithServerCountPerRack, + DefinitionStages.WithIpv4Prefix, + DefinitionStages.WithFabricAsn, + DefinitionStages.WithTerminalServerConfiguration, + DefinitionStages.WithManagementNetworkConfiguration, DefinitionStages.WithCreate { } /** The NetworkFabric definition stages. */ @@ -238,48 +261,7 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - /** - * The stage of the NetworkFabric definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithNetworkFabricSku, - DefinitionStages.WithRackCount, - DefinitionStages.WithServerCountPerRack, - DefinitionStages.WithIpv4Prefix, - DefinitionStages.WithIpv6Prefix, - DefinitionStages.WithFabricAsn, - DefinitionStages.WithNetworkFabricControllerId, - DefinitionStages.WithTerminalServerConfiguration, - DefinitionStages.WithManagementNetworkConfiguration, - DefinitionStages.WithAnnotation { - /** - * Executes the create request. - * - * @return the created resource. - */ - NetworkFabric create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - NetworkFabric create(Context context); - } - /** The stage of the NetworkFabric definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); + WithNetworkFabricSku withExistingResourceGroup(String resourceGroupName); } /** The stage of the NetworkFabric definition allowing to specify networkFabricSku. */ interface WithNetworkFabricSku { @@ -293,18 +275,19 @@ interface WithNetworkFabricSku { * whether it is a single / multi rack Network Fabric. * @return the next definition stage. */ - WithCreate withNetworkFabricSku(String networkFabricSku); + WithNetworkFabricControllerId withNetworkFabricSku(String networkFabricSku); } - /** The stage of the NetworkFabric definition allowing to specify rackCount. */ - interface WithRackCount { + /** The stage of the NetworkFabric definition allowing to specify networkFabricControllerId. */ + interface WithNetworkFabricControllerId { /** - * Specifies the rackCount property: Number of racks associated to Network Fabric.Possible values are from - * 2-8.. + * Specifies the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the + * NetworkFabric belongs.. * - * @param rackCount Number of racks associated to Network Fabric.Possible values are from 2-8. + * @param networkFabricControllerId Azure resource ID for the NetworkFabricController the NetworkFabric + * belongs. * @return the next definition stage. */ - WithCreate withRackCount(int rackCount); + WithServerCountPerRack withNetworkFabricControllerId(String networkFabricControllerId); } /** The stage of the NetworkFabric definition allowing to specify serverCountPerRack. */ interface WithServerCountPerRack { @@ -314,7 +297,7 @@ interface WithServerCountPerRack { * @param serverCountPerRack Number of servers.Possible values are from 1-16. * @return the next definition stage. */ - WithCreate withServerCountPerRack(int serverCountPerRack); + WithIpv4Prefix withServerCountPerRack(int serverCountPerRack); } /** The stage of the NetworkFabric definition allowing to specify ipv4Prefix. */ interface WithIpv4Prefix { @@ -324,17 +307,7 @@ interface WithIpv4Prefix { * @param ipv4Prefix IPv4Prefix for Management Network. Example: 10.1.0.0/19. * @return the next definition stage. */ - WithCreate withIpv4Prefix(String ipv4Prefix); - } - /** The stage of the NetworkFabric definition allowing to specify ipv6Prefix. */ - interface WithIpv6Prefix { - /** - * Specifies the ipv6Prefix property: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59.. - * - * @param ipv6Prefix IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - * @return the next definition stage. - */ - WithCreate withIpv6Prefix(String ipv6Prefix); + WithFabricAsn withIpv4Prefix(String ipv4Prefix); } /** The stage of the NetworkFabric definition allowing to specify fabricAsn. */ interface WithFabricAsn { @@ -344,19 +317,7 @@ interface WithFabricAsn { * @param fabricAsn ASN of CE devices for CE/PE connectivity. * @return the next definition stage. */ - WithCreate withFabricAsn(int fabricAsn); - } - /** The stage of the NetworkFabric definition allowing to specify networkFabricControllerId. */ - interface WithNetworkFabricControllerId { - /** - * Specifies the networkFabricControllerId property: Azure resource ID for the NetworkFabricController the - * NetworkFabric belongs.. - * - * @param networkFabricControllerId Azure resource ID for the NetworkFabricController the NetworkFabric - * belongs. - * @return the next definition stage. - */ - WithCreate withNetworkFabricControllerId(String networkFabricControllerId); + WithTerminalServerConfiguration withFabricAsn(long fabricAsn); } /** The stage of the NetworkFabric definition allowing to specify terminalServerConfiguration. */ interface WithTerminalServerConfiguration { @@ -368,7 +329,8 @@ interface WithTerminalServerConfiguration { * server. * @return the next definition stage. */ - WithCreate withTerminalServerConfiguration(TerminalServerConfiguration terminalServerConfiguration); + WithManagementNetworkConfiguration withTerminalServerConfiguration( + TerminalServerConfiguration terminalServerConfiguration); } /** The stage of the NetworkFabric definition allowing to specify managementNetworkConfiguration. */ interface WithManagementNetworkConfiguration { @@ -380,7 +342,61 @@ interface WithManagementNetworkConfiguration { * @return the next definition stage. */ WithCreate withManagementNetworkConfiguration( - ManagementNetworkConfiguration managementNetworkConfiguration); + ManagementNetworkConfigurationProperties managementNetworkConfiguration); + } + /** + * The stage of the NetworkFabric definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithRackCount, + DefinitionStages.WithIpv6Prefix, + DefinitionStages.WithAnnotation { + /** + * Executes the create request. + * + * @return the created resource. + */ + NetworkFabric create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + NetworkFabric create(Context context); + } + /** The stage of the NetworkFabric definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the NetworkFabric definition allowing to specify rackCount. */ + interface WithRackCount { + /** + * Specifies the rackCount property: Number of compute racks associated to Network Fabric.. + * + * @param rackCount Number of compute racks associated to Network Fabric. + * @return the next definition stage. + */ + WithCreate withRackCount(Integer rackCount); + } + /** The stage of the NetworkFabric definition allowing to specify ipv6Prefix. */ + interface WithIpv6Prefix { + /** + * Specifies the ipv6Prefix property: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. + * + * @param ipv6Prefix IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. + * @return the next definition stage. + */ + WithCreate withIpv6Prefix(String ipv6Prefix); } /** The stage of the NetworkFabric definition allowing to specify annotation. */ interface WithAnnotation { @@ -402,7 +418,15 @@ interface WithAnnotation { /** The template for NetworkFabric update. */ interface Update - extends UpdateStages.WithTags, UpdateStages.WithTerminalServerConfiguration, UpdateStages.WithAnnotation { + extends UpdateStages.WithTags, + UpdateStages.WithRackCount, + UpdateStages.WithServerCountPerRack, + UpdateStages.WithIpv4Prefix, + UpdateStages.WithIpv6Prefix, + UpdateStages.WithFabricAsn, + UpdateStages.WithTerminalServerConfiguration, + UpdateStages.WithManagementNetworkConfiguration, + UpdateStages.WithAnnotation { /** * Executes the update request. * @@ -423,13 +447,63 @@ interface UpdateStages { /** The stage of the NetworkFabric update allowing to specify tags. */ interface WithTags { /** - * Specifies the tags property: Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags. * - * @param tags Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); } + /** The stage of the NetworkFabric update allowing to specify rackCount. */ + interface WithRackCount { + /** + * Specifies the rackCount property: Number of compute racks associated to Network Fabric.. + * + * @param rackCount Number of compute racks associated to Network Fabric. + * @return the next definition stage. + */ + Update withRackCount(Integer rackCount); + } + /** The stage of the NetworkFabric update allowing to specify serverCountPerRack. */ + interface WithServerCountPerRack { + /** + * Specifies the serverCountPerRack property: Number of servers.Possible values are from 1-16.. + * + * @param serverCountPerRack Number of servers.Possible values are from 1-16. + * @return the next definition stage. + */ + Update withServerCountPerRack(Integer serverCountPerRack); + } + /** The stage of the NetworkFabric update allowing to specify ipv4Prefix. */ + interface WithIpv4Prefix { + /** + * Specifies the ipv4Prefix property: IPv4Prefix for Management Network. Example: 10.1.0.0/19.. + * + * @param ipv4Prefix IPv4Prefix for Management Network. Example: 10.1.0.0/19. + * @return the next definition stage. + */ + Update withIpv4Prefix(String ipv4Prefix); + } + /** The stage of the NetworkFabric update allowing to specify ipv6Prefix. */ + interface WithIpv6Prefix { + /** + * Specifies the ipv6Prefix property: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59.. + * + * @param ipv6Prefix IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. + * @return the next definition stage. + */ + Update withIpv6Prefix(String ipv6Prefix); + } + /** The stage of the NetworkFabric update allowing to specify fabricAsn. */ + interface WithFabricAsn { + /** + * Specifies the fabricAsn property: ASN of CE devices for CE/PE connectivity.. + * + * @param fabricAsn ASN of CE devices for CE/PE connectivity. + * @return the next definition stage. + */ + Update withFabricAsn(Long fabricAsn); + } /** The stage of the NetworkFabric update allowing to specify terminalServerConfiguration. */ interface WithTerminalServerConfiguration { /** @@ -440,7 +514,20 @@ interface WithTerminalServerConfiguration { * server. * @return the next definition stage. */ - Update withTerminalServerConfiguration(TerminalServerPatchableProperties terminalServerConfiguration); + Update withTerminalServerConfiguration( + NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration); + } + /** The stage of the NetworkFabric update allowing to specify managementNetworkConfiguration. */ + interface WithManagementNetworkConfiguration { + /** + * Specifies the managementNetworkConfiguration property: Configuration to be used to setup the management + * network.. + * + * @param managementNetworkConfiguration Configuration to be used to setup the management network. + * @return the next definition stage. + */ + Update withManagementNetworkConfiguration( + ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration); } /** The stage of the NetworkFabric update allowing to specify annotation. */ interface WithAnnotation { @@ -475,8 +562,9 @@ interface WithAnnotation { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ - void provision(); + CommonPostActionResponseForDeviceUpdate provision(); /** * Implements the operation to the underlying resources. @@ -487,8 +575,9 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ - void provision(Context context); + CommonPostActionResponseForDeviceUpdate provision(Context context); /** * Implements the operation to the underlying resources. @@ -497,8 +586,9 @@ interface WithAnnotation { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ - void deprovision(); + CommonPostActionResponseForDeviceUpdate deprovision(); /** * Implements the operation to the underlying resources. @@ -509,6 +599,193 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + CommonPostActionResponseForDeviceUpdate deprovision(Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate upgrade(UpdateVersion body); + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param body Network Fabric properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate upgrade(UpdateVersion body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate refreshConfiguration(); + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate refreshConfiguration(Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration(UpdateAdministrativeState body); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration( + UpdateAdministrativeState body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration(UpdateAdministrativeState body); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration( + UpdateAdministrativeState body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param body Validate configuration properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + ValidateConfigurationResponse validateConfiguration(ValidateConfigurationProperties body); + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param body Validate configuration properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + ValidateConfigurationResponse validateConfiguration(ValidateConfigurationProperties body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return topology of the underlying resources in the given Network Fabric instance. + */ + ValidateConfigurationResponse getTopology(); + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return topology of the underlying resources in the given Network Fabric instance. + */ + ValidateConfigurationResponse getTopology(Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate commitConfiguration(); + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void deprovision(Context context); + CommonPostActionResponseForStateUpdate commitConfiguration(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricController.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricController.java index 777afafdd7ab9..208f00dd734af 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricController.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricController.java @@ -60,14 +60,14 @@ public interface NetworkFabricController { * * @return the infrastructureServices value. */ - InfrastructureServices infrastructureServices(); + ControllerServices infrastructureServices(); /** * Gets the workloadServices property: WorkloadServices IP ranges. * * @return the workloadServices value. */ - WorkloadServices workloadServices(); + ControllerServices workloadServices(); /** * Gets the managedResourceGroupConfiguration property: Managed Resource Group configuration properties. @@ -87,12 +87,28 @@ public interface NetworkFabricController { /** * Gets the workloadManagementNetwork property: 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. + * any other MSFT/Public endpoints. This is used for the backward compatibility. * * @return the workloadManagementNetwork value. */ Boolean workloadManagementNetwork(); + /** + * Gets the isWorkloadManagementNetworkEnabled property: 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. + * + * @return the isWorkloadManagementNetworkEnabled value. + */ + IsWorkloadManagementNetworkEnabled isWorkloadManagementNetworkEnabled(); + + /** + * Gets the tenantInternetGatewayIds property: List of tenant InternetGateway resource IDs. + * + * @return the tenantInternetGatewayIds value. + */ + List tenantInternetGatewayIds(); + /** * Gets the ipv4AddressSpace property: IPv4 Network Fabric Controller Address Space. * @@ -108,12 +124,11 @@ public interface NetworkFabricController { String ipv6AddressSpace(); /** - * Gets the operationalState property: The Operational Status would always be NULL. Look only in to the Provisioning - * state for the latest status. + * Gets the nfcSku property: Network Fabric Controller SKU. * - * @return the operationalState value. + * @return the nfcSku value. */ - NetworkFabricControllerOperationalState operationalState(); + NfcSku nfcSku(); /** * Gets the provisioningState property: Provides you the latest status of the NFC service, whether it is Accepted, @@ -224,8 +239,10 @@ interface WithResourceGroup { interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithManagedResourceGroupConfiguration, + DefinitionStages.WithIsWorkloadManagementNetworkEnabled, DefinitionStages.WithIpv4AddressSpace, DefinitionStages.WithIpv6AddressSpace, + DefinitionStages.WithNfcSku, DefinitionStages.WithInfrastructureExpressRouteConnections, DefinitionStages.WithWorkloadExpressRouteConnections, DefinitionStages.WithAnnotation { @@ -268,6 +285,23 @@ interface WithManagedResourceGroupConfiguration { WithCreate withManagedResourceGroupConfiguration( ManagedResourceGroupConfiguration managedResourceGroupConfiguration); } + /** + * The stage of the NetworkFabricController definition allowing to specify isWorkloadManagementNetworkEnabled. + */ + interface WithIsWorkloadManagementNetworkEnabled { + /** + * Specifies the isWorkloadManagementNetworkEnabled property: 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.. + * + * @param isWorkloadManagementNetworkEnabled 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. + * @return the next definition stage. + */ + WithCreate withIsWorkloadManagementNetworkEnabled( + IsWorkloadManagementNetworkEnabled isWorkloadManagementNetworkEnabled); + } /** The stage of the NetworkFabricController definition allowing to specify ipv4AddressSpace. */ interface WithIpv4AddressSpace { /** @@ -288,6 +322,16 @@ interface WithIpv6AddressSpace { */ WithCreate withIpv6AddressSpace(String ipv6AddressSpace); } + /** The stage of the NetworkFabricController definition allowing to specify nfcSku. */ + interface WithNfcSku { + /** + * Specifies the nfcSku property: Network Fabric Controller SKU.. + * + * @param nfcSku Network Fabric Controller SKU. + * @return the next definition stage. + */ + WithCreate withNfcSku(NfcSku nfcSku); + } /** * The stage of the NetworkFabricController definition allowing to specify * infrastructureExpressRouteConnections. @@ -364,9 +408,9 @@ interface UpdateStages { /** The stage of the NetworkFabricController update allowing to specify tags. */ interface WithTags { /** - * Specifies the tags property: Azure resource tags that will replace the existing ones.. + * Specifies the tags property: Resource tags. * - * @param tags Azure resource tags that will replace the existing ones. + * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); @@ -418,48 +462,4 @@ Update withWorkloadExpressRouteConnections( * @return the refreshed resource. */ NetworkFabricController refresh(Context context); - - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void enableWorkloadManagementNetwork(); - - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void enableWorkloadManagementNetwork(Context context); - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void disableWorkloadManagementNetwork(); - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void disableWorkloadManagementNetwork(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerOperationalState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerOperationalState.java deleted file mode 100644 index 5ab5b8ab0e32a..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerOperationalState.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Operational state for the resource. */ -public final class NetworkFabricControllerOperationalState - extends ExpandableStringEnum { - /** Static value Configuring for NetworkFabricControllerOperationalState. */ - public static final NetworkFabricControllerOperationalState CONFIGURING = fromString("Configuring"); - - /** Static value Succeeded for NetworkFabricControllerOperationalState. */ - public static final NetworkFabricControllerOperationalState SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for NetworkFabricControllerOperationalState. */ - public static final NetworkFabricControllerOperationalState FAILED = fromString("Failed"); - - /** - * Creates a new instance of NetworkFabricControllerOperationalState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkFabricControllerOperationalState() { - } - - /** - * Creates or finds a NetworkFabricControllerOperationalState from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkFabricControllerOperationalState. - */ - @JsonCreator - public static NetworkFabricControllerOperationalState fromString(String name) { - return fromString(name, NetworkFabricControllerOperationalState.class); - } - - /** - * Gets known NetworkFabricControllerOperationalState values. - * - * @return known NetworkFabricControllerOperationalState values. - */ - public static Collection values() { - return values(NetworkFabricControllerOperationalState.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerPatch.java index 6b5518a2ee262..c01376eb345b2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllerPatch.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricControllerPatchableProperties; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -14,10 +13,10 @@ /** * Network Fabric Controller patch parameters * - *

The NetworkFabricControllerPatch payload definition. + *

The Network Fabric Controller Patch payload definition. */ @Fluent -public final class NetworkFabricControllerPatch { +public final class NetworkFabricControllerPatch extends TagsUpdate { /* * Network Fabric Controller updatable properties * @@ -26,13 +25,6 @@ public final class NetworkFabricControllerPatch { @JsonProperty(value = "properties") private NetworkFabricControllerPatchableProperties innerProperties; - /* - * Azure resource tags that will replace the existing ones. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - /** Creates an instance of NetworkFabricControllerPatch class. */ public NetworkFabricControllerPatch() { } @@ -48,23 +40,10 @@ private NetworkFabricControllerPatchableProperties innerProperties() { return this.innerProperties; } - /** - * Get the tags property: Azure resource tags that will replace the existing ones. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Azure resource tags that will replace the existing ones. - * - * @param tags the tags value to set. - * @return the NetworkFabricControllerPatch object itself. - */ + /** {@inheritDoc} */ + @Override public NetworkFabricControllerPatch withTags(Map tags) { - this.tags = tags; + super.withTags(tags); return this; } @@ -129,7 +108,9 @@ public NetworkFabricControllerPatch withWorkloadExpressRouteConnections( * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { + super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllers.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllers.java index 5d02f8c419150..e038f0cf6991d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllers.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllers.java @@ -21,7 +21,7 @@ public interface NetworkFabricControllers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition along with {@link Response}. + * @return the Network Fabric Controller resource definition along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String networkFabricControllerName, Context context); @@ -36,7 +36,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition. + * @return the Network Fabric Controller resource definition. */ NetworkFabricController getByResourceGroup(String resourceGroupName, String networkFabricControllerName); @@ -76,7 +76,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers as paginated response with {@link PagedIterable}. + * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -90,7 +90,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers as paginated response with {@link PagedIterable}. + * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -101,7 +101,7 @@ Response getByResourceGroupWithResponse( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers as paginated response with {@link PagedIterable}. + * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -114,65 +114,10 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricControllers as paginated response with {@link PagedIterable}. + * @return list of Network Fabric Controllers as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void enableWorkloadManagementNetwork(String resourceGroupName, String networkFabricControllerName); - - /** - * Implements the operation to the underlying resources. - * - *

Enables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void enableWorkloadManagementNetwork(String resourceGroupName, String networkFabricControllerName, Context context); - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void disableWorkloadManagementNetwork(String resourceGroupName, String networkFabricControllerName); - - /** - * Implements the operation to the underlying resources. - * - *

Disables the workloadManagementNetwork (Tenant Network). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricControllerName Name of the networkFabricController. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void disableWorkloadManagementNetwork( - String resourceGroupName, String networkFabricControllerName, Context context); - /** * Gets a Network Fabric Controller. * @@ -182,7 +127,7 @@ void disableWorkloadManagementNetwork( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition along with {@link Response}. + * @return the Network Fabric Controller resource definition along with {@link Response}. */ NetworkFabricController getById(String id); @@ -196,7 +141,7 @@ void disableWorkloadManagementNetwork( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricController resource definition along with {@link Response}. + * @return the Network Fabric Controller resource definition along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllersListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllersListResult.java index e698c1329a399..4942cf02ce5e8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllersListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricControllersListResult.java @@ -9,11 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of NetworkFabricControllers. */ +/** List of Network Fabric Controllers. */ @Fluent public final class NetworkFabricControllersListResult { /* - * List of NetworkFabricController resources. + * List of Network Fabric Controller resources. */ @JsonProperty(value = "value") private List value; @@ -29,7 +29,7 @@ public NetworkFabricControllersListResult() { } /** - * Get the value property: List of NetworkFabricController resources. + * Get the value property: List of Network Fabric Controller resources. * * @return the value value. */ @@ -38,7 +38,7 @@ public List value() { } /** - * Set the value property: List of NetworkFabricController resources. + * Set the value property: List of Network Fabric Controller resources. * * @param value the value value to set. * @return the NetworkFabricControllersListResult object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricOperationalState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricOperationalState.java deleted file mode 100644 index d57ac95df8923..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricOperationalState.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Operational state for the resource. */ -public final class NetworkFabricOperationalState extends ExpandableStringEnum { - /** Static value Provisioning for NetworkFabricOperationalState. */ - public static final NetworkFabricOperationalState PROVISIONING = fromString("Provisioning"); - - /** Static value Provisioned for NetworkFabricOperationalState. */ - public static final NetworkFabricOperationalState PROVISIONED = fromString("Provisioned"); - - /** Static value ErrorProvisioning for NetworkFabricOperationalState. */ - public static final NetworkFabricOperationalState ERROR_PROVISIONING = fromString("ErrorProvisioning"); - - /** Static value Deprovisioning for NetworkFabricOperationalState. */ - public static final NetworkFabricOperationalState DEPROVISIONING = fromString("Deprovisioning"); - - /** Static value Deprovisioned for NetworkFabricOperationalState. */ - public static final NetworkFabricOperationalState DEPROVISIONED = fromString("Deprovisioned"); - - /** Static value ErrorDeprovisioning for NetworkFabricOperationalState. */ - public static final NetworkFabricOperationalState ERROR_DEPROVISIONING = fromString("ErrorDeprovisioning"); - - /** Static value DeferredControl for NetworkFabricOperationalState. */ - public static final NetworkFabricOperationalState DEFERRED_CONTROL = fromString("DeferredControl"); - - /** - * Creates a new instance of NetworkFabricOperationalState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkFabricOperationalState() { - } - - /** - * Creates or finds a NetworkFabricOperationalState from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkFabricOperationalState. - */ - @JsonCreator - public static NetworkFabricOperationalState fromString(String name) { - return fromString(name, NetworkFabricOperationalState.class); - } - - /** - * Gets known NetworkFabricOperationalState values. - * - * @return known NetworkFabricOperationalState values. - */ - public static Collection values() { - return values(NetworkFabricOperationalState.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatch.java new file mode 100644 index 0000000000000..b60fadd2f28c8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatch.java @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricPatchProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The Network Fabric resource definition. */ +@Fluent +public final class NetworkFabricPatch extends TagsUpdate { + /* + * Network Fabric Patch properties. + */ + @JsonProperty(value = "properties") + private NetworkFabricPatchProperties innerProperties; + + /** Creates an instance of NetworkFabricPatch class. */ + public NetworkFabricPatch() { + } + + /** + * Get the innerProperties property: Network Fabric Patch properties. + * + * @return the innerProperties value. + */ + private NetworkFabricPatchProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public NetworkFabricPatch withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the rackCount property: Number of compute racks associated to Network Fabric. + * + * @return the rackCount value. + */ + public Integer rackCount() { + return this.innerProperties() == null ? null : this.innerProperties().rackCount(); + } + + /** + * Set the rackCount property: Number of compute racks associated to Network Fabric. + * + * @param rackCount the rackCount value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withRackCount(Integer rackCount) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricPatchProperties(); + } + this.innerProperties().withRackCount(rackCount); + return this; + } + + /** + * Get the serverCountPerRack property: Number of servers.Possible values are from 1-16. + * + * @return the serverCountPerRack value. + */ + public Integer serverCountPerRack() { + return this.innerProperties() == null ? null : this.innerProperties().serverCountPerRack(); + } + + /** + * Set the serverCountPerRack property: Number of servers.Possible values are from 1-16. + * + * @param serverCountPerRack the serverCountPerRack value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withServerCountPerRack(Integer serverCountPerRack) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricPatchProperties(); + } + this.innerProperties().withServerCountPerRack(serverCountPerRack); + return this; + } + + /** + * Get the ipv4Prefix property: IPv4Prefix for Management Network. Example: 10.1.0.0/19. + * + * @return the ipv4Prefix value. + */ + public String ipv4Prefix() { + return this.innerProperties() == null ? null : this.innerProperties().ipv4Prefix(); + } + + /** + * Set the ipv4Prefix property: IPv4Prefix for Management Network. Example: 10.1.0.0/19. + * + * @param ipv4Prefix the ipv4Prefix value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withIpv4Prefix(String ipv4Prefix) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricPatchProperties(); + } + this.innerProperties().withIpv4Prefix(ipv4Prefix); + return this; + } + + /** + * Get the ipv6Prefix property: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. + * + * @return the ipv6Prefix value. + */ + public String ipv6Prefix() { + return this.innerProperties() == null ? null : this.innerProperties().ipv6Prefix(); + } + + /** + * Set the ipv6Prefix property: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. + * + * @param ipv6Prefix the ipv6Prefix value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withIpv6Prefix(String ipv6Prefix) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricPatchProperties(); + } + this.innerProperties().withIpv6Prefix(ipv6Prefix); + return this; + } + + /** + * Get the fabricAsn property: ASN of CE devices for CE/PE connectivity. + * + * @return the fabricAsn value. + */ + public Long fabricAsn() { + return this.innerProperties() == null ? null : this.innerProperties().fabricAsn(); + } + + /** + * Set the fabricAsn property: ASN of CE devices for CE/PE connectivity. + * + * @param fabricAsn the fabricAsn value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withFabricAsn(Long fabricAsn) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricPatchProperties(); + } + this.innerProperties().withFabricAsn(fabricAsn); + return this; + } + + /** + * Get the terminalServerConfiguration property: Network and credentials configuration already applied to terminal + * server. + * + * @return the terminalServerConfiguration value. + */ + public NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().terminalServerConfiguration(); + } + + /** + * Set the terminalServerConfiguration property: Network and credentials configuration already applied to terminal + * server. + * + * @param terminalServerConfiguration the terminalServerConfiguration value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withTerminalServerConfiguration( + NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricPatchProperties(); + } + this.innerProperties().withTerminalServerConfiguration(terminalServerConfiguration); + return this; + } + + /** + * Get the managementNetworkConfiguration property: Configuration to be used to setup the management network. + * + * @return the managementNetworkConfiguration value. + */ + public ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().managementNetworkConfiguration(); + } + + /** + * Set the managementNetworkConfiguration property: Configuration to be used to setup the management network. + * + * @param managementNetworkConfiguration the managementNetworkConfiguration value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withManagementNetworkConfiguration( + ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricPatchProperties(); + } + this.innerProperties().withManagementNetworkConfiguration(managementNetworkConfiguration); + return this; + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkFabricPatch object itself. + */ + public NetworkFabricPatch withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkFabricPatchProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchParameters.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchParameters.java deleted file mode 100644 index ae97e097b49da..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchParameters.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricPatchParametersProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** The NetworkFabric resource definition. */ -@Fluent -public final class NetworkFabricPatchParameters { - /* - * Network Fabric Patch properties. - */ - @JsonProperty(value = "properties") - private NetworkFabricPatchParametersProperties innerProperties; - - /* - * Azure resource tags that will replace the existing ones. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /** Creates an instance of NetworkFabricPatchParameters class. */ - public NetworkFabricPatchParameters() { - } - - /** - * Get the innerProperties property: Network Fabric Patch properties. - * - * @return the innerProperties value. - */ - private NetworkFabricPatchParametersProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the tags property: Azure resource tags that will replace the existing ones. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Azure resource tags that will replace the existing ones. - * - * @param tags the tags value to set. - * @return the NetworkFabricPatchParameters object itself. - */ - public NetworkFabricPatchParameters withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the terminalServerConfiguration property: Network and credentials configuration already applied to terminal - * server. - * - * @return the terminalServerConfiguration value. - */ - public TerminalServerPatchableProperties terminalServerConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().terminalServerConfiguration(); - } - - /** - * Set the terminalServerConfiguration property: Network and credentials configuration already applied to terminal - * server. - * - * @param terminalServerConfiguration the terminalServerConfiguration value to set. - * @return the NetworkFabricPatchParameters object itself. - */ - public NetworkFabricPatchParameters withTerminalServerConfiguration( - TerminalServerPatchableProperties terminalServerConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricPatchParametersProperties(); - } - this.innerProperties().withTerminalServerConfiguration(terminalServerConfiguration); - return this; - } - - /** - * Get the racks property: List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed - * depends on the Network Fabric SKU. - * - * @return the racks value. - */ - public List racks() { - return this.innerProperties() == null ? null : this.innerProperties().racks(); - } - - /** - * Get the l2IsolationDomains property: List of L2IsolationDomain resource IDs under the Network Fabric. - * - * @return the l2IsolationDomains value. - */ - public List l2IsolationDomains() { - return this.innerProperties() == null ? null : this.innerProperties().l2IsolationDomains(); - } - - /** - * Get the l3IsolationDomains property: List of L3IsolationDomain resource IDs under the Network Fabric. - * - * @return the l3IsolationDomains value. - */ - public List l3IsolationDomains() { - return this.innerProperties() == null ? null : this.innerProperties().l3IsolationDomains(); - } - - /** - * Get the annotation property: Switch configuration description. - * - * @return the annotation value. - */ - public String annotation() { - return this.innerProperties() == null ? null : this.innerProperties().annotation(); - } - - /** - * Set the annotation property: Switch configuration description. - * - * @param annotation the annotation value to set. - * @return the NetworkFabricPatchParameters object itself. - */ - public NetworkFabricPatchParameters withAnnotation(String annotation) { - if (this.innerProperties() == null) { - this.innerProperties = new NetworkFabricPatchParametersProperties(); - } - this.innerProperties().withAnnotation(annotation); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchableProperties.java index 4637e94b702e4..f47132684ea5d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchableProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchableProperties.java @@ -4,62 +4,200 @@ package com.azure.resourcemanager.managednetworkfabric.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; /** Network Fabric updatable properties. */ -@Immutable +@Fluent public class NetworkFabricPatchableProperties { /* - * List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed depends on the Network - * Fabric SKU. + * Number of compute racks associated to Network Fabric. */ - @JsonProperty(value = "racks", access = JsonProperty.Access.WRITE_ONLY) - private List racks; + @JsonProperty(value = "rackCount") + private Integer rackCount; /* - * List of L2IsolationDomain resource IDs under the Network Fabric. + * Number of servers.Possible values are from 1-16. */ - @JsonProperty(value = "l2IsolationDomains", access = JsonProperty.Access.WRITE_ONLY) - private List l2IsolationDomains; + @JsonProperty(value = "serverCountPerRack") + private Integer serverCountPerRack; /* - * List of L3IsolationDomain resource IDs under the Network Fabric. + * IPv4Prefix for Management Network. Example: 10.1.0.0/19. */ - @JsonProperty(value = "l3IsolationDomains", access = JsonProperty.Access.WRITE_ONLY) - private List l3IsolationDomains; + @JsonProperty(value = "ipv4Prefix") + private String ipv4Prefix; + + /* + * IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. + */ + @JsonProperty(value = "ipv6Prefix") + private String ipv6Prefix; + + /* + * ASN of CE devices for CE/PE connectivity. + */ + @JsonProperty(value = "fabricASN") + private Long fabricAsn; + + /* + * Network and credentials configuration already applied to terminal server. + */ + @JsonProperty(value = "terminalServerConfiguration") + private NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration; + + /* + * Configuration to be used to setup the management network. + */ + @JsonProperty(value = "managementNetworkConfiguration") + private ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration; /** Creates an instance of NetworkFabricPatchableProperties class. */ public NetworkFabricPatchableProperties() { } /** - * Get the racks property: List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed - * depends on the Network Fabric SKU. + * Get the rackCount property: Number of compute racks associated to Network Fabric. + * + * @return the rackCount value. + */ + public Integer rackCount() { + return this.rackCount; + } + + /** + * Set the rackCount property: Number of compute racks associated to Network Fabric. + * + * @param rackCount the rackCount value to set. + * @return the NetworkFabricPatchableProperties object itself. + */ + public NetworkFabricPatchableProperties withRackCount(Integer rackCount) { + this.rackCount = rackCount; + return this; + } + + /** + * Get the serverCountPerRack property: Number of servers.Possible values are from 1-16. + * + * @return the serverCountPerRack value. + */ + public Integer serverCountPerRack() { + return this.serverCountPerRack; + } + + /** + * Set the serverCountPerRack property: Number of servers.Possible values are from 1-16. + * + * @param serverCountPerRack the serverCountPerRack value to set. + * @return the NetworkFabricPatchableProperties object itself. + */ + public NetworkFabricPatchableProperties withServerCountPerRack(Integer serverCountPerRack) { + this.serverCountPerRack = serverCountPerRack; + return this; + } + + /** + * Get the ipv4Prefix property: IPv4Prefix for Management Network. Example: 10.1.0.0/19. + * + * @return the ipv4Prefix value. + */ + public String ipv4Prefix() { + return this.ipv4Prefix; + } + + /** + * Set the ipv4Prefix property: IPv4Prefix for Management Network. Example: 10.1.0.0/19. + * + * @param ipv4Prefix the ipv4Prefix value to set. + * @return the NetworkFabricPatchableProperties object itself. + */ + public NetworkFabricPatchableProperties withIpv4Prefix(String ipv4Prefix) { + this.ipv4Prefix = ipv4Prefix; + return this; + } + + /** + * Get the ipv6Prefix property: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. + * + * @return the ipv6Prefix value. + */ + public String ipv6Prefix() { + return this.ipv6Prefix; + } + + /** + * Set the ipv6Prefix property: IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. + * + * @param ipv6Prefix the ipv6Prefix value to set. + * @return the NetworkFabricPatchableProperties object itself. + */ + public NetworkFabricPatchableProperties withIpv6Prefix(String ipv6Prefix) { + this.ipv6Prefix = ipv6Prefix; + return this; + } + + /** + * Get the fabricAsn property: ASN of CE devices for CE/PE connectivity. + * + * @return the fabricAsn value. + */ + public Long fabricAsn() { + return this.fabricAsn; + } + + /** + * Set the fabricAsn property: ASN of CE devices for CE/PE connectivity. + * + * @param fabricAsn the fabricAsn value to set. + * @return the NetworkFabricPatchableProperties object itself. + */ + public NetworkFabricPatchableProperties withFabricAsn(Long fabricAsn) { + this.fabricAsn = fabricAsn; + return this; + } + + /** + * Get the terminalServerConfiguration property: Network and credentials configuration already applied to terminal + * server. + * + * @return the terminalServerConfiguration value. + */ + public NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration() { + return this.terminalServerConfiguration; + } + + /** + * Set the terminalServerConfiguration property: Network and credentials configuration already applied to terminal + * server. * - * @return the racks value. + * @param terminalServerConfiguration the terminalServerConfiguration value to set. + * @return the NetworkFabricPatchableProperties object itself. */ - public List racks() { - return this.racks; + public NetworkFabricPatchableProperties withTerminalServerConfiguration( + NetworkFabricPatchablePropertiesTerminalServerConfiguration terminalServerConfiguration) { + this.terminalServerConfiguration = terminalServerConfiguration; + return this; } /** - * Get the l2IsolationDomains property: List of L2IsolationDomain resource IDs under the Network Fabric. + * Get the managementNetworkConfiguration property: Configuration to be used to setup the management network. * - * @return the l2IsolationDomains value. + * @return the managementNetworkConfiguration value. */ - public List l2IsolationDomains() { - return this.l2IsolationDomains; + public ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration() { + return this.managementNetworkConfiguration; } /** - * Get the l3IsolationDomains property: List of L3IsolationDomain resource IDs under the Network Fabric. + * Set the managementNetworkConfiguration property: Configuration to be used to setup the management network. * - * @return the l3IsolationDomains value. + * @param managementNetworkConfiguration the managementNetworkConfiguration value to set. + * @return the NetworkFabricPatchableProperties object itself. */ - public List l3IsolationDomains() { - return this.l3IsolationDomains; + public NetworkFabricPatchableProperties withManagementNetworkConfiguration( + ManagementNetworkConfigurationPatchableProperties managementNetworkConfiguration) { + this.managementNetworkConfiguration = managementNetworkConfiguration; + return this; } /** @@ -68,5 +206,11 @@ public List l3IsolationDomains() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (terminalServerConfiguration() != null) { + terminalServerConfiguration().validate(); + } + if (managementNetworkConfiguration() != null) { + managementNetworkConfiguration().validate(); + } } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchablePropertiesTerminalServerConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchablePropertiesTerminalServerConfiguration.java new file mode 100644 index 0000000000000..fcfa649b570d0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricPatchablePropertiesTerminalServerConfiguration.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Network and credentials configuration already applied to terminal server. */ +@Fluent +public final class NetworkFabricPatchablePropertiesTerminalServerConfiguration + extends TerminalServerPatchableProperties { + /* + * IPv4 Address Prefix. + */ + @JsonProperty(value = "primaryIpv4Prefix") + private String primaryIpv4Prefix; + + /* + * IPv6 Address Prefix. + */ + @JsonProperty(value = "primaryIpv6Prefix") + private String primaryIpv6Prefix; + + /* + * Secondary IPv4 Address Prefix. + */ + @JsonProperty(value = "secondaryIpv4Prefix") + private String secondaryIpv4Prefix; + + /* + * Secondary IPv6 Address Prefix. + */ + @JsonProperty(value = "secondaryIpv6Prefix") + private String secondaryIpv6Prefix; + + /** Creates an instance of NetworkFabricPatchablePropertiesTerminalServerConfiguration class. */ + public NetworkFabricPatchablePropertiesTerminalServerConfiguration() { + } + + /** + * Get the primaryIpv4Prefix property: IPv4 Address Prefix. + * + * @return the primaryIpv4Prefix value. + */ + public String primaryIpv4Prefix() { + return this.primaryIpv4Prefix; + } + + /** + * Set the primaryIpv4Prefix property: IPv4 Address Prefix. + * + * @param primaryIpv4Prefix the primaryIpv4Prefix value to set. + * @return the NetworkFabricPatchablePropertiesTerminalServerConfiguration object itself. + */ + public NetworkFabricPatchablePropertiesTerminalServerConfiguration withPrimaryIpv4Prefix(String primaryIpv4Prefix) { + this.primaryIpv4Prefix = primaryIpv4Prefix; + return this; + } + + /** + * Get the primaryIpv6Prefix property: IPv6 Address Prefix. + * + * @return the primaryIpv6Prefix value. + */ + public String primaryIpv6Prefix() { + return this.primaryIpv6Prefix; + } + + /** + * Set the primaryIpv6Prefix property: IPv6 Address Prefix. + * + * @param primaryIpv6Prefix the primaryIpv6Prefix value to set. + * @return the NetworkFabricPatchablePropertiesTerminalServerConfiguration object itself. + */ + public NetworkFabricPatchablePropertiesTerminalServerConfiguration withPrimaryIpv6Prefix(String primaryIpv6Prefix) { + this.primaryIpv6Prefix = primaryIpv6Prefix; + return this; + } + + /** + * Get the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. + * + * @return the secondaryIpv4Prefix value. + */ + public String secondaryIpv4Prefix() { + return this.secondaryIpv4Prefix; + } + + /** + * Set the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. + * + * @param secondaryIpv4Prefix the secondaryIpv4Prefix value to set. + * @return the NetworkFabricPatchablePropertiesTerminalServerConfiguration object itself. + */ + public NetworkFabricPatchablePropertiesTerminalServerConfiguration withSecondaryIpv4Prefix( + String secondaryIpv4Prefix) { + this.secondaryIpv4Prefix = secondaryIpv4Prefix; + return this; + } + + /** + * Get the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. + * + * @return the secondaryIpv6Prefix value. + */ + public String secondaryIpv6Prefix() { + return this.secondaryIpv6Prefix; + } + + /** + * Set the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. + * + * @param secondaryIpv6Prefix the secondaryIpv6Prefix value to set. + * @return the NetworkFabricPatchablePropertiesTerminalServerConfiguration object itself. + */ + public NetworkFabricPatchablePropertiesTerminalServerConfiguration withSecondaryIpv6Prefix( + String secondaryIpv6Prefix) { + this.secondaryIpv6Prefix = secondaryIpv6Prefix; + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkFabricPatchablePropertiesTerminalServerConfiguration withUsername(String username) { + super.withUsername(username); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkFabricPatchablePropertiesTerminalServerConfiguration withPassword(String password) { + super.withPassword(password); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkFabricPatchablePropertiesTerminalServerConfiguration withSerialNumber(String serialNumber) { + super.withSerialNumber(serialNumber); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSku.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSku.java index 26de99f6b502d..22e2a2f3b017b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSku.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSku.java @@ -6,6 +6,7 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuInner; +import java.util.List; /** An immutable client-side representation of NetworkFabricSku. */ public interface NetworkFabricSku { @@ -38,42 +39,43 @@ public interface NetworkFabricSku { SystemData systemData(); /** - * Gets the typePropertiesType property: Type of Network Fabric Sku. + * Gets the typePropertiesType property: Type of Network Fabric SKU. * * @return the typePropertiesType value. */ - String typePropertiesType(); + FabricSkuType typePropertiesType(); /** - * Gets the maxComputeRacks property: Maximum number of compute racks available for this Network Fabric SKU. + * Gets the maxComputeRacks property: 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. * * @return the maxComputeRacks value. */ Integer maxComputeRacks(); /** - * Gets the minSupportedVer property: Minimum supported version. + * Gets the maximumServerCount property: Maximum number of servers available for this Network Fabric SKU. * - * @return the minSupportedVer value. + * @return the maximumServerCount value. */ - String minSupportedVer(); + Integer maximumServerCount(); /** - * Gets the maxSupportedVer property: Maximum supported version. + * Gets the supportedVersions property: List of supported Network Fabric SKU versions. * - * @return the maxSupportedVer value. + * @return the supportedVersions value. */ - String maxSupportedVer(); + List supportedVersions(); /** - * Gets the detailsUri property: The URI gives full details of sku. + * Gets the details property: URL providing detailed configuration of the fabric SKU. * - * @return the detailsUri value. + * @return the details value. */ - String detailsUri(); + String details(); /** - * Gets the provisioningState property: Gets the provisioning state of the resource. + * Gets the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkus.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkus.java index f52084c806fd9..9cc81f39651b4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkus.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkus.java @@ -13,51 +13,51 @@ public interface NetworkFabricSkus { /** * Gets a Network Fabric Sku. * - *

Implements Network Fabric Sku GET method. + *

Implements Network Fabric SKU GET method. * - * @param networkFabricSkuName Name of the Network Fabric Sku. + * @param networkFabricSkuName Name of the Network Fabric SKU. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricSku resource definition along with {@link Response}. + * @return the Network Fabric SKU resource definition along with {@link Response}. */ Response getWithResponse(String networkFabricSkuName, Context context); /** * Gets a Network Fabric Sku. * - *

Implements Network Fabric Sku GET method. + *

Implements Network Fabric SKU GET method. * - * @param networkFabricSkuName Name of the Network Fabric Sku. + * @param networkFabricSkuName Name of the Network Fabric SKU. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkFabricSku resource definition. + * @return the Network Fabric SKU resource definition. */ NetworkFabricSku get(String networkFabricSkuName); /** - * List NetworkFabricSkus by subscription. + * List Network Fabric SKUs by subscription. * - *

Implements NetworkFabricSkus list by subscription GET method. + *

Implements Network Fabric SKUs list by subscription GET method. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricSkus as paginated response with {@link PagedIterable}. + * @return list of Network Fabric SKUs as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List NetworkFabricSkus by subscription. + * List Network Fabric SKUs by subscription. * - *

Implements NetworkFabricSkus list by subscription GET method. + *

Implements Network Fabric SKUs list by subscription GET method. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabricSkus as paginated response with {@link PagedIterable}. + * @return list of Network Fabric SKUs as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkusListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkusListResult.java index 2f4f9377ec390..057114dcb173f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkusListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricSkusListResult.java @@ -9,11 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of NetworkFabricSkus. */ +/** List of Network Fabric SKUs. */ @Fluent public final class NetworkFabricSkusListResult { /* - * List of NetworkFabricSku resources. + * List of Network Fabric SKU resources. */ @JsonProperty(value = "value") private List value; @@ -29,7 +29,7 @@ public NetworkFabricSkusListResult() { } /** - * Get the value property: List of NetworkFabricSku resources. + * Get the value property: List of Network Fabric SKU resources. * * @return the value value. */ @@ -38,7 +38,7 @@ public List value() { } /** - * Set the value property: List of NetworkFabricSku resources. + * Set the value property: List of Network Fabric SKU resources. * * @param value the value value to set. * @return the NetworkFabricSkusListResult object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabrics.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabrics.java index 26bf2593d45f3..d939da9bd40b3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabrics.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabrics.java @@ -68,7 +68,7 @@ Response getByResourceGroupWithResponse( void delete(String resourceGroupName, String networkFabricName, Context context); /** - * List NetworkFabrics by resource group. + * List Network Fabrics by resource group. * *

List all the Network Fabric resources in the given resource group. * @@ -76,12 +76,12 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics as paginated response with {@link PagedIterable}. + * @return list of Network Fabrics as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List NetworkFabrics by resource group. + * List Network Fabrics by resource group. * *

List all the Network Fabric resources in the given resource group. * @@ -90,23 +90,23 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics as paginated response with {@link PagedIterable}. + * @return list of Network Fabrics as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List NetworkFabrics by subscription. + * List Network Fabrics by subscription. * *

List all the Network Fabric resources in the given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics as paginated response with {@link PagedIterable}. + * @return list of Network Fabrics as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List NetworkFabrics by subscription. + * List Network Fabrics by subscription. * *

List all the Network Fabric resources in the given subscription. * @@ -114,7 +114,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkFabrics as paginated response with {@link PagedIterable}. + * @return list of Network Fabrics as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -124,12 +124,13 @@ Response getByResourceGroupWithResponse( *

Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ - void provision(String resourceGroupName, String networkFabricName); + CommonPostActionResponseForDeviceUpdate provision(String resourceGroupName, String networkFabricName); /** * Implements the operation to the underlying resources. @@ -137,13 +138,15 @@ Response getByResourceGroupWithResponse( *

Provisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ - void provision(String resourceGroupName, String networkFabricName, Context context); + CommonPostActionResponseForDeviceUpdate provision( + String resourceGroupName, String networkFabricName, Context context); /** * Implements the operation to the underlying resources. @@ -151,12 +154,13 @@ Response getByResourceGroupWithResponse( *

Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. */ - void deprovision(String resourceGroupName, String networkFabricName); + CommonPostActionResponseForDeviceUpdate deprovision(String resourceGroupName, String networkFabricName); /** * Implements the operation to the underlying resources. @@ -164,13 +168,240 @@ Response getByResourceGroupWithResponse( *

Deprovisions the underlying resources in the given Network Fabric instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + CommonPostActionResponseForDeviceUpdate deprovision( + String resourceGroupName, String networkFabricName, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void deprovision(String resourceGroupName, String networkFabricName, Context context); + CommonPostActionResponseForStateUpdate upgrade( + String resourceGroupName, String networkFabricName, UpdateVersion body); + + /** + * Implements the operation to the underlying resources. + * + *

Upgrades the version of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Network Fabric properties to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate upgrade( + String resourceGroupName, String networkFabricName, UpdateVersion body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate refreshConfiguration(String resourceGroupName, String networkFabricName); + + /** + * Implements the operation to the underlying resources. + * + *

Refreshes the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate refreshConfiguration( + String resourceGroupName, String networkFabricName, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateWorkloadManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric + * instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateInfraManagementBfdConfiguration( + String resourceGroupName, String networkFabricName, UpdateAdministrativeState body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + ValidateConfigurationResponse validateConfiguration( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body); + + /** + * Implements the operation to the underlying resources. + * + *

Validates the configuration of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param body Validate configuration properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + ValidateConfigurationResponse validateConfiguration( + String resourceGroupName, String networkFabricName, ValidateConfigurationProperties body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return topology of the underlying resources in the given Network Fabric instance. + */ + ValidateConfigurationResponse getTopology(String resourceGroupName, String networkFabricName); + + /** + * Implements the operation to the underlying resources. + * + *

Gets Topology of the underlying resources in the given Network Fabric instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return topology of the underlying resources in the given Network Fabric instance. + */ + ValidateConfigurationResponse getTopology(String resourceGroupName, String networkFabricName, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String networkFabricName); + + /** + * Implements the operation to the underlying resources. + * + *

Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate commitConfiguration( + String resourceGroupName, String networkFabricName, Context context); /** * Gets a Network Fabric. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricsListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricsListResult.java index 1de1ed338c9d3..411836b803d08 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricsListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkFabricsListResult.java @@ -9,11 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of NetworkFabrics. */ +/** List of Network Fabrics. */ @Fluent public final class NetworkFabricsListResult { /* - * List of NetworkFabric resources. + * List of Network Fabric resources. */ @JsonProperty(value = "value") private List value; @@ -29,7 +29,7 @@ public NetworkFabricsListResult() { } /** - * Get the value property: List of NetworkFabric resources. + * Get the value property: List of Network Fabric resources. * * @return the value value. */ @@ -38,7 +38,7 @@ public List value() { } /** - * Set the value property: List of NetworkFabric resources. + * Set the value property: List of Network Fabric resources. * * @param value the value value to set. * @return the NetworkFabricsListResult object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterface.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterface.java index fc0ed21624b8f..ab9cbed0a5a56 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterface.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterface.java @@ -39,28 +39,14 @@ public interface NetworkInterface { SystemData systemData(); /** - * Gets the physicalIdentifier property: physicalIdentifier of the network interface. + * Gets the physicalIdentifier property: Physical Identifier of the network interface. * * @return the physicalIdentifier value. */ String physicalIdentifier(); /** - * Gets the administrativeState property: administrativeState of the network interface. Example: Enabled | Disabled. - * - * @return the administrativeState value. - */ - EnabledDisabledState administrativeState(); - - /** - * Gets the provisioningState property: Gets the provisioning state of the resource. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the connectedTo property: The arm resource id of the interface or compute server its connected to. + * Gets the connectedTo property: The ARM resource id of the interface or compute server its connected to. * * @return the connectedTo value. */ @@ -74,19 +60,33 @@ public interface NetworkInterface { InterfaceType interfaceType(); /** - * Gets the ipv4Address property: ipv4Address. + * Gets the ipv4Address property: IPv4Address of the interface. * * @return the ipv4Address value. */ String ipv4Address(); /** - * Gets the ipv6Address property: ipv6Address. + * Gets the ipv6Address property: IPv6Address of the interface. * * @return the ipv6Address value. */ String ipv6Address(); + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + AdministrativeState administrativeState(); + /** * Gets the annotation property: Switch configuration description. * @@ -123,7 +123,7 @@ interface WithParentResource { * Specifies resourceGroupName, networkDeviceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @return the next definition stage. */ WithCreate withExistingNetworkDevice(String resourceGroupName, String networkDeviceName); @@ -211,30 +211,6 @@ interface WithAnnotation { */ NetworkInterface refresh(Context context); - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Interface. - */ - InterfaceStatus getStatus(); - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Interface. - */ - InterfaceStatus getStatus(Context context); - /** * Updates the admin state of the network interface. * @@ -244,8 +220,9 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateAdministrativeState(UpdateAdministrativeState body); + CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); /** * Updates the admin state of the network interface. @@ -257,6 +234,7 @@ interface WithAnnotation { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateAdministrativeState(UpdateAdministrativeState body, Context context); + CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfaces.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfaces.java index 2bad8572ac7cc..86e38a705ab79 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfaces.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkInterfaces.java @@ -16,8 +16,8 @@ public interface NetworkInterfaces { *

Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -33,8 +33,8 @@ Response getWithResponse( *

Get the Network Interface resource details. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -48,8 +48,8 @@ Response getWithResponse( *

Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -62,8 +62,8 @@ Response getWithResponse( *

Delete the Network Interface resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterfaceName. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -77,13 +77,13 @@ Response getWithResponse( *

List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of NetworkInterfaces as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String networkDeviceName); + PagedIterable listByNetworkDevice(String resourceGroupName, String networkDeviceName); /** * List all Network Interfaces that are available using an Network Device. @@ -91,46 +91,15 @@ Response getWithResponse( *

List all the Network Interface resources in a given resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. + * @param networkDeviceName Name of the Network Device. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of NetworkInterfaces as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String networkDeviceName, Context context); - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Interface. - */ - InterfaceStatus getStatus(String resourceGroupName, String networkDeviceName, String networkInterfaceName); - - /** - * Implements the operation to the underlying resources. - * - *

Get the running status of the Network Interface. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the running status of the Network Interface. - */ - InterfaceStatus getStatus( - String resourceGroupName, String networkDeviceName, String networkInterfaceName, Context context); + PagedIterable listByNetworkDevice( + String resourceGroupName, String networkDeviceName, Context context); /** * Updates the admin state of the network interface. @@ -138,14 +107,15 @@ InterfaceStatus getStatus( *

Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateAdministrativeState( + CommonPostActionResponseForStateUpdate updateAdministrativeState( String resourceGroupName, String networkDeviceName, String networkInterfaceName, @@ -157,15 +127,16 @@ void updateAdministrativeState( *

Update the admin state of the Network Interface. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkDeviceName Name of the NetworkDevice. - * @param networkInterfaceName Name of the NetworkInterface. + * @param networkDeviceName Name of the Network Device. + * @param networkInterfaceName Name of the Network Interface. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. */ - void updateAdministrativeState( + CommonPostActionResponseForStateUpdate updateAdministrativeState( String resourceGroupName, String networkDeviceName, String networkInterfaceName, diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBroker.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBroker.java new file mode 100644 index 0000000000000..5273a2ea98589 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBroker.java @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of NetworkPacketBroker. */ +public interface NetworkPacketBroker { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the networkFabricId property: ARM resource ID of the Network Fabric. + * + * @return the networkFabricId value. + */ + String networkFabricId(); + + /** + * Gets the networkDeviceIds property: List of ARM resource IDs of Network Devices [NPB]. + * + * @return the networkDeviceIds value. + */ + List networkDeviceIds(); + + /** + * Gets the sourceInterfaceIds property: List of network interfaces across NPB devices that are used to mirror + * source traffic. + * + * @return the sourceInterfaceIds value. + */ + List sourceInterfaceIds(); + + /** + * Gets the networkTapIds property: List of network Tap IDs configured on NPB. + * + * @return the networkTapIds value. + */ + List networkTapIds(); + + /** + * Gets the neighborGroupIds property: List of neighbor group IDs configured on NPB. + * + * @return the neighborGroupIds value. + */ + List neighborGroupIds(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner object. + * + * @return the inner object. + */ + NetworkPacketBrokerInner innerModel(); + + /** The entirety of the NetworkPacketBroker definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithNetworkFabricId, + DefinitionStages.WithCreate { + } + /** The NetworkPacketBroker definition stages. */ + interface DefinitionStages { + /** The first stage of the NetworkPacketBroker definition. */ + interface Blank extends WithLocation { + } + /** The stage of the NetworkPacketBroker definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + /** The stage of the NetworkPacketBroker definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithNetworkFabricId withExistingResourceGroup(String resourceGroupName); + } + /** The stage of the NetworkPacketBroker definition allowing to specify networkFabricId. */ + interface WithNetworkFabricId { + /** + * Specifies the networkFabricId property: ARM resource ID of the Network Fabric.. + * + * @param networkFabricId ARM resource ID of the Network Fabric. + * @return the next definition stage. + */ + WithCreate withNetworkFabricId(String networkFabricId); + } + /** + * The stage of the NetworkPacketBroker definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags { + /** + * Executes the create request. + * + * @return the created resource. + */ + NetworkPacketBroker create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + NetworkPacketBroker create(Context context); + } + /** The stage of the NetworkPacketBroker definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + } + /** + * Begins update for the NetworkPacketBroker resource. + * + * @return the stage of resource update. + */ + NetworkPacketBroker.Update update(); + + /** The template for NetworkPacketBroker update. */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + NetworkPacketBroker apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + NetworkPacketBroker apply(Context context); + } + /** The NetworkPacketBroker update stages. */ + interface UpdateStages { + /** The stage of the NetworkPacketBroker update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + NetworkPacketBroker refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + NetworkPacketBroker refresh(Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokerPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokerPatch.java new file mode 100644 index 0000000000000..c5e80b15e273e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokerPatch.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import java.util.Map; + +/** The NetworkPacketBroker patch resource definition. */ +@Fluent +public final class NetworkPacketBrokerPatch extends TagsUpdate { + /** Creates an instance of NetworkPacketBrokerPatch class. */ + public NetworkPacketBrokerPatch() { + } + + /** {@inheritDoc} */ + @Override + public NetworkPacketBrokerPatch withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokers.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokers.java new file mode 100644 index 0000000000000..dac5433ab2fa6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokers.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of NetworkPacketBrokers. */ +public interface NetworkPacketBrokers { + /** + * Gets a Network Packet Broker. + * + *

Retrieves details of this Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition along with {@link Response}. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String networkPacketBrokerName, Context context); + + /** + * Gets a Network Packet Broker. + * + *

Retrieves details of this Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition. + */ + NetworkPacketBroker getByResourceGroup(String resourceGroupName, String networkPacketBrokerName); + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String networkPacketBrokerName); + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkPacketBrokerName Name of the Network Packet Broker. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String networkPacketBrokerName, Context context); + + /** + * List all Network Packet Brokers under resource group. + * + *

Displays NetworkPacketBrokers list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all Network Packet Brokers under resource group. + * + *

Displays NetworkPacketBrokers list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List Network Packet Brokers by subscription. + * + *

Displays Network Packet Brokers list by subscription GET method. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List Network Packet Brokers by subscription. + * + *

Displays Network Packet Brokers list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkPacketBrokers as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Gets a Network Packet Broker. + * + *

Retrieves details of this Network Packet Broker. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition along with {@link Response}. + */ + NetworkPacketBroker getById(String id); + + /** + * Gets a Network Packet Broker. + * + *

Retrieves details of this Network Packet Broker. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetworkPacketBroker resource definition along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a Network Packet Broker. + * + *

Deletes Network Packet Broker. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new NetworkPacketBroker resource. + * + * @param name resource name. + * @return the first stage of the new NetworkPacketBroker definition. + */ + NetworkPacketBroker.DefinitionStages.Blank define(String name); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokersListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokersListResult.java new file mode 100644 index 0000000000000..bf3d6e5ff6365 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkPacketBrokersListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkPacketBrokerInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of NetworkPacketBrokers. */ +@Fluent +public final class NetworkPacketBrokersListResult { + /* + * List of NetworkPacketBroker resources. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Url to follow for getting next page of resources. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of NetworkPacketBrokersListResult class. */ + public NetworkPacketBrokersListResult() { + } + + /** + * Get the value property: List of NetworkPacketBroker resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of NetworkPacketBroker resources. + * + * @param value the value value to set. + * @return the NetworkPacketBrokersListResult object itself. + */ + public NetworkPacketBrokersListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Url to follow for getting next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Url to follow for getting next page of resources. + * + * @param nextLink the nextLink value to set. + * @return the NetworkPacketBrokersListResult object itself. + */ + public NetworkPacketBrokersListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRack.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRack.java index a519bf2c76fcc..bb5ef183d3663 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRack.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRack.java @@ -56,28 +56,28 @@ public interface NetworkRack { SystemData systemData(); /** - * Gets the networkRackSku property: Network Rack SKU name. + * Gets the networkRackType property: Network Rack SKU name. * - * @return the networkRackSku value. + * @return the networkRackType value. */ - String networkRackSku(); + NetworkRackType networkRackType(); /** - * Gets the networkFabricId property: Network Fabric ARM resource id. + * Gets the networkFabricId property: ARM resource ID of the Network Fabric. * * @return the networkFabricId value. */ String networkFabricId(); /** - * Gets the networkDevices property: List of network device ARM resource ids. + * Gets the networkDevices property: List of network device ARM resource IDs. * * @return the networkDevices value. */ List networkDevices(); /** - * Gets the provisioningState property: Gets the provisioning state of the resource. + * Gets the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ @@ -123,7 +123,6 @@ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, - DefinitionStages.WithNetworkRackSku, DefinitionStages.WithNetworkFabricId, DefinitionStages.WithCreate { } @@ -158,24 +157,14 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithNetworkRackSku withExistingResourceGroup(String resourceGroupName); - } - /** The stage of the NetworkRack definition allowing to specify networkRackSku. */ - interface WithNetworkRackSku { - /** - * Specifies the networkRackSku property: Network Rack SKU name.. - * - * @param networkRackSku Network Rack SKU name. - * @return the next definition stage. - */ - WithNetworkFabricId withNetworkRackSku(String networkRackSku); + WithNetworkFabricId withExistingResourceGroup(String resourceGroupName); } /** The stage of the NetworkRack definition allowing to specify networkFabricId. */ interface WithNetworkFabricId { /** - * Specifies the networkFabricId property: Network Fabric ARM resource id.. + * Specifies the networkFabricId property: ARM resource ID of the Network Fabric.. * - * @param networkFabricId Network Fabric ARM resource id. + * @param networkFabricId ARM resource ID of the Network Fabric. * @return the next definition stage. */ WithCreate withNetworkFabricId(String networkFabricId); @@ -184,7 +173,8 @@ interface WithNetworkFabricId { * The stage of the NetworkRack definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithAnnotation { + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithNetworkRackType, DefinitionStages.WithAnnotation { /** * Executes the create request. * @@ -210,6 +200,16 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the NetworkRack definition allowing to specify networkRackType. */ + interface WithNetworkRackType { + /** + * Specifies the networkRackType property: Network Rack SKU name.. + * + * @param networkRackType Network Rack SKU name. + * @return the next definition stage. + */ + WithCreate withNetworkRackType(NetworkRackType networkRackType); + } /** The stage of the NetworkRack definition allowing to specify annotation. */ interface WithAnnotation { /** @@ -229,7 +229,7 @@ interface WithAnnotation { NetworkRack.Update update(); /** The template for NetworkRack update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + interface Update extends UpdateStages.WithTags { /** * Executes the update request. * @@ -257,16 +257,6 @@ interface WithTags { */ Update withTags(Map tags); } - /** The stage of the NetworkRack update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: Resource properties.. - * - * @param properties Resource properties. - * @return the next definition stage. - */ - Update withProperties(Object properties); - } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackRoleName.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackRoleName.java deleted file mode 100644 index f4ab9a7f82d9e..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackRoleName.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** The role of the Network Rack: Aggregate or Compute. */ -public final class NetworkRackRoleName extends ExpandableStringEnum { - /** Static value ComputeRack for NetworkRackRoleName. */ - public static final NetworkRackRoleName COMPUTE_RACK = fromString("ComputeRack"); - - /** Static value AggregateRack for NetworkRackRoleName. */ - public static final NetworkRackRoleName AGGREGATE_RACK = fromString("AggregateRack"); - - /** - * Creates a new instance of NetworkRackRoleName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NetworkRackRoleName() { - } - - /** - * Creates or finds a NetworkRackRoleName from its string representation. - * - * @param name a name to look for. - * @return the corresponding NetworkRackRoleName. - */ - @JsonCreator - public static NetworkRackRoleName fromString(String name) { - return fromString(name, NetworkRackRoleName.class); - } - - /** - * Gets known NetworkRackRoleName values. - * - * @return known NetworkRackRoleName values. - */ - public static Collection values() { - return values(NetworkRackRoleName.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackSku.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackSku.java deleted file mode 100644 index 6c659d76e2482..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackSku.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackSkuInner; -import java.util.List; - -/** An immutable client-side representation of NetworkRackSku. */ -public interface NetworkRackSku { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the roleName property: The role of the Network Rack: Aggregate or Compute. - * - * @return the roleName value. - */ - NetworkRackRoleName roleName(); - - /** - * Gets the maximumServerCount property: Maximum number of servers available for this SKU. - * - * @return the maximumServerCount value. - */ - Integer maximumServerCount(); - - /** - * Gets the maximumStorageCount property: Maximum number of storage devices available for this SKU. - * - * @return the maximumStorageCount value. - */ - Integer maximumStorageCount(); - - /** - * Gets the maximumUplinks property: Maximum number of network uplinks available for this SKU. - * - * @return the maximumUplinks value. - */ - Integer maximumUplinks(); - - /** - * Gets the networkDevices property: List of network device properties / role for the Network Rack. - * - * @return the networkDevices value. - */ - List networkDevices(); - - /** - * Gets the provisioningState property: Gets the provisioning state of the resource. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackSkuInner object. - * - * @return the inner object. - */ - NetworkRackSkuInner innerModel(); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackSkus.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackSkus.java deleted file mode 100644 index c7aa583234201..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackSkus.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of NetworkRackSkus. */ -public interface NetworkRackSkus { - /** - * Gets a Network Rack Sku. - * - *

Get Network Rack SKU resource. - * - * @param networkRackSkuName Name of the Network Rack Sku. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Rack SKU resource along with {@link Response}. - */ - Response getWithResponse(String networkRackSkuName, Context context); - - /** - * Gets a Network Rack Sku. - * - *

Get Network Rack SKU resource. - * - * @param networkRackSkuName Name of the Network Rack Sku. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return network Rack SKU resource. - */ - NetworkRackSku get(String networkRackSkuName); - - /** - * List NetworkRackSkus by subscription. - * - *

List all Network Rack SKUs in the given subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRackSkus as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List NetworkRackSkus by subscription. - * - *

List all Network Rack SKUs in the given subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRackSkus as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackType.java new file mode 100644 index 0000000000000..fb65decf1f6e1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackType.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Network Rack SKU name. */ +public final class NetworkRackType extends ExpandableStringEnum { + /** Static value Aggregate for NetworkRackType. */ + public static final NetworkRackType AGGREGATE = fromString("Aggregate"); + + /** Static value Compute for NetworkRackType. */ + public static final NetworkRackType COMPUTE = fromString("Compute"); + + /** Static value Combined for NetworkRackType. */ + public static final NetworkRackType COMBINED = fromString("Combined"); + + /** + * Creates a new instance of NetworkRackType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkRackType() { + } + + /** + * Creates or finds a NetworkRackType from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkRackType. + */ + @JsonCreator + public static NetworkRackType fromString(String name) { + return fromString(name, NetworkRackType.class); + } + + /** + * Gets known NetworkRackType values. + * + * @return known NetworkRackType values. + */ + public static Collection values() { + return values(NetworkRackType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacks.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacks.java index 17384714b5033..44394b4048ba8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacks.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacks.java @@ -68,7 +68,7 @@ Response getByResourceGroupWithResponse( void delete(String resourceGroupName, String networkRackName, Context context); /** - * List NetworkRacks by resource group. + * List Network Racks by resource group. * *

List all Network Rack resources in the given resource group. * @@ -76,12 +76,12 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks as paginated response with {@link PagedIterable}. + * @return list of Network Racks as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List NetworkRacks by resource group. + * List Network Racks by resource group. * *

List all Network Rack resources in the given resource group. * @@ -90,23 +90,23 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks as paginated response with {@link PagedIterable}. + * @return list of Network Racks as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List NetworkRacks by subscription. + * List Network Racks by subscription. * *

List all Network Rack resources in the given subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks as paginated response with {@link PagedIterable}. + * @return list of Network Racks as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List NetworkRacks by subscription. + * List Network Racks by subscription. * *

List all Network Rack resources in the given subscription. * @@ -114,7 +114,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkRacks as paginated response with {@link PagedIterable}. + * @return list of Network Racks as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacksListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacksListResult.java index 1a717927634a1..3666c442cac95 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacksListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRacksListResult.java @@ -9,11 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of NetworkRacks. */ +/** List of Network Racks. */ @Fluent public final class NetworkRacksListResult { /* - * List of NetworkRack resources. + * List of Network Rack resources. */ @JsonProperty(value = "value") private List value; @@ -29,7 +29,7 @@ public NetworkRacksListResult() { } /** - * Get the value property: List of NetworkRack resources. + * Get the value property: List of Network Rack resources. * * @return the value value. */ @@ -38,7 +38,7 @@ public List value() { } /** - * Set the value property: List of NetworkRack resources. + * Set the value property: List of Network Rack resources. * * @param value the value value to set. * @return the NetworkRacksListResult object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTap.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTap.java new file mode 100644 index 0000000000000..937031ebde33c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTap.java @@ -0,0 +1,394 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of NetworkTap. */ +public interface NetworkTap { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the networkPacketBrokerId property: ARM resource ID of the Network Packet Broker. + * + * @return the networkPacketBrokerId value. + */ + String networkPacketBrokerId(); + + /** + * Gets the sourceTapRuleId property: Source Tap Rule Id. ARM Resource ID of the Network Tap Rule. + * + * @return the sourceTapRuleId value. + */ + String sourceTapRuleId(); + + /** + * Gets the destinations property: List of destinations to send the filter traffic. + * + * @return the destinations value. + */ + List destinations(); + + /** + * Gets the pollingType property: Polling type. + * + * @return the pollingType value. + */ + PollingType pollingType(); + + /** + * Gets the configurationState property: Gets the configurations state of the resource. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + + /** + * Gets the provisioningState property: 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. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the administrativeState property: Administrative state of the resource. Example -Enabled/Disabled. + * + * @return the administrativeState value. + */ + AdministrativeState administrativeState(); + + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner object. + * + * @return the inner object. + */ + NetworkTapInner innerModel(); + + /** The entirety of the NetworkTap definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithNetworkPacketBrokerId, + DefinitionStages.WithDestinations, + DefinitionStages.WithCreate { + } + /** The NetworkTap definition stages. */ + interface DefinitionStages { + /** The first stage of the NetworkTap definition. */ + interface Blank extends WithLocation { + } + /** The stage of the NetworkTap definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + /** The stage of the NetworkTap definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithNetworkPacketBrokerId withExistingResourceGroup(String resourceGroupName); + } + /** The stage of the NetworkTap definition allowing to specify networkPacketBrokerId. */ + interface WithNetworkPacketBrokerId { + /** + * Specifies the networkPacketBrokerId property: ARM resource ID of the Network Packet Broker.. + * + * @param networkPacketBrokerId ARM resource ID of the Network Packet Broker. + * @return the next definition stage. + */ + WithDestinations withNetworkPacketBrokerId(String networkPacketBrokerId); + } + /** The stage of the NetworkTap definition allowing to specify destinations. */ + interface WithDestinations { + /** + * Specifies the destinations property: List of destinations to send the filter traffic.. + * + * @param destinations List of destinations to send the filter traffic. + * @return the next definition stage. + */ + WithCreate withDestinations(List destinations); + } + /** + * The stage of the NetworkTap definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithPollingType, DefinitionStages.WithAnnotation { + /** + * Executes the create request. + * + * @return the created resource. + */ + NetworkTap create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + NetworkTap create(Context context); + } + /** The stage of the NetworkTap definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the NetworkTap definition allowing to specify pollingType. */ + interface WithPollingType { + /** + * Specifies the pollingType property: Polling type.. + * + * @param pollingType Polling type. + * @return the next definition stage. + */ + WithCreate withPollingType(PollingType pollingType); + } + /** The stage of the NetworkTap definition allowing to specify annotation. */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + WithCreate withAnnotation(String annotation); + } + } + /** + * Begins update for the NetworkTap resource. + * + * @return the stage of resource update. + */ + NetworkTap.Update update(); + + /** The template for NetworkTap update. */ + interface Update + extends UpdateStages.WithTags, + UpdateStages.WithPollingType, + UpdateStages.WithDestinations, + UpdateStages.WithAnnotation { + /** + * Executes the update request. + * + * @return the updated resource. + */ + NetworkTap apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + NetworkTap apply(Context context); + } + /** The NetworkTap update stages. */ + interface UpdateStages { + /** The stage of the NetworkTap update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** The stage of the NetworkTap update allowing to specify pollingType. */ + interface WithPollingType { + /** + * Specifies the pollingType property: Polling type.. + * + * @param pollingType Polling type. + * @return the next definition stage. + */ + Update withPollingType(PollingType pollingType); + } + /** The stage of the NetworkTap update allowing to specify destinations. */ + interface WithDestinations { + /** + * Specifies the destinations property: List of destination properties to send the filter traffic.. + * + * @param destinations List of destination properties to send the filter traffic. + * @return the next definition stage. + */ + Update withDestinationsForUpdate(List destinations); + } + /** The stage of the NetworkTap update allowing to specify annotation. */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + Update withAnnotation(String annotation); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + NetworkTap refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + NetworkTap refresh(Context context); + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body); + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate resync(); + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate resync(Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatch.java new file mode 100644 index 0000000000000..cd54554b1c131 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatch.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapPatchableParameters; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** The NetworkFabric resource definition. */ +@Fluent +public final class NetworkTapPatch extends TagsUpdate { + /* + * Resource properties. + */ + @JsonProperty(value = "properties") + private NetworkTapPatchableParameters innerProperties; + + /** Creates an instance of NetworkTapPatch class. */ + public NetworkTapPatch() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private NetworkTapPatchableParameters innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapPatch withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the pollingType property: Polling type. + * + * @return the pollingType value. + */ + public PollingType pollingType() { + return this.innerProperties() == null ? null : this.innerProperties().pollingType(); + } + + /** + * Set the pollingType property: Polling type. + * + * @param pollingType the pollingType value to set. + * @return the NetworkTapPatch object itself. + */ + public NetworkTapPatch withPollingType(PollingType pollingType) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapPatchableParameters(); + } + this.innerProperties().withPollingType(pollingType); + return this; + } + + /** + * Get the destinations property: List of destination properties to send the filter traffic. + * + * @return the destinations value. + */ + public List destinations() { + return this.innerProperties() == null ? null : this.innerProperties().destinations(); + } + + /** + * Set the destinations property: List of destination properties to send the filter traffic. + * + * @param destinations the destinations value to set. + * @return the NetworkTapPatch object itself. + */ + public NetworkTapPatch withDestinations(List destinations) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapPatchableParameters(); + } + this.innerProperties().withDestinations(destinations); + return this; + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkTapPatch object itself. + */ + public NetworkTapPatch withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapPatchableParameters(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatchableParametersDestinationsItem.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatchableParametersDestinationsItem.java new file mode 100644 index 0000000000000..ac6c943becd64 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPatchableParametersDestinationsItem.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; + +/** Destination. */ +@Fluent +public final class NetworkTapPatchableParametersDestinationsItem extends DestinationProperties { + /** Creates an instance of NetworkTapPatchableParametersDestinationsItem class. */ + public NetworkTapPatchableParametersDestinationsItem() { + } + + /** {@inheritDoc} */ + @Override + public NetworkTapPatchableParametersDestinationsItem withName(String name) { + super.withName(name); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapPatchableParametersDestinationsItem withDestinationType(DestinationType destinationType) { + super.withDestinationType(destinationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapPatchableParametersDestinationsItem withDestinationId(String destinationId) { + super.withDestinationId(destinationId); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapPatchableParametersDestinationsItem withIsolationDomainProperties( + IsolationDomainProperties isolationDomainProperties) { + super.withIsolationDomainProperties(isolationDomainProperties); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapPatchableParametersDestinationsItem withDestinationTapRuleId(String destinationTapRuleId) { + super.withDestinationTapRuleId(destinationTapRuleId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPropertiesDestinationsItem.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPropertiesDestinationsItem.java new file mode 100644 index 0000000000000..ef60927a56d20 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapPropertiesDestinationsItem.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; + +/** Destination. */ +@Fluent +public final class NetworkTapPropertiesDestinationsItem extends DestinationProperties { + /** Creates an instance of NetworkTapPropertiesDestinationsItem class. */ + public NetworkTapPropertiesDestinationsItem() { + } + + /** {@inheritDoc} */ + @Override + public NetworkTapPropertiesDestinationsItem withName(String name) { + super.withName(name); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapPropertiesDestinationsItem withDestinationType(DestinationType destinationType) { + super.withDestinationType(destinationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapPropertiesDestinationsItem withDestinationId(String destinationId) { + super.withDestinationId(destinationId); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapPropertiesDestinationsItem withIsolationDomainProperties( + IsolationDomainProperties isolationDomainProperties) { + super.withIsolationDomainProperties(isolationDomainProperties); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapPropertiesDestinationsItem withDestinationTapRuleId(String destinationTapRuleId) { + super.withDestinationTapRuleId(destinationTapRuleId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRule.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRule.java new file mode 100644 index 0000000000000..14df3c1ef888e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRule.java @@ -0,0 +1,484 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of NetworkTapRule. */ +public interface NetworkTapRule { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the networkTapId property: The ARM resource Id of the NetworkTap. + * + * @return the networkTapId value. + */ + String networkTapId(); + + /** + * Gets the pollingIntervalInSeconds property: Polling interval in seconds. + * + * @return the pollingIntervalInSeconds value. + */ + PollingIntervalInSeconds pollingIntervalInSeconds(); + + /** + * Gets the lastSyncedTime property: The last sync timestamp. + * + * @return the lastSyncedTime value. + */ + OffsetDateTime lastSyncedTime(); + + /** + * Gets the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + AdministrativeState administrativeState(); + + /** + * Gets the configurationType property: Input method to configure Network Tap Rule. + * + * @return the configurationType value. + */ + ConfigurationType configurationType(); + + /** + * Gets the tapRulesUrl property: Network Tap Rules file URL. + * + * @return the tapRulesUrl value. + */ + String tapRulesUrl(); + + /** + * Gets the matchConfigurations property: List of match configurations. + * + * @return the matchConfigurations value. + */ + List matchConfigurations(); + + /** + * Gets the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @return the dynamicMatchConfigurations value. + */ + List dynamicMatchConfigurations(); + + /** + * Gets the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + String annotation(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner object. + * + * @return the inner object. + */ + NetworkTapRuleInner innerModel(); + + /** The entirety of the NetworkTapRule definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The NetworkTapRule definition stages. */ + interface DefinitionStages { + /** The first stage of the NetworkTapRule definition. */ + interface Blank extends WithLocation { + } + /** The stage of the NetworkTapRule definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + /** The stage of the NetworkTapRule definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the NetworkTapRule definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithPollingIntervalInSeconds, + DefinitionStages.WithConfigurationType, + DefinitionStages.WithTapRulesUrl, + DefinitionStages.WithMatchConfigurations, + DefinitionStages.WithDynamicMatchConfigurations, + DefinitionStages.WithAnnotation { + /** + * Executes the create request. + * + * @return the created resource. + */ + NetworkTapRule create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + NetworkTapRule create(Context context); + } + /** The stage of the NetworkTapRule definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the NetworkTapRule definition allowing to specify pollingIntervalInSeconds. */ + interface WithPollingIntervalInSeconds { + /** + * Specifies the pollingIntervalInSeconds property: Polling interval in seconds.. + * + * @param pollingIntervalInSeconds Polling interval in seconds. + * @return the next definition stage. + */ + WithCreate withPollingIntervalInSeconds(PollingIntervalInSeconds pollingIntervalInSeconds); + } + /** The stage of the NetworkTapRule definition allowing to specify configurationType. */ + interface WithConfigurationType { + /** + * Specifies the configurationType property: Input method to configure Network Tap Rule.. + * + * @param configurationType Input method to configure Network Tap Rule. + * @return the next definition stage. + */ + WithCreate withConfigurationType(ConfigurationType configurationType); + } + /** The stage of the NetworkTapRule definition allowing to specify tapRulesUrl. */ + interface WithTapRulesUrl { + /** + * Specifies the tapRulesUrl property: Network Tap Rules file URL.. + * + * @param tapRulesUrl Network Tap Rules file URL. + * @return the next definition stage. + */ + WithCreate withTapRulesUrl(String tapRulesUrl); + } + /** The stage of the NetworkTapRule definition allowing to specify matchConfigurations. */ + interface WithMatchConfigurations { + /** + * Specifies the matchConfigurations property: List of match configurations.. + * + * @param matchConfigurations List of match configurations. + * @return the next definition stage. + */ + WithCreate withMatchConfigurations(List matchConfigurations); + } + /** The stage of the NetworkTapRule definition allowing to specify dynamicMatchConfigurations. */ + interface WithDynamicMatchConfigurations { + /** + * Specifies the dynamicMatchConfigurations property: List of dynamic match configurations.. + * + * @param dynamicMatchConfigurations List of dynamic match configurations. + * @return the next definition stage. + */ + WithCreate withDynamicMatchConfigurations(List dynamicMatchConfigurations); + } + /** The stage of the NetworkTapRule definition allowing to specify annotation. */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + WithCreate withAnnotation(String annotation); + } + } + /** + * Begins update for the NetworkTapRule resource. + * + * @return the stage of resource update. + */ + NetworkTapRule.Update update(); + + /** The template for NetworkTapRule update. */ + interface Update + extends UpdateStages.WithTags, + UpdateStages.WithConfigurationType, + UpdateStages.WithTapRulesUrl, + UpdateStages.WithMatchConfigurations, + UpdateStages.WithDynamicMatchConfigurations, + UpdateStages.WithAnnotation { + /** + * Executes the update request. + * + * @return the updated resource. + */ + NetworkTapRule apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + NetworkTapRule apply(Context context); + } + /** The NetworkTapRule update stages. */ + interface UpdateStages { + /** The stage of the NetworkTapRule update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** The stage of the NetworkTapRule update allowing to specify configurationType. */ + interface WithConfigurationType { + /** + * Specifies the configurationType property: Input method to configure Network Tap Rule.. + * + * @param configurationType Input method to configure Network Tap Rule. + * @return the next definition stage. + */ + Update withConfigurationType(ConfigurationType configurationType); + } + /** The stage of the NetworkTapRule update allowing to specify tapRulesUrl. */ + interface WithTapRulesUrl { + /** + * Specifies the tapRulesUrl property: Network Tap Rules file URL.. + * + * @param tapRulesUrl Network Tap Rules file URL. + * @return the next definition stage. + */ + Update withTapRulesUrl(String tapRulesUrl); + } + /** The stage of the NetworkTapRule update allowing to specify matchConfigurations. */ + interface WithMatchConfigurations { + /** + * Specifies the matchConfigurations property: List of match configurations.. + * + * @param matchConfigurations List of match configurations. + * @return the next definition stage. + */ + Update withMatchConfigurations(List matchConfigurations); + } + /** The stage of the NetworkTapRule update allowing to specify dynamicMatchConfigurations. */ + interface WithDynamicMatchConfigurations { + /** + * Specifies the dynamicMatchConfigurations property: List of dynamic match configurations.. + * + * @param dynamicMatchConfigurations List of dynamic match configurations. + * @return the next definition stage. + */ + Update withDynamicMatchConfigurations(List dynamicMatchConfigurations); + } + /** The stage of the NetworkTapRule update allowing to specify annotation. */ + interface WithAnnotation { + /** + * Specifies the annotation property: Switch configuration description.. + * + * @param annotation Switch configuration description. + * @return the next definition stage. + */ + Update withAnnotation(String annotation); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + NetworkTapRule refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + NetworkTapRule refresh(Context context); + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate resync(); + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate resync(Context context); + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + ValidateConfigurationResponse validateConfiguration(); + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + ValidateConfigurationResponse validateConfiguration(Context context); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleAction.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleAction.java new file mode 100644 index 0000000000000..526b9c4c72eba --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleAction.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Action that need to performed. */ +@Fluent +public final class NetworkTapRuleAction { + /* + * Type of actions that can be performed. + */ + @JsonProperty(value = "type") + private TapRuleActionType type; + + /* + * Truncate. 0 indicates do not truncate. + */ + @JsonProperty(value = "truncate") + private String truncate; + + /* + * The parameter to enable or disable the timestamp. + */ + @JsonProperty(value = "isTimestampEnabled") + private BooleanEnumProperty isTimestampEnabled; + + /* + * Destination Id. The ARM resource Id may be either Network To Network Interconnect or NeighborGroup. + */ + @JsonProperty(value = "destinationId") + private String destinationId; + + /* + * 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. + */ + @JsonProperty(value = "matchConfigurationName") + private String matchConfigurationName; + + /** Creates an instance of NetworkTapRuleAction class. */ + public NetworkTapRuleAction() { + } + + /** + * Get the type property: Type of actions that can be performed. + * + * @return the type value. + */ + public TapRuleActionType type() { + return this.type; + } + + /** + * Set the type property: Type of actions that can be performed. + * + * @param type the type value to set. + * @return the NetworkTapRuleAction object itself. + */ + public NetworkTapRuleAction withType(TapRuleActionType type) { + this.type = type; + return this; + } + + /** + * Get the truncate property: Truncate. 0 indicates do not truncate. + * + * @return the truncate value. + */ + public String truncate() { + return this.truncate; + } + + /** + * Set the truncate property: Truncate. 0 indicates do not truncate. + * + * @param truncate the truncate value to set. + * @return the NetworkTapRuleAction object itself. + */ + public NetworkTapRuleAction withTruncate(String truncate) { + this.truncate = truncate; + return this; + } + + /** + * Get the isTimestampEnabled property: The parameter to enable or disable the timestamp. + * + * @return the isTimestampEnabled value. + */ + public BooleanEnumProperty isTimestampEnabled() { + return this.isTimestampEnabled; + } + + /** + * Set the isTimestampEnabled property: The parameter to enable or disable the timestamp. + * + * @param isTimestampEnabled the isTimestampEnabled value to set. + * @return the NetworkTapRuleAction object itself. + */ + public NetworkTapRuleAction withIsTimestampEnabled(BooleanEnumProperty isTimestampEnabled) { + this.isTimestampEnabled = isTimestampEnabled; + return this; + } + + /** + * Get the destinationId property: Destination Id. The ARM resource Id may be either Network To Network Interconnect + * or NeighborGroup. + * + * @return the destinationId value. + */ + public String destinationId() { + return this.destinationId; + } + + /** + * Set the destinationId property: Destination Id. The ARM resource Id may be either Network To Network Interconnect + * or NeighborGroup. + * + * @param destinationId the destinationId value to set. + * @return the NetworkTapRuleAction object itself. + */ + public NetworkTapRuleAction withDestinationId(String destinationId) { + this.destinationId = destinationId; + return this; + } + + /** + * Get the matchConfigurationName property: 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. + * + * @return the matchConfigurationName value. + */ + public String matchConfigurationName() { + return this.matchConfigurationName; + } + + /** + * Set the matchConfigurationName property: 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. + * + * @param matchConfigurationName the matchConfigurationName value to set. + * @return the NetworkTapRuleAction object itself. + */ + public NetworkTapRuleAction withMatchConfigurationName(String matchConfigurationName) { + this.matchConfigurationName = matchConfigurationName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchCondition.java new file mode 100644 index 0000000000000..f1937a3e294bb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchCondition.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Defines the match condition that is supported to filter the traffic. */ +@Fluent +public final class NetworkTapRuleMatchCondition extends CommonMatchConditions { + /* + * Encapsulation Type. + */ + @JsonProperty(value = "encapsulationType") + private EncapsulationType encapsulationType; + + /* + * Defines the port condition that needs to be matched. + */ + @JsonProperty(value = "portCondition") + private PortCondition portCondition; + + /** Creates an instance of NetworkTapRuleMatchCondition class. */ + public NetworkTapRuleMatchCondition() { + } + + /** + * Get the encapsulationType property: Encapsulation Type. + * + * @return the encapsulationType value. + */ + public EncapsulationType encapsulationType() { + return this.encapsulationType; + } + + /** + * Set the encapsulationType property: Encapsulation Type. + * + * @param encapsulationType the encapsulationType value to set. + * @return the NetworkTapRuleMatchCondition object itself. + */ + public NetworkTapRuleMatchCondition withEncapsulationType(EncapsulationType encapsulationType) { + this.encapsulationType = encapsulationType; + return this; + } + + /** + * Get the portCondition property: Defines the port condition that needs to be matched. + * + * @return the portCondition value. + */ + public PortCondition portCondition() { + return this.portCondition; + } + + /** + * Set the portCondition property: Defines the port condition that needs to be matched. + * + * @param portCondition the portCondition value to set. + * @return the NetworkTapRuleMatchCondition object itself. + */ + public NetworkTapRuleMatchCondition withPortCondition(PortCondition portCondition) { + this.portCondition = portCondition; + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapRuleMatchCondition withProtocolTypes(List protocolTypes) { + super.withProtocolTypes(protocolTypes); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapRuleMatchCondition withVlanMatchCondition(VlanMatchCondition vlanMatchCondition) { + super.withVlanMatchCondition(vlanMatchCondition); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapRuleMatchCondition withIpCondition(IpMatchCondition ipCondition) { + super.withIpCondition(ipCondition); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (portCondition() != null) { + portCondition().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfiguration.java new file mode 100644 index 0000000000000..ed538a622f66f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRuleMatchConfiguration.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Defines the match configuration that are supported to filter the traffic. */ +@Fluent +public final class NetworkTapRuleMatchConfiguration { + /* + * The name of the match configuration. + */ + @JsonProperty(value = "matchConfigurationName") + private String matchConfigurationName; + + /* + * Sequence Number of the match configuration.. + */ + @JsonProperty(value = "sequenceNumber") + private Long sequenceNumber; + + /* + * Type of IP Address. IPv4 or IPv6 + */ + @JsonProperty(value = "ipAddressType") + private IpAddressType ipAddressType; + + /* + * List of the match conditions. + */ + @JsonProperty(value = "matchConditions") + private List matchConditions; + + /* + * List of actions that need to be performed for the matched conditions. + */ + @JsonProperty(value = "actions") + private List actions; + + /** Creates an instance of NetworkTapRuleMatchConfiguration class. */ + public NetworkTapRuleMatchConfiguration() { + } + + /** + * Get the matchConfigurationName property: The name of the match configuration. + * + * @return the matchConfigurationName value. + */ + public String matchConfigurationName() { + return this.matchConfigurationName; + } + + /** + * Set the matchConfigurationName property: The name of the match configuration. + * + * @param matchConfigurationName the matchConfigurationName value to set. + * @return the NetworkTapRuleMatchConfiguration object itself. + */ + public NetworkTapRuleMatchConfiguration withMatchConfigurationName(String matchConfigurationName) { + this.matchConfigurationName = matchConfigurationName; + return this; + } + + /** + * Get the sequenceNumber property: Sequence Number of the match configuration.. + * + * @return the sequenceNumber value. + */ + public Long sequenceNumber() { + return this.sequenceNumber; + } + + /** + * Set the sequenceNumber property: Sequence Number of the match configuration.. + * + * @param sequenceNumber the sequenceNumber value to set. + * @return the NetworkTapRuleMatchConfiguration object itself. + */ + public NetworkTapRuleMatchConfiguration withSequenceNumber(Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + return this; + } + + /** + * Get the ipAddressType property: Type of IP Address. IPv4 or IPv6. + * + * @return the ipAddressType value. + */ + public IpAddressType ipAddressType() { + return this.ipAddressType; + } + + /** + * Set the ipAddressType property: Type of IP Address. IPv4 or IPv6. + * + * @param ipAddressType the ipAddressType value to set. + * @return the NetworkTapRuleMatchConfiguration object itself. + */ + public NetworkTapRuleMatchConfiguration withIpAddressType(IpAddressType ipAddressType) { + this.ipAddressType = ipAddressType; + return this; + } + + /** + * Get the matchConditions property: List of the match conditions. + * + * @return the matchConditions value. + */ + public List matchConditions() { + return this.matchConditions; + } + + /** + * Set the matchConditions property: List of the match conditions. + * + * @param matchConditions the matchConditions value to set. + * @return the NetworkTapRuleMatchConfiguration object itself. + */ + public NetworkTapRuleMatchConfiguration withMatchConditions(List matchConditions) { + this.matchConditions = matchConditions; + return this; + } + + /** + * Get the actions property: List of actions that need to be performed for the matched conditions. + * + * @return the actions value. + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions property: List of actions that need to be performed for the matched conditions. + * + * @param actions the actions value to set. + * @return the NetworkTapRuleMatchConfiguration object itself. + */ + public NetworkTapRuleMatchConfiguration withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (matchConditions() != null) { + matchConditions().forEach(e -> e.validate()); + } + if (actions() != null) { + actions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatch.java new file mode 100644 index 0000000000000..269eba02590a0 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatch.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRulePatchProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** The NetworkTapRule resource definition. */ +@Fluent +public final class NetworkTapRulePatch extends TagsUpdate { + /* + * Network Tap Rule Patch properties. + */ + @JsonProperty(value = "properties") + private NetworkTapRulePatchProperties innerProperties; + + /** Creates an instance of NetworkTapRulePatch class. */ + public NetworkTapRulePatch() { + } + + /** + * Get the innerProperties property: Network Tap Rule Patch properties. + * + * @return the innerProperties value. + */ + private NetworkTapRulePatchProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public NetworkTapRulePatch withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the configurationType property: Input method to configure Network Tap Rule. + * + * @return the configurationType value. + */ + public ConfigurationType configurationType() { + return this.innerProperties() == null ? null : this.innerProperties().configurationType(); + } + + /** + * Set the configurationType property: Input method to configure Network Tap Rule. + * + * @param configurationType the configurationType value to set. + * @return the NetworkTapRulePatch object itself. + */ + public NetworkTapRulePatch withConfigurationType(ConfigurationType configurationType) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapRulePatchProperties(); + } + this.innerProperties().withConfigurationType(configurationType); + return this; + } + + /** + * Get the tapRulesUrl property: Network Tap Rules file URL. + * + * @return the tapRulesUrl value. + */ + public String tapRulesUrl() { + return this.innerProperties() == null ? null : this.innerProperties().tapRulesUrl(); + } + + /** + * Set the tapRulesUrl property: Network Tap Rules file URL. + * + * @param tapRulesUrl the tapRulesUrl value to set. + * @return the NetworkTapRulePatch object itself. + */ + public NetworkTapRulePatch withTapRulesUrl(String tapRulesUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapRulePatchProperties(); + } + this.innerProperties().withTapRulesUrl(tapRulesUrl); + return this; + } + + /** + * Get the matchConfigurations property: List of match configurations. + * + * @return the matchConfigurations value. + */ + public List matchConfigurations() { + return this.innerProperties() == null ? null : this.innerProperties().matchConfigurations(); + } + + /** + * Set the matchConfigurations property: List of match configurations. + * + * @param matchConfigurations the matchConfigurations value to set. + * @return the NetworkTapRulePatch object itself. + */ + public NetworkTapRulePatch withMatchConfigurations(List matchConfigurations) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapRulePatchProperties(); + } + this.innerProperties().withMatchConfigurations(matchConfigurations); + return this; + } + + /** + * Get the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @return the dynamicMatchConfigurations value. + */ + public List dynamicMatchConfigurations() { + return this.innerProperties() == null ? null : this.innerProperties().dynamicMatchConfigurations(); + } + + /** + * Set the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @param dynamicMatchConfigurations the dynamicMatchConfigurations value to set. + * @return the NetworkTapRulePatch object itself. + */ + public NetworkTapRulePatch withDynamicMatchConfigurations( + List dynamicMatchConfigurations) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapRulePatchProperties(); + } + this.innerProperties().withDynamicMatchConfigurations(dynamicMatchConfigurations); + return this; + } + + /** + * Get the annotation property: Switch configuration description. + * + * @return the annotation value. + */ + public String annotation() { + return this.innerProperties() == null ? null : this.innerProperties().annotation(); + } + + /** + * Set the annotation property: Switch configuration description. + * + * @param annotation the annotation value to set. + * @return the NetworkTapRulePatch object itself. + */ + public NetworkTapRulePatch withAnnotation(String annotation) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkTapRulePatchProperties(); + } + this.innerProperties().withAnnotation(annotation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatchableProperties.java new file mode 100644 index 0000000000000..8c89d4f47a0f9 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulePatchableProperties.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Network Tap Rule updatable properties. */ +@Fluent +public class NetworkTapRulePatchableProperties { + /* + * Input method to configure Network Tap Rule. + */ + @JsonProperty(value = "configurationType") + private ConfigurationType configurationType; + + /* + * Network Tap Rules file URL. + */ + @JsonProperty(value = "tapRulesUrl") + private String tapRulesUrl; + + /* + * List of match configurations. + */ + @JsonProperty(value = "matchConfigurations") + private List matchConfigurations; + + /* + * List of dynamic match configurations. + */ + @JsonProperty(value = "dynamicMatchConfigurations") + private List dynamicMatchConfigurations; + + /** Creates an instance of NetworkTapRulePatchableProperties class. */ + public NetworkTapRulePatchableProperties() { + } + + /** + * Get the configurationType property: Input method to configure Network Tap Rule. + * + * @return the configurationType value. + */ + public ConfigurationType configurationType() { + return this.configurationType; + } + + /** + * Set the configurationType property: Input method to configure Network Tap Rule. + * + * @param configurationType the configurationType value to set. + * @return the NetworkTapRulePatchableProperties object itself. + */ + public NetworkTapRulePatchableProperties withConfigurationType(ConfigurationType configurationType) { + this.configurationType = configurationType; + return this; + } + + /** + * Get the tapRulesUrl property: Network Tap Rules file URL. + * + * @return the tapRulesUrl value. + */ + public String tapRulesUrl() { + return this.tapRulesUrl; + } + + /** + * Set the tapRulesUrl property: Network Tap Rules file URL. + * + * @param tapRulesUrl the tapRulesUrl value to set. + * @return the NetworkTapRulePatchableProperties object itself. + */ + public NetworkTapRulePatchableProperties withTapRulesUrl(String tapRulesUrl) { + this.tapRulesUrl = tapRulesUrl; + return this; + } + + /** + * Get the matchConfigurations property: List of match configurations. + * + * @return the matchConfigurations value. + */ + public List matchConfigurations() { + return this.matchConfigurations; + } + + /** + * Set the matchConfigurations property: List of match configurations. + * + * @param matchConfigurations the matchConfigurations value to set. + * @return the NetworkTapRulePatchableProperties object itself. + */ + public NetworkTapRulePatchableProperties withMatchConfigurations( + List matchConfigurations) { + this.matchConfigurations = matchConfigurations; + return this; + } + + /** + * Get the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @return the dynamicMatchConfigurations value. + */ + public List dynamicMatchConfigurations() { + return this.dynamicMatchConfigurations; + } + + /** + * Set the dynamicMatchConfigurations property: List of dynamic match configurations. + * + * @param dynamicMatchConfigurations the dynamicMatchConfigurations value to set. + * @return the NetworkTapRulePatchableProperties object itself. + */ + public NetworkTapRulePatchableProperties withDynamicMatchConfigurations( + List dynamicMatchConfigurations) { + this.dynamicMatchConfigurations = dynamicMatchConfigurations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (matchConfigurations() != null) { + matchConfigurations().forEach(e -> e.validate()); + } + if (dynamicMatchConfigurations() != null) { + dynamicMatchConfigurations().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRules.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRules.java new file mode 100644 index 0000000000000..bf421570591b6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRules.java @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of NetworkTapRules. */ +public interface NetworkTapRules { + /** + * Gets a Network Tap Rule. + * + *

Get Network Tap Rule resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Tap Rule resource details along with {@link Response}. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String networkTapRuleName, Context context); + + /** + * Gets a Network Tap Rule. + * + *

Get Network Tap Rule resource details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Tap Rule resource details. + */ + NetworkTapRule getByResourceGroup(String resourceGroupName, String networkTapRuleName); + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String networkTapRuleName); + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String networkTapRuleName, Context context); + + /** + * List Network Tap Rules by resource group. + * + *

List all the Network Tap Rule resources in the given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List Network Tap Rules by resource group. + * + *

List all the Network Tap Rule resources in the given resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List NetworkTapRules by subscription. + * + *

List all the Network Tap Rule resources in the given subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List NetworkTapRules by subscription. + * + *

List all the Network Tap Rule resources in the given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTapRules as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateAdministrativeState( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body); + + /** + * Updates administrative state of Network Tap Rules. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateAdministrativeState( + String resourceGroupName, String networkTapRuleName, UpdateAdministrativeState body, Context context); + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String networkTapRuleName); + + /** + * Resync the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String networkTapRuleName, Context context); + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String networkTapRuleName); + + /** + * Validates the configuration of the Network Tap Rule. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapRuleName Name of the Network Tap Rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + ValidateConfigurationResponse validateConfiguration( + String resourceGroupName, String networkTapRuleName, Context context); + + /** + * Gets a Network Tap Rule. + * + *

Get Network Tap Rule resource details. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Tap Rule resource details along with {@link Response}. + */ + NetworkTapRule getById(String id); + + /** + * Gets a Network Tap Rule. + * + *

Get Network Tap Rule resource details. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return network Tap Rule resource details along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a Network Tap Rule. + * + *

Delete Network Tap Rule resource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new NetworkTapRule resource. + * + * @param name resource name. + * @return the first stage of the new NetworkTapRule definition. + */ + NetworkTapRule.DefinitionStages.Blank define(String name); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackSkusListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulesListResult.java similarity index 67% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackSkusListResult.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulesListResult.java index ed6c22d164649..bf63f6c059e5b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackSkusListResult.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapRulesListResult.java @@ -5,18 +5,18 @@ package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackSkuInner; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapRuleInner; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of NetworkRackSkus. */ +/** List of NetworkTapRules. */ @Fluent -public final class NetworkRackSkusListResult { +public final class NetworkTapRulesListResult { /* - * List of NetworkRackSku resources. + * List of NetworkTapRule resources. */ @JsonProperty(value = "value") - private List value; + private List value; /* * Url to follow for getting next page of resources. @@ -24,26 +24,26 @@ public final class NetworkRackSkusListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of NetworkRackSkusListResult class. */ - public NetworkRackSkusListResult() { + /** Creates an instance of NetworkTapRulesListResult class. */ + public NetworkTapRulesListResult() { } /** - * Get the value property: List of NetworkRackSku resources. + * Get the value property: List of NetworkTapRule resources. * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** - * Set the value property: List of NetworkRackSku resources. + * Set the value property: List of NetworkTapRule resources. * * @param value the value value to set. - * @return the NetworkRackSkusListResult object itself. + * @return the NetworkTapRulesListResult object itself. */ - public NetworkRackSkusListResult withValue(List value) { + public NetworkTapRulesListResult withValue(List value) { this.value = value; return this; } @@ -61,9 +61,9 @@ public String nextLink() { * Set the nextLink property: Url to follow for getting next page of resources. * * @param nextLink the nextLink value to set. - * @return the NetworkRackSkusListResult object itself. + * @return the NetworkTapRulesListResult object itself. */ - public NetworkRackSkusListResult withNextLink(String nextLink) { + public NetworkTapRulesListResult withNextLink(String nextLink) { this.nextLink = nextLink; return this; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTaps.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTaps.java new file mode 100644 index 0000000000000..9efb1d040bf98 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTaps.java @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of NetworkTaps. */ +public interface NetworkTaps { + /** + * Gets a Network Tap. + * + *

Retrieves details of this Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition along with {@link Response}. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String networkTapName, Context context); + + /** + * Gets a Network Tap. + * + *

Retrieves details of this Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition. + */ + NetworkTap getByResourceGroup(String resourceGroupName, String networkTapName); + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String networkTapName); + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String networkTapName, Context context); + + /** + * List Network Taps by resource group. + * + *

Displays Network Taps list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List Network Taps by resource group. + * + *

Displays Network Taps list by resource group GET method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List Network Taps by subscription. + * + *

Displays Network Taps list by subscription GET method. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List Network Taps by subscription. + * + *

Displays Network Taps list by subscription GET method. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of NetworkTaps as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + CommonPostActionResponseForDeviceUpdate updateAdministrativeState( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body); + + /** + * Updates administrative state of Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + CommonPostActionResponseForDeviceUpdate updateAdministrativeState( + String resourceGroupName, String networkTapName, UpdateAdministrativeState body, Context context); + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String networkTapName); + + /** + * Resync operation on the Network Tap. + * + *

Implements the operation to the underlying resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkTapName Name of the Network Tap. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate resync(String resourceGroupName, String networkTapName, Context context); + + /** + * Gets a Network Tap. + * + *

Retrieves details of this Network Tap. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition along with {@link Response}. + */ + NetworkTap getById(String id); + + /** + * Gets a Network Tap. + * + *

Retrieves details of this Network Tap. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Network Tap resource definition along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a Network Tap. + * + *

Deletes Network Tap. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new NetworkTap resource. + * + * @param name resource name. + * @return the first stage of the new NetworkTap definition. + */ + NetworkTap.DefinitionStages.Blank define(String name); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapsListResult.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapsListResult.java new file mode 100644 index 0000000000000..6d34f5b6b2e28 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkTapsListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkTapInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of NetworkTaps. */ +@Fluent +public final class NetworkTapsListResult { + /* + * List of NetworkTap resources. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Url to follow for getting next page of resources. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of NetworkTapsListResult class. */ + public NetworkTapsListResult() { + } + + /** + * Get the value property: List of NetworkTap resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of NetworkTap resources. + * + * @param value the value value to set. + * @return the NetworkTapsListResult object itself. + */ + public NetworkTapsListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Url to follow for getting next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: Url to follow for getting next page of resources. + * + * @param nextLink the nextLink value to set. + * @return the NetworkTapsListResult object itself. + */ + public NetworkTapsListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnect.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnect.java index f1bf22662b50e..1af59f61007f7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnect.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnect.java @@ -45,49 +45,97 @@ public interface NetworkToNetworkInterconnect { */ NniType nniType(); - /** - * Gets the administrativeState property: Gets the administrativeState of the resource. Example -Enabled/Disabled. - * - * @return the administrativeState value. - */ - EnabledDisabledState administrativeState(); - /** * Gets the isManagementType property: Configuration to use NNI for Infrastructure Management. Example: True/False. * * @return the isManagementType value. */ - BooleanEnumProperty isManagementType(); + IsManagementType isManagementType(); /** - * Gets the useOptionB property: Based on this parameter the layer2/layer3 is made as mandatory. Example: - * True/False. + * Gets the useOptionB property: Based on this option layer3 parameters are mandatory. Example: True/False. * * @return the useOptionB value. */ BooleanEnumProperty useOptionB(); /** - * Gets the layer2Configuration property: Common properties for Layer2Configuration. + * Gets the layer2Configuration property: Common properties for Layer2 Configuration. * * @return the layer2Configuration value. */ Layer2Configuration layer2Configuration(); /** - * Gets the layer3Configuration property: Common properties for Layer3Configuration. + * Gets the optionBLayer3Configuration property: Common properties for Layer3Configuration. + * + * @return the optionBLayer3Configuration value. + */ + NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration(); + + /** + * Gets the npbStaticRouteConfiguration property: NPB Static Route Configuration properties. + * + * @return the npbStaticRouteConfiguration value. + */ + NpbStaticRouteConfiguration npbStaticRouteConfiguration(); + + /** + * Gets the importRoutePolicy property: Import Route Policy configuration. + * + * @return the importRoutePolicy value. + */ + ImportRoutePolicyInformation importRoutePolicy(); + + /** + * Gets the exportRoutePolicy property: Export Route Policy configuration. + * + * @return the exportRoutePolicy value. + */ + ExportRoutePolicyInformation exportRoutePolicy(); + + /** + * Gets the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @return the egressAclId value. + */ + String egressAclId(); + + /** + * Gets the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @return the ingressAclId value. + */ + String ingressAclId(); + + /** + * Gets the configurationState property: Configuration state of the resource. * - * @return the layer3Configuration value. + * @return the configurationState value. */ - Layer3Configuration layer3Configuration(); + ConfigurationState configurationState(); /** - * Gets the provisioningState property: Gets the provisioning state of the resource. + * Gets the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ ProvisioningState provisioningState(); + /** + * Gets the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + AdministrativeState administrativeState(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner * object. @@ -98,7 +146,10 @@ public interface NetworkToNetworkInterconnect { /** The entirety of the NetworkToNetworkInterconnect definition. */ interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithUseOptionB, + DefinitionStages.WithCreate { } /** The NetworkToNetworkInterconnect definition stages. */ interface DefinitionStages { @@ -111,10 +162,21 @@ interface WithParentResource { * Specifies resourceGroupName, networkFabricName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. + * @return the next definition stage. + */ + WithUseOptionB withExistingNetworkFabric(String resourceGroupName, String networkFabricName); + } + /** The stage of the NetworkToNetworkInterconnect definition allowing to specify useOptionB. */ + interface WithUseOptionB { + /** + * Specifies the useOptionB property: Based on this option layer3 parameters are mandatory. Example: + * True/False. + * + * @param useOptionB Based on this option layer3 parameters are mandatory. Example: True/False. * @return the next definition stage. */ - WithCreate withExistingNetworkFabric(String resourceGroupName, String networkFabricName); + WithCreate withUseOptionB(BooleanEnumProperty useOptionB); } /** * The stage of the NetworkToNetworkInterconnect definition which contains all the minimum required properties @@ -123,9 +185,13 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithNniType, DefinitionStages.WithIsManagementType, - DefinitionStages.WithUseOptionB, DefinitionStages.WithLayer2Configuration, - DefinitionStages.WithLayer3Configuration { + DefinitionStages.WithOptionBLayer3Configuration, + DefinitionStages.WithNpbStaticRouteConfiguration, + DefinitionStages.WithImportRoutePolicy, + DefinitionStages.WithExportRoutePolicy, + DefinitionStages.WithEgressAclId, + DefinitionStages.WithIngressAclId { /** * Executes the create request. * @@ -160,20 +226,114 @@ interface WithIsManagementType { * @param isManagementType Configuration to use NNI for Infrastructure Management. Example: True/False. * @return the next definition stage. */ - WithCreate withIsManagementType(BooleanEnumProperty isManagementType); + WithCreate withIsManagementType(IsManagementType isManagementType); } - /** The stage of the NetworkToNetworkInterconnect definition allowing to specify useOptionB. */ - interface WithUseOptionB { + /** The stage of the NetworkToNetworkInterconnect definition allowing to specify layer2Configuration. */ + interface WithLayer2Configuration { /** - * Specifies the useOptionB property: Based on this parameter the layer2/layer3 is made as mandatory. - * Example: True/False. + * Specifies the layer2Configuration property: Common properties for Layer2 Configuration.. * - * @param useOptionB Based on this parameter the layer2/layer3 is made as mandatory. Example: True/False. + * @param layer2Configuration Common properties for Layer2 Configuration. * @return the next definition stage. */ - WithCreate withUseOptionB(BooleanEnumProperty useOptionB); + WithCreate withLayer2Configuration(Layer2Configuration layer2Configuration); } - /** The stage of the NetworkToNetworkInterconnect definition allowing to specify layer2Configuration. */ + /** The stage of the NetworkToNetworkInterconnect definition allowing to specify optionBLayer3Configuration. */ + interface WithOptionBLayer3Configuration { + /** + * Specifies the optionBLayer3Configuration property: Common properties for Layer3Configuration.. + * + * @param optionBLayer3Configuration Common properties for Layer3Configuration. + * @return the next definition stage. + */ + WithCreate withOptionBLayer3Configuration( + NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration); + } + /** The stage of the NetworkToNetworkInterconnect definition allowing to specify npbStaticRouteConfiguration. */ + interface WithNpbStaticRouteConfiguration { + /** + * Specifies the npbStaticRouteConfiguration property: NPB Static Route Configuration properties.. + * + * @param npbStaticRouteConfiguration NPB Static Route Configuration properties. + * @return the next definition stage. + */ + WithCreate withNpbStaticRouteConfiguration(NpbStaticRouteConfiguration npbStaticRouteConfiguration); + } + /** The stage of the NetworkToNetworkInterconnect definition allowing to specify importRoutePolicy. */ + interface WithImportRoutePolicy { + /** + * Specifies the importRoutePolicy property: Import Route Policy configuration.. + * + * @param importRoutePolicy Import Route Policy configuration. + * @return the next definition stage. + */ + WithCreate withImportRoutePolicy(ImportRoutePolicyInformation importRoutePolicy); + } + /** The stage of the NetworkToNetworkInterconnect definition allowing to specify exportRoutePolicy. */ + interface WithExportRoutePolicy { + /** + * Specifies the exportRoutePolicy property: Export Route Policy configuration.. + * + * @param exportRoutePolicy Export Route Policy configuration. + * @return the next definition stage. + */ + WithCreate withExportRoutePolicy(ExportRoutePolicyInformation exportRoutePolicy); + } + /** The stage of the NetworkToNetworkInterconnect definition allowing to specify egressAclId. */ + interface WithEgressAclId { + /** + * Specifies the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists.. + * + * @param egressAclId Egress Acl. ARM resource ID of Access Control Lists. + * @return the next definition stage. + */ + WithCreate withEgressAclId(String egressAclId); + } + /** The stage of the NetworkToNetworkInterconnect definition allowing to specify ingressAclId. */ + interface WithIngressAclId { + /** + * Specifies the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists.. + * + * @param ingressAclId Ingress Acl. ARM resource ID of Access Control Lists. + * @return the next definition stage. + */ + WithCreate withIngressAclId(String ingressAclId); + } + } + /** + * Begins update for the NetworkToNetworkInterconnect resource. + * + * @return the stage of resource update. + */ + NetworkToNetworkInterconnect.Update update(); + + /** The template for NetworkToNetworkInterconnect update. */ + interface Update + extends UpdateStages.WithLayer2Configuration, + UpdateStages.WithOptionBLayer3Configuration, + UpdateStages.WithNpbStaticRouteConfiguration, + UpdateStages.WithImportRoutePolicy, + UpdateStages.WithExportRoutePolicy, + UpdateStages.WithEgressAclId, + UpdateStages.WithIngressAclId { + /** + * Executes the update request. + * + * @return the updated resource. + */ + NetworkToNetworkInterconnect apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + NetworkToNetworkInterconnect apply(Context context); + } + /** The NetworkToNetworkInterconnect update stages. */ + interface UpdateStages { + /** The stage of the NetworkToNetworkInterconnect update allowing to specify layer2Configuration. */ interface WithLayer2Configuration { /** * Specifies the layer2Configuration property: Common properties for Layer2Configuration.. @@ -181,17 +341,67 @@ interface WithLayer2Configuration { * @param layer2Configuration Common properties for Layer2Configuration. * @return the next definition stage. */ - WithCreate withLayer2Configuration(Layer2Configuration layer2Configuration); + Update withLayer2Configuration(Layer2Configuration layer2Configuration); + } + /** The stage of the NetworkToNetworkInterconnect update allowing to specify optionBLayer3Configuration. */ + interface WithOptionBLayer3Configuration { + /** + * Specifies the optionBLayer3Configuration property: Common properties for Layer3Configuration.. + * + * @param optionBLayer3Configuration Common properties for Layer3Configuration. + * @return the next definition stage. + */ + Update withOptionBLayer3Configuration(OptionBLayer3Configuration optionBLayer3Configuration); } - /** The stage of the NetworkToNetworkInterconnect definition allowing to specify layer3Configuration. */ - interface WithLayer3Configuration { + /** The stage of the NetworkToNetworkInterconnect update allowing to specify npbStaticRouteConfiguration. */ + interface WithNpbStaticRouteConfiguration { /** - * Specifies the layer3Configuration property: Common properties for Layer3Configuration.. + * Specifies the npbStaticRouteConfiguration property: NPB Static Route Configuration properties.. * - * @param layer3Configuration Common properties for Layer3Configuration. + * @param npbStaticRouteConfiguration NPB Static Route Configuration properties. * @return the next definition stage. */ - WithCreate withLayer3Configuration(Layer3Configuration layer3Configuration); + Update withNpbStaticRouteConfiguration(NpbStaticRouteConfiguration npbStaticRouteConfiguration); + } + /** The stage of the NetworkToNetworkInterconnect update allowing to specify importRoutePolicy. */ + interface WithImportRoutePolicy { + /** + * Specifies the importRoutePolicy property: Import Route Policy information.. + * + * @param importRoutePolicy Import Route Policy information. + * @return the next definition stage. + */ + Update withImportRoutePolicy(ImportRoutePolicyInformation importRoutePolicy); + } + /** The stage of the NetworkToNetworkInterconnect update allowing to specify exportRoutePolicy. */ + interface WithExportRoutePolicy { + /** + * Specifies the exportRoutePolicy property: Export Route Policy information. + * + * @param exportRoutePolicy Export Route Policy information. + * @return the next definition stage. + */ + Update withExportRoutePolicy(ExportRoutePolicyInformation exportRoutePolicy); + } + /** The stage of the NetworkToNetworkInterconnect update allowing to specify egressAclId. */ + interface WithEgressAclId { + /** + * Specifies the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists.. + * + * @param egressAclId Egress Acl. ARM resource ID of Access Control Lists. + * @return the next definition stage. + */ + Update withEgressAclId(String egressAclId); + } + /** The stage of the NetworkToNetworkInterconnect update allowing to specify ingressAclId. */ + interface WithIngressAclId { + /** + * Specifies the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists.. + * + * @param ingressAclId Ingress Acl. ARM resource ID of Access Control Lists. + * @return the next definition stage. + */ + Update withIngressAclId(String ingressAclId); } } /** @@ -208,4 +418,59 @@ interface WithLayer3Configuration { * @return the refreshed resource. */ NetworkToNetworkInterconnect refresh(Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState(UpdateAdministrativeState body); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState( + UpdateAdministrativeState body, Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPatch.java new file mode 100644 index 0000000000000..33eda5b77d02c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPatch.java @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectPatchableProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Network To Network Interconnect resource patch definition. */ +@Fluent +public final class NetworkToNetworkInterconnectPatch extends ProxyResource { + /* + * Resource properties. + */ + @JsonProperty(value = "properties") + private NetworkToNetworkInterconnectPatchableProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of NetworkToNetworkInterconnectPatch class. */ + public NetworkToNetworkInterconnectPatch() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private NetworkToNetworkInterconnectPatchableProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the layer2Configuration property: Common properties for Layer2Configuration. + * + * @return the layer2Configuration value. + */ + public Layer2Configuration layer2Configuration() { + return this.innerProperties() == null ? null : this.innerProperties().layer2Configuration(); + } + + /** + * Set the layer2Configuration property: Common properties for Layer2Configuration. + * + * @param layer2Configuration the layer2Configuration value to set. + * @return the NetworkToNetworkInterconnectPatch object itself. + */ + public NetworkToNetworkInterconnectPatch withLayer2Configuration(Layer2Configuration layer2Configuration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectPatchableProperties(); + } + this.innerProperties().withLayer2Configuration(layer2Configuration); + return this; + } + + /** + * Get the optionBLayer3Configuration property: Common properties for Layer3Configuration. + * + * @return the optionBLayer3Configuration value. + */ + public OptionBLayer3Configuration optionBLayer3Configuration() { + return this.innerProperties() == null ? null : this.innerProperties().optionBLayer3Configuration(); + } + + /** + * Set the optionBLayer3Configuration property: Common properties for Layer3Configuration. + * + * @param optionBLayer3Configuration the optionBLayer3Configuration value to set. + * @return the NetworkToNetworkInterconnectPatch object itself. + */ + public NetworkToNetworkInterconnectPatch withOptionBLayer3Configuration( + OptionBLayer3Configuration optionBLayer3Configuration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectPatchableProperties(); + } + this.innerProperties().withOptionBLayer3Configuration(optionBLayer3Configuration); + return this; + } + + /** + * Get the npbStaticRouteConfiguration property: NPB Static Route Configuration properties. + * + * @return the npbStaticRouteConfiguration value. + */ + public NpbStaticRouteConfiguration npbStaticRouteConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().npbStaticRouteConfiguration(); + } + + /** + * Set the npbStaticRouteConfiguration property: NPB Static Route Configuration properties. + * + * @param npbStaticRouteConfiguration the npbStaticRouteConfiguration value to set. + * @return the NetworkToNetworkInterconnectPatch object itself. + */ + public NetworkToNetworkInterconnectPatch withNpbStaticRouteConfiguration( + NpbStaticRouteConfiguration npbStaticRouteConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectPatchableProperties(); + } + this.innerProperties().withNpbStaticRouteConfiguration(npbStaticRouteConfiguration); + return this; + } + + /** + * Get the importRoutePolicy property: Import Route Policy information. + * + * @return the importRoutePolicy value. + */ + public ImportRoutePolicyInformation importRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().importRoutePolicy(); + } + + /** + * Set the importRoutePolicy property: Import Route Policy information. + * + * @param importRoutePolicy the importRoutePolicy value to set. + * @return the NetworkToNetworkInterconnectPatch object itself. + */ + public NetworkToNetworkInterconnectPatch withImportRoutePolicy(ImportRoutePolicyInformation importRoutePolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectPatchableProperties(); + } + this.innerProperties().withImportRoutePolicy(importRoutePolicy); + return this; + } + + /** + * Get the exportRoutePolicy property: Export Route Policy information. + * + * @return the exportRoutePolicy value. + */ + public ExportRoutePolicyInformation exportRoutePolicy() { + return this.innerProperties() == null ? null : this.innerProperties().exportRoutePolicy(); + } + + /** + * Set the exportRoutePolicy property: Export Route Policy information. + * + * @param exportRoutePolicy the exportRoutePolicy value to set. + * @return the NetworkToNetworkInterconnectPatch object itself. + */ + public NetworkToNetworkInterconnectPatch withExportRoutePolicy(ExportRoutePolicyInformation exportRoutePolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectPatchableProperties(); + } + this.innerProperties().withExportRoutePolicy(exportRoutePolicy); + return this; + } + + /** + * Get the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @return the egressAclId value. + */ + public String egressAclId() { + return this.innerProperties() == null ? null : this.innerProperties().egressAclId(); + } + + /** + * Set the egressAclId property: Egress Acl. ARM resource ID of Access Control Lists. + * + * @param egressAclId the egressAclId value to set. + * @return the NetworkToNetworkInterconnectPatch object itself. + */ + public NetworkToNetworkInterconnectPatch withEgressAclId(String egressAclId) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectPatchableProperties(); + } + this.innerProperties().withEgressAclId(egressAclId); + return this; + } + + /** + * Get the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @return the ingressAclId value. + */ + public String ingressAclId() { + return this.innerProperties() == null ? null : this.innerProperties().ingressAclId(); + } + + /** + * Set the ingressAclId property: Ingress Acl. ARM resource ID of Access Control Lists. + * + * @param ingressAclId the ingressAclId value to set. + * @return the NetworkToNetworkInterconnectPatch object itself. + */ + public NetworkToNetworkInterconnectPatch withIngressAclId(String ingressAclId) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkToNetworkInterconnectPatchableProperties(); + } + this.innerProperties().withIngressAclId(ingressAclId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.java new file mode 100644 index 0000000000000..28b23deef569a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; + +/** Common properties for Layer3Configuration. */ +@Fluent +public final class NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration extends OptionBLayer3Configuration { + /** Creates an instance of NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration class. */ + public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration() { + } + + /** {@inheritDoc} */ + @Override + public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration withPeerAsn(Long peerAsn) { + super.withPeerAsn(peerAsn); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration withVlanId(Integer vlanId) { + super.withVlanId(vlanId); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration withPrimaryIpv4Prefix( + String primaryIpv4Prefix) { + super.withPrimaryIpv4Prefix(primaryIpv4Prefix); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration withPrimaryIpv6Prefix( + String primaryIpv6Prefix) { + super.withPrimaryIpv6Prefix(primaryIpv6Prefix); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration withSecondaryIpv4Prefix( + String secondaryIpv4Prefix) { + super.withSecondaryIpv4Prefix(secondaryIpv4Prefix); + return this; + } + + /** {@inheritDoc} */ + @Override + public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration withSecondaryIpv6Prefix( + String secondaryIpv6Prefix) { + super.withSecondaryIpv6Prefix(secondaryIpv6Prefix); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnects.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnects.java index be9ba54483277..4fdac45ed4228 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnects.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnects.java @@ -16,13 +16,13 @@ public interface NetworkToNetworkInterconnects { *

Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnect. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition along with {@link Response}. + * @return the Network To Network Interconnect resource definition along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName, Context context); @@ -33,12 +33,12 @@ Response getWithResponse( *

Implements NetworkToNetworkInterconnects GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnect. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition. + * @return the Network To Network Interconnect resource definition. */ NetworkToNetworkInterconnect get( String resourceGroupName, String networkFabricName, String networkToNetworkInterconnectName); @@ -49,8 +49,8 @@ NetworkToNetworkInterconnect get( *

Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -63,8 +63,8 @@ NetworkToNetworkInterconnect get( *

Implements NetworkToNetworkInterconnects DELETE method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. - * @param networkToNetworkInterconnectName Name of the NetworkToNetworkInterconnectName. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -79,13 +79,13 @@ void delete( *

Implements Network To Network Interconnects list by Network Fabric GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkToNetworkInterconnects as paginated response with {@link PagedIterable}. + * @return list of Network To Network Interconnects as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String networkFabricName); + PagedIterable listByNetworkFabric(String resourceGroupName, String networkFabricName); /** * Executes list operation to display Network To Network Interconnects within a Network Fabric. @@ -93,16 +93,100 @@ void delete( *

Implements Network To Network Interconnects list by Network Fabric GET method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param networkFabricName Name of the NetworkFabric. + * @param networkFabricName Name of the Network Fabric. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of NetworkToNetworkInterconnects as paginated response with {@link PagedIterable}. + * @return list of Network To Network Interconnects as paginated response with {@link PagedIterable}. */ - PagedIterable list( + PagedIterable listByNetworkFabric( String resourceGroupName, String networkFabricName, Context context); + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the NPB Static Route BFD Administrative State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateNpbStaticRouteBfdAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body); + + /** + * Implements the operation to the underlying resources. + * + *

Updates the Admin State. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkFabricName Name of the Network Fabric. + * @param networkToNetworkInterconnectName Name of the Network to Network Interconnect. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate updateAdministrativeState( + String resourceGroupName, + String networkFabricName, + String networkToNetworkInterconnectName, + UpdateAdministrativeState body, + Context context); + /** * Configuration used to setup CE-PE connectivity. * @@ -112,7 +196,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition along with {@link Response}. + * @return the Network To Network Interconnect resource definition along with {@link Response}. */ NetworkToNetworkInterconnect getById(String id); @@ -126,7 +210,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NetworkToNetworkInterconnect resource definition along with {@link Response}. + * @return the Network To Network Interconnect resource definition along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectsList.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectsList.java index 6a3476529d813..6a03b3ab5ff9f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectsList.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkToNetworkInterconnectsList.java @@ -9,7 +9,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of NetworkToNetworkInterconnects. */ +/** List of Network To Network Interconnects. */ @Fluent public final class NetworkToNetworkInterconnectsList { /* diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NfcSku.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NfcSku.java new file mode 100644 index 0000000000000..56028307bb4e3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NfcSku.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Network Fabric Controller SKU. */ +public final class NfcSku extends ExpandableStringEnum { + /** Static value Basic for NfcSku. */ + public static final NfcSku BASIC = fromString("Basic"); + + /** Static value Standard for NfcSku. */ + public static final NfcSku STANDARD = fromString("Standard"); + + /** Static value HighPerformance for NfcSku. */ + public static final NfcSku HIGH_PERFORMANCE = fromString("HighPerformance"); + + /** + * Creates a new instance of NfcSku value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NfcSku() { + } + + /** + * Creates or finds a NfcSku from its string representation. + * + * @param name a name to look for. + * @return the corresponding NfcSku. + */ + @JsonCreator + public static NfcSku fromString(String name) { + return fromString(name, NfcSku.class); + } + + /** + * Gets known NfcSku values. + * + * @return known NfcSku values. + */ + public static Collection values() { + return values(NfcSku.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfiguration.java new file mode 100644 index 0000000000000..ba76bbd863d33 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NpbStaticRouteConfiguration.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** NPB Static Route Configuration properties. */ +@Fluent +public final class NpbStaticRouteConfiguration { + /* + * BFD Configuration properties. + */ + @JsonProperty(value = "bfdConfiguration") + private BfdConfiguration bfdConfiguration; + + /* + * List of IPv4 Routes. + */ + @JsonProperty(value = "ipv4Routes") + private List ipv4Routes; + + /* + * List of IPv6 Routes. + */ + @JsonProperty(value = "ipv6Routes") + private List ipv6Routes; + + /** Creates an instance of NpbStaticRouteConfiguration class. */ + public NpbStaticRouteConfiguration() { + } + + /** + * Get the bfdConfiguration property: BFD Configuration properties. + * + * @return the bfdConfiguration value. + */ + public BfdConfiguration bfdConfiguration() { + return this.bfdConfiguration; + } + + /** + * Set the bfdConfiguration property: BFD Configuration properties. + * + * @param bfdConfiguration the bfdConfiguration value to set. + * @return the NpbStaticRouteConfiguration object itself. + */ + public NpbStaticRouteConfiguration withBfdConfiguration(BfdConfiguration bfdConfiguration) { + this.bfdConfiguration = bfdConfiguration; + return this; + } + + /** + * Get the ipv4Routes property: List of IPv4 Routes. + * + * @return the ipv4Routes value. + */ + public List ipv4Routes() { + return this.ipv4Routes; + } + + /** + * Set the ipv4Routes property: List of IPv4 Routes. + * + * @param ipv4Routes the ipv4Routes value to set. + * @return the NpbStaticRouteConfiguration object itself. + */ + public NpbStaticRouteConfiguration withIpv4Routes(List ipv4Routes) { + this.ipv4Routes = ipv4Routes; + return this; + } + + /** + * Get the ipv6Routes property: List of IPv6 Routes. + * + * @return the ipv6Routes value. + */ + public List ipv6Routes() { + return this.ipv6Routes; + } + + /** + * Set the ipv6Routes property: List of IPv6 Routes. + * + * @param ipv6Routes the ipv6Routes value to set. + * @return the NpbStaticRouteConfiguration object itself. + */ + public NpbStaticRouteConfiguration withIpv6Routes(List ipv6Routes) { + this.ipv6Routes = ipv6Routes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (bfdConfiguration() != null) { + bfdConfiguration().validate(); + } + if (ipv4Routes() != null) { + ipv4Routes().forEach(e -> e.validate()); + } + if (ipv6Routes() != null) { + ipv6Routes().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationalStatus.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationalStatus.java deleted file mode 100644 index b8765466429af..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OperationalStatus.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Primary or Secondary power end. */ -public final class OperationalStatus extends ExpandableStringEnum { - /** Static value Booted for OperationalStatus. */ - public static final OperationalStatus BOOTED = fromString("Booted"); - - /** Static value BootPrompt for OperationalStatus. */ - public static final OperationalStatus BOOT_PROMPT = fromString("BootPrompt"); - - /** Static value Ztp for OperationalStatus. */ - public static final OperationalStatus ZTP = fromString("Ztp"); - - /** - * Creates a new instance of OperationalStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OperationalStatus() { - } - - /** - * Creates or finds a OperationalStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding OperationalStatus. - */ - @JsonCreator - public static OperationalStatus fromString(String name) { - return fromString(name, OperationalStatus.class); - } - - /** - * Gets known OperationalStatus values. - * - * @return known OperationalStatus values. - */ - public static Collection values() { - return values(OperationalStatus.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionAProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionAProperties.java index 08c4c07efe43e..93db36030e516 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionAProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionAProperties.java @@ -9,7 +9,7 @@ /** Peering optionA properties. */ @Fluent -public final class OptionAProperties extends Layer3IpPrefixProperties { +public class OptionAProperties { /* * MTU to use for option A peering. */ @@ -17,7 +17,7 @@ public final class OptionAProperties extends Layer3IpPrefixProperties { private Integer mtu; /* - * Vlan identifier. Example : 501 + * Vlan Id.Example : 501 */ @JsonProperty(value = "vlanId") private Integer vlanId; @@ -26,13 +26,13 @@ public final class OptionAProperties extends Layer3IpPrefixProperties { * Peer ASN number.Example : 28 */ @JsonProperty(value = "peerASN") - private Integer peerAsn; + private Long peerAsn; /* * BFD Configuration properties. */ @JsonProperty(value = "bfdConfiguration") - private FabricBfdConfiguration bfdConfiguration; + private BfdConfiguration bfdConfiguration; /** Creates an instance of OptionAProperties class. */ public OptionAProperties() { @@ -59,7 +59,7 @@ public OptionAProperties withMtu(Integer mtu) { } /** - * Get the vlanId property: Vlan identifier. Example : 501. + * Get the vlanId property: Vlan Id.Example : 501. * * @return the vlanId value. */ @@ -68,7 +68,7 @@ public Integer vlanId() { } /** - * Set the vlanId property: Vlan identifier. Example : 501. + * Set the vlanId property: Vlan Id.Example : 501. * * @param vlanId the vlanId value to set. * @return the OptionAProperties object itself. @@ -83,7 +83,7 @@ public OptionAProperties withVlanId(Integer vlanId) { * * @return the peerAsn value. */ - public Integer peerAsn() { + public Long peerAsn() { return this.peerAsn; } @@ -93,7 +93,7 @@ public Integer peerAsn() { * @param peerAsn the peerAsn value to set. * @return the OptionAProperties object itself. */ - public OptionAProperties withPeerAsn(Integer peerAsn) { + public OptionAProperties withPeerAsn(Long peerAsn) { this.peerAsn = peerAsn; return this; } @@ -103,7 +103,7 @@ public OptionAProperties withPeerAsn(Integer peerAsn) { * * @return the bfdConfiguration value. */ - public FabricBfdConfiguration bfdConfiguration() { + public BfdConfiguration bfdConfiguration() { return this.bfdConfiguration; } @@ -113,47 +113,17 @@ public FabricBfdConfiguration bfdConfiguration() { * @param bfdConfiguration the bfdConfiguration value to set. * @return the OptionAProperties object itself. */ - public OptionAProperties withBfdConfiguration(FabricBfdConfiguration bfdConfiguration) { + public OptionAProperties withBfdConfiguration(BfdConfiguration bfdConfiguration) { this.bfdConfiguration = bfdConfiguration; return this; } - /** {@inheritDoc} */ - @Override - public OptionAProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) { - super.withPrimaryIpv4Prefix(primaryIpv4Prefix); - return this; - } - - /** {@inheritDoc} */ - @Override - public OptionAProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) { - super.withPrimaryIpv6Prefix(primaryIpv6Prefix); - return this; - } - - /** {@inheritDoc} */ - @Override - public OptionAProperties withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { - super.withSecondaryIpv4Prefix(secondaryIpv4Prefix); - return this; - } - - /** {@inheritDoc} */ - @Override - public OptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { - super.withSecondaryIpv6Prefix(secondaryIpv6Prefix); - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); if (bfdConfiguration() != null) { bfdConfiguration().validate(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3Configuration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3Configuration.java similarity index 50% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3Configuration.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3Configuration.java index 31b3165dd5cf9..fff9eda97e72c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/Layer3Configuration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBLayer3Configuration.java @@ -7,26 +7,14 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** layer3Configuration. */ +/** OptionB Layer3 Configuration properties. */ @Fluent -public final class Layer3Configuration extends Layer3IpPrefixProperties { - /* - * importRoutePolicyId - */ - @JsonProperty(value = "importRoutePolicyId") - private String importRoutePolicyId; - - /* - * exportRoutePolicyId - */ - @JsonProperty(value = "exportRoutePolicyId") - private String exportRoutePolicyId; - +public class OptionBLayer3Configuration extends Layer3IpPrefixProperties { /* * ASN of PE devices for CE/PE connectivity.Example : 28 */ @JsonProperty(value = "peerASN") - private Integer peerAsn; + private Long peerAsn; /* * VLAN for CE/PE Layer 3 connectivity.Example : 501 @@ -38,50 +26,10 @@ public final class Layer3Configuration extends Layer3IpPrefixProperties { * ASN of CE devices for CE/PE connectivity. */ @JsonProperty(value = "fabricASN", access = JsonProperty.Access.WRITE_ONLY) - private Integer fabricAsn; - - /** Creates an instance of Layer3Configuration class. */ - public Layer3Configuration() { - } - - /** - * Get the importRoutePolicyId property: importRoutePolicyId. - * - * @return the importRoutePolicyId value. - */ - public String importRoutePolicyId() { - return this.importRoutePolicyId; - } - - /** - * Set the importRoutePolicyId property: importRoutePolicyId. - * - * @param importRoutePolicyId the importRoutePolicyId value to set. - * @return the Layer3Configuration object itself. - */ - public Layer3Configuration withImportRoutePolicyId(String importRoutePolicyId) { - this.importRoutePolicyId = importRoutePolicyId; - return this; - } - - /** - * Get the exportRoutePolicyId property: exportRoutePolicyId. - * - * @return the exportRoutePolicyId value. - */ - public String exportRoutePolicyId() { - return this.exportRoutePolicyId; - } + private Long fabricAsn; - /** - * Set the exportRoutePolicyId property: exportRoutePolicyId. - * - * @param exportRoutePolicyId the exportRoutePolicyId value to set. - * @return the Layer3Configuration object itself. - */ - public Layer3Configuration withExportRoutePolicyId(String exportRoutePolicyId) { - this.exportRoutePolicyId = exportRoutePolicyId; - return this; + /** Creates an instance of OptionBLayer3Configuration class. */ + public OptionBLayer3Configuration() { } /** @@ -89,7 +37,7 @@ public Layer3Configuration withExportRoutePolicyId(String exportRoutePolicyId) { * * @return the peerAsn value. */ - public Integer peerAsn() { + public Long peerAsn() { return this.peerAsn; } @@ -97,9 +45,9 @@ public Integer peerAsn() { * Set the peerAsn property: ASN of PE devices for CE/PE connectivity.Example : 28. * * @param peerAsn the peerAsn value to set. - * @return the Layer3Configuration object itself. + * @return the OptionBLayer3Configuration object itself. */ - public Layer3Configuration withPeerAsn(Integer peerAsn) { + public OptionBLayer3Configuration withPeerAsn(Long peerAsn) { this.peerAsn = peerAsn; return this; } @@ -117,9 +65,9 @@ public Integer vlanId() { * Set the vlanId property: VLAN for CE/PE Layer 3 connectivity.Example : 501. * * @param vlanId the vlanId value to set. - * @return the Layer3Configuration object itself. + * @return the OptionBLayer3Configuration object itself. */ - public Layer3Configuration withVlanId(Integer vlanId) { + public OptionBLayer3Configuration withVlanId(Integer vlanId) { this.vlanId = vlanId; return this; } @@ -129,34 +77,34 @@ public Layer3Configuration withVlanId(Integer vlanId) { * * @return the fabricAsn value. */ - public Integer fabricAsn() { + public Long fabricAsn() { return this.fabricAsn; } /** {@inheritDoc} */ @Override - public Layer3Configuration withPrimaryIpv4Prefix(String primaryIpv4Prefix) { + public OptionBLayer3Configuration withPrimaryIpv4Prefix(String primaryIpv4Prefix) { super.withPrimaryIpv4Prefix(primaryIpv4Prefix); return this; } /** {@inheritDoc} */ @Override - public Layer3Configuration withPrimaryIpv6Prefix(String primaryIpv6Prefix) { + public OptionBLayer3Configuration withPrimaryIpv6Prefix(String primaryIpv6Prefix) { super.withPrimaryIpv6Prefix(primaryIpv6Prefix); return this; } /** {@inheritDoc} */ @Override - public Layer3Configuration withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { + public OptionBLayer3Configuration withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { super.withSecondaryIpv4Prefix(secondaryIpv4Prefix); return this; } /** {@inheritDoc} */ @Override - public Layer3Configuration withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + public OptionBLayer3Configuration withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { super.withSecondaryIpv6Prefix(secondaryIpv6Prefix); return this; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBProperties.java index a4c555d46ac63..cfd5d97372b10 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBProperties.java @@ -8,27 +8,34 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Option B configuration. */ +/** Option B configuration to be used for Management VPN. */ @Fluent public final class OptionBProperties { /* - * 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. */ @JsonProperty(value = "importRouteTargets") private List importRouteTargets; /* - * 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. */ @JsonProperty(value = "exportRouteTargets") private List exportRouteTargets; + /* + * Route Targets to be applied. + */ + @JsonProperty(value = "routeTargets") + private RouteTargetInformation routeTargets; + /** Creates an instance of OptionBProperties class. */ public OptionBProperties() { } /** - * Get the importRouteTargets property: Route Targets to be applied for incoming routes into CE. + * Get the importRouteTargets property: Route Targets to be applied for incoming routes into CE. This is for + * backward compatibility. * * @return the importRouteTargets value. */ @@ -37,7 +44,8 @@ public List importRouteTargets() { } /** - * Set the importRouteTargets property: Route Targets to be applied for incoming routes into CE. + * Set the importRouteTargets property: Route Targets to be applied for incoming routes into CE. This is for + * backward compatibility. * * @param importRouteTargets the importRouteTargets value to set. * @return the OptionBProperties object itself. @@ -48,7 +56,8 @@ public OptionBProperties withImportRouteTargets(List importRouteTargets) } /** - * Get the exportRouteTargets property: Route Targets to be applied for outgoing routes from CE. + * Get the exportRouteTargets property: Route Targets to be applied for outgoing routes from CE. This is for + * backward compatibility. * * @return the exportRouteTargets value. */ @@ -57,7 +66,8 @@ public List exportRouteTargets() { } /** - * Set the exportRouteTargets property: Route Targets to be applied for outgoing routes from CE. + * Set the exportRouteTargets property: Route Targets to be applied for outgoing routes from CE. This is for + * backward compatibility. * * @param exportRouteTargets the exportRouteTargets value to set. * @return the OptionBProperties object itself. @@ -67,11 +77,34 @@ public OptionBProperties withExportRouteTargets(List exportRouteTargets) return this; } + /** + * Get the routeTargets property: Route Targets to be applied. + * + * @return the routeTargets value. + */ + public RouteTargetInformation routeTargets() { + return this.routeTargets; + } + + /** + * Set the routeTargets property: Route Targets to be applied. + * + * @param routeTargets the routeTargets value to set. + * @return the OptionBProperties object itself. + */ + public OptionBProperties withRouteTargets(RouteTargetInformation routeTargets) { + this.routeTargets = routeTargets; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (routeTargets() != null) { + routeTargets().validate(); + } } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBPropertiesAutoGenerated.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBPropertiesAutoGenerated.java deleted file mode 100644 index 838eb7a624814..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/OptionBPropertiesAutoGenerated.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Option B configuration. */ -@Fluent -public final class OptionBPropertiesAutoGenerated { - /* - * Route Targets to be applied for incoming routes into CE. - */ - @JsonProperty(value = "importRouteTargets", required = true) - private List importRouteTargets; - - /* - * Route Targets to be applied for outgoing routes from CE. - */ - @JsonProperty(value = "exportRouteTargets", required = true) - private List exportRouteTargets; - - /** Creates an instance of OptionBPropertiesAutoGenerated class. */ - public OptionBPropertiesAutoGenerated() { - } - - /** - * Get the importRouteTargets property: Route Targets to be applied for incoming routes into CE. - * - * @return the importRouteTargets value. - */ - public List importRouteTargets() { - return this.importRouteTargets; - } - - /** - * Set the importRouteTargets property: Route Targets to be applied for incoming routes into CE. - * - * @param importRouteTargets the importRouteTargets value to set. - * @return the OptionBPropertiesAutoGenerated object itself. - */ - public OptionBPropertiesAutoGenerated withImportRouteTargets(List importRouteTargets) { - this.importRouteTargets = importRouteTargets; - return this; - } - - /** - * Get the exportRouteTargets property: Route Targets to be applied for outgoing routes from CE. - * - * @return the exportRouteTargets value. - */ - public List exportRouteTargets() { - return this.exportRouteTargets; - } - - /** - * Set the exportRouteTargets property: Route Targets to be applied for outgoing routes from CE. - * - * @param exportRouteTargets the exportRouteTargets value to set. - * @return the OptionBPropertiesAutoGenerated object itself. - */ - public OptionBPropertiesAutoGenerated withExportRouteTargets(List exportRouteTargets) { - this.exportRouteTargets = exportRouteTargets; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (importRouteTargets() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property importRouteTargets in model OptionBPropertiesAutoGenerated")); - } - if (exportRouteTargets() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property exportRouteTargets in model OptionBPropertiesAutoGenerated")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OptionBPropertiesAutoGenerated.class); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingIntervalInSeconds.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingIntervalInSeconds.java new file mode 100644 index 0000000000000..c81076bc2b02e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingIntervalInSeconds.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Polling interval in seconds. */ +public final class PollingIntervalInSeconds extends ExpandableStringEnum { + /** Static value 30 for PollingIntervalInSeconds. */ + public static final PollingIntervalInSeconds THREE_ZERO = fromInt(30); + + /** Static value 60 for PollingIntervalInSeconds. */ + public static final PollingIntervalInSeconds SIX_ZERO = fromInt(60); + + /** Static value 90 for PollingIntervalInSeconds. */ + public static final PollingIntervalInSeconds NINE_ZERO = fromInt(90); + + /** Static value 120 for PollingIntervalInSeconds. */ + public static final PollingIntervalInSeconds ONE_TWO_ZERO = fromInt(120); + + /** + * Creates a new instance of PollingIntervalInSeconds value. + * + * @deprecated Use the {@link #fromString(int)} factory method. + */ + @Deprecated + public PollingIntervalInSeconds() { + } + + /** + * Creates or finds a PollingIntervalInSeconds from its string representation. + * + * @param name a name to look for. + * @return the corresponding PollingIntervalInSeconds. + */ + @JsonCreator + public static PollingIntervalInSeconds fromInt(int name) { + return fromString(String.valueOf(name), PollingIntervalInSeconds.class); + } + + /** + * Gets known PollingIntervalInSeconds values. + * + * @return known PollingIntervalInSeconds values. + */ + public static Collection values() { + return values(PollingIntervalInSeconds.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingType.java new file mode 100644 index 0000000000000..0029bfde2cee5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PollingType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Polling type. */ +public final class PollingType extends ExpandableStringEnum { + /** Static value Pull for PollingType. */ + public static final PollingType PULL = fromString("Pull"); + + /** Static value Push for PollingType. */ + public static final PollingType PUSH = fromString("Push"); + + /** + * Creates a new instance of PollingType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PollingType() { + } + + /** + * Creates or finds a PollingType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PollingType. + */ + @JsonCreator + public static PollingType fromString(String name) { + return fromString(name, PollingType.class); + } + + /** + * Gets known PollingType values. + * + * @return known PollingType values. + */ + public static Collection values() { + return values(PollingType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortCondition.java new file mode 100644 index 0000000000000..5058165749416 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortCondition.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Port condition that needs to be matched. */ +@Fluent +public class PortCondition { + /* + * Port type that needs to be matched. + */ + @JsonProperty(value = "portType") + private PortType portType; + + /* + * Layer4 protocol type that needs to be matched. + */ + @JsonProperty(value = "layer4Protocol", required = true) + private Layer4Protocol layer4Protocol; + + /* + * List of the Ports that need to be matched. + */ + @JsonProperty(value = "ports") + private List ports; + + /* + * List of the port Group Names that to be matched. + */ + @JsonProperty(value = "portGroupNames") + private List portGroupNames; + + /** Creates an instance of PortCondition class. */ + public PortCondition() { + } + + /** + * Get the portType property: Port type that needs to be matched. + * + * @return the portType value. + */ + public PortType portType() { + return this.portType; + } + + /** + * Set the portType property: Port type that needs to be matched. + * + * @param portType the portType value to set. + * @return the PortCondition object itself. + */ + public PortCondition withPortType(PortType portType) { + this.portType = portType; + return this; + } + + /** + * Get the layer4Protocol property: Layer4 protocol type that needs to be matched. + * + * @return the layer4Protocol value. + */ + public Layer4Protocol layer4Protocol() { + return this.layer4Protocol; + } + + /** + * Set the layer4Protocol property: Layer4 protocol type that needs to be matched. + * + * @param layer4Protocol the layer4Protocol value to set. + * @return the PortCondition object itself. + */ + public PortCondition withLayer4Protocol(Layer4Protocol layer4Protocol) { + this.layer4Protocol = layer4Protocol; + return this; + } + + /** + * Get the ports property: List of the Ports that need to be matched. + * + * @return the ports value. + */ + public List ports() { + return this.ports; + } + + /** + * Set the ports property: List of the Ports that need to be matched. + * + * @param ports the ports value to set. + * @return the PortCondition object itself. + */ + public PortCondition withPorts(List ports) { + this.ports = ports; + return this; + } + + /** + * Get the portGroupNames property: List of the port Group Names that to be matched. + * + * @return the portGroupNames value. + */ + public List portGroupNames() { + return this.portGroupNames; + } + + /** + * Set the portGroupNames property: List of the port Group Names that to be matched. + * + * @param portGroupNames the portGroupNames value to set. + * @return the PortCondition object itself. + */ + public PortCondition withPortGroupNames(List portGroupNames) { + this.portGroupNames = portGroupNames; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (layer4Protocol() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property layer4Protocol in model PortCondition")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PortCondition.class); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupProperties.java new file mode 100644 index 0000000000000..aed7266de1c11 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortGroupProperties.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Port Group properties. */ +@Fluent +public final class PortGroupProperties { + /* + * The name of the port group. + */ + @JsonProperty(value = "name") + private String name; + + /* + * List of the ports that needs to be matched. + */ + @JsonProperty(value = "ports") + private List ports; + + /** Creates an instance of PortGroupProperties class. */ + public PortGroupProperties() { + } + + /** + * Get the name property: The name of the port group. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the port group. + * + * @param name the name value to set. + * @return the PortGroupProperties object itself. + */ + public PortGroupProperties withName(String name) { + this.name = name; + return this; + } + + /** + * Get the ports property: List of the ports that needs to be matched. + * + * @return the ports value. + */ + public List ports() { + return this.ports; + } + + /** + * Set the ports property: List of the ports that needs to be matched. + * + * @param ports the ports value to set. + * @return the PortGroupProperties object itself. + */ + public PortGroupProperties withPorts(List ports) { + this.ports = ports; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortType.java new file mode 100644 index 0000000000000..863c50a60ea07 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PortType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Port type that needs to be matched. */ +public final class PortType extends ExpandableStringEnum { + /** Static value SourcePort for PortType. */ + public static final PortType SOURCE_PORT = fromString("SourcePort"); + + /** Static value DestinationPort for PortType. */ + public static final PortType DESTINATION_PORT = fromString("DestinationPort"); + + /** + * Creates a new instance of PortType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PortType() { + } + + /** + * Creates or finds a PortType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PortType. + */ + @JsonCreator + public static PortType fromString(String name) { + return fromString(name, PortType.class); + } + + /** + * Gets known PortType values. + * + * @return known PortType values. + */ + public static Collection values() { + return values(PortType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PowerCycleState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PowerCycleState.java deleted file mode 100644 index a81ea89e2b8c3..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PowerCycleState.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** On or Off power cycle state. */ -public final class PowerCycleState extends ExpandableStringEnum { - /** Static value On for PowerCycleState. */ - public static final PowerCycleState ON = fromString("On"); - - /** Static value Off for PowerCycleState. */ - public static final PowerCycleState OFF = fromString("Off"); - - /** - * Creates a new instance of PowerCycleState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PowerCycleState() { - } - - /** - * Creates or finds a PowerCycleState from its string representation. - * - * @param name a name to look for. - * @return the corresponding PowerCycleState. - */ - @JsonCreator - public static PowerCycleState fromString(String name) { - return fromString(name, PowerCycleState.class); - } - - /** - * Gets known PowerCycleState values. - * - * @return known PowerCycleState values. - */ - public static Collection values() { - return values(PowerCycleState.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PowerEnd.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PowerEnd.java deleted file mode 100644 index 7f7a77922cba1..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PowerEnd.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Primary or Secondary power end. */ -public final class PowerEnd extends ExpandableStringEnum { - /** Static value Primary for PowerEnd. */ - public static final PowerEnd PRIMARY = fromString("Primary"); - - /** Static value Secondary for PowerEnd. */ - public static final PowerEnd SECONDARY = fromString("Secondary"); - - /** - * Creates a new instance of PowerEnd value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PowerEnd() { - } - - /** - * Creates or finds a PowerEnd from its string representation. - * - * @param name a name to look for. - * @return the corresponding PowerEnd. - */ - @JsonCreator - public static PowerEnd fromString(String name) { - return fromString(name, PowerEnd.class); - } - - /** - * Gets known PowerEnd values. - * - * @return known PowerEnd values. - */ - public static Collection values() { - return values(PowerEnd.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixType.java new file mode 100644 index 0000000000000..8c954b818a86d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/PrefixType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** IP Prefix Type. */ +public final class PrefixType extends ExpandableStringEnum { + /** Static value Prefix for PrefixType. */ + public static final PrefixType PREFIX = fromString("Prefix"); + + /** Static value LongestPrefix for PrefixType. */ + public static final PrefixType LONGEST_PREFIX = fromString("LongestPrefix"); + + /** + * Creates a new instance of PrefixType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrefixType() { + } + + /** + * Creates or finds a PrefixType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrefixType. + */ + @JsonCreator + public static PrefixType fromString(String name) { + return fromString(name, PrefixType.class); + } + + /** + * Gets known PrefixType values. + * + * @return known PrefixType values. + */ + public static Collection values() { + return values(PrefixType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ProvisioningState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ProvisioningState.java index 1ba4b109fdc34..2b13d59bfd275 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ProvisioningState.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ProvisioningState.java @@ -10,21 +10,24 @@ /** The current provisioning state. */ public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Accepted for ProvisioningState. */ + public static final ProvisioningState ACCEPTED = fromString("Accepted"); + /** Static value Succeeded for ProvisioningState. */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); /** Static value Updating for ProvisioningState. */ public static final ProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for ProvisioningState. */ - public static final ProvisioningState CANCELED = fromString("Canceled"); - /** Static value Deleting for ProvisioningState. */ public static final ProvisioningState DELETING = fromString("Deleting"); /** Static value Failed for ProvisioningState. */ public static final ProvisioningState FAILED = fromString("Failed"); + /** Static value Canceled for ProvisioningState. */ + public static final ProvisioningState CANCELED = fromString("Canceled"); + /** * Creates a new instance of ProvisioningState value. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootProperties.java new file mode 100644 index 0000000000000..4bfe93c1f393d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootProperties.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Reboot properties. */ +@Fluent +public final class RebootProperties { + /* + * Type of reboot to be performed. Example: GracefulRebootWithZTP + */ + @JsonProperty(value = "rebootType") + private RebootType rebootType; + + /** Creates an instance of RebootProperties class. */ + public RebootProperties() { + } + + /** + * Get the rebootType property: Type of reboot to be performed. Example: GracefulRebootWithZTP. + * + * @return the rebootType value. + */ + public RebootType rebootType() { + return this.rebootType; + } + + /** + * Set the rebootType property: Type of reboot to be performed. Example: GracefulRebootWithZTP. + * + * @param rebootType the rebootType value to set. + * @return the RebootProperties object itself. + */ + public RebootProperties withRebootType(RebootType rebootType) { + this.rebootType = rebootType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootType.java new file mode 100644 index 0000000000000..f3c79a679f776 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RebootType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Type of reboot to be performed. Example: GracefulRebootWithZTP. */ +public final class RebootType extends ExpandableStringEnum { + /** Static value GracefulRebootWithZTP for RebootType. */ + public static final RebootType GRACEFUL_REBOOT_WITH_ZTP = fromString("GracefulRebootWithZTP"); + + /** Static value GracefulRebootWithoutZTP for RebootType. */ + public static final RebootType GRACEFUL_REBOOT_WITHOUT_ZTP = fromString("GracefulRebootWithoutZTP"); + + /** Static value UngracefulRebootWithZTP for RebootType. */ + public static final RebootType UNGRACEFUL_REBOOT_WITH_ZTP = fromString("UngracefulRebootWithZTP"); + + /** Static value UngracefulRebootWithoutZTP for RebootType. */ + public static final RebootType UNGRACEFUL_REBOOT_WITHOUT_ZTP = fromString("UngracefulRebootWithoutZTP"); + + /** + * Creates a new instance of RebootType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RebootType() { + } + + /** + * Creates or finds a RebootType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RebootType. + */ + @JsonCreator + public static RebootType fromString(String name) { + return fromString(name, RebootType.class); + } + + /** + * Gets known RebootType values. + * + * @return known RebootType values. + */ + public static Collection values() { + return values(RebootType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicies.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicies.java index 06c5a0737a4a8..c88ad761b7df3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicies.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicies.java @@ -118,6 +118,95 @@ Response getByResourceGroupWithResponse( */ PagedIterable list(Context context); + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + CommonPostActionResponseForDeviceUpdate updateAdministrativeState( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body); + + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + CommonPostActionResponseForDeviceUpdate updateAdministrativeState( + String resourceGroupName, String routePolicyName, UpdateAdministrativeState body, Context context); + + /** + * Validates the configuration of the resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + ValidateConfigurationResponse validateConfiguration(String resourceGroupName, String routePolicyName); + + /** + * Validates the configuration of the resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + ValidateConfigurationResponse validateConfiguration( + String resourceGroupName, String routePolicyName, Context context); + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate commitConfiguration(String resourceGroupName, String routePolicyName); + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param routePolicyName Name of the Route Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate commitConfiguration( + String resourceGroupName, String routePolicyName, Context context); + /** * Gets a Route Policy. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicy.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicy.java index aeeca398fecf2..aae102ebdbd03 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicy.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicy.java @@ -56,19 +56,48 @@ public interface RoutePolicy { SystemData systemData(); /** - * Gets the statements property: Route Policy statements. + * Gets the networkFabricId property: Arm Resource ID of Network Fabric. * - * @return the statements value. + * @return the networkFabricId value. */ - List statements(); + String networkFabricId(); + + /** + * Gets the addressFamilyType property: AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 + * route policy. + * + * @return the addressFamilyType value. + */ + AddressFamilyType addressFamilyType(); + + /** + * Gets the configurationState property: Configuration state of the resource. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); /** - * Gets the provisioningState property: Gets the provisioning state of the resource. + * Gets the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ ProvisioningState provisioningState(); + /** + * Gets the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + AdministrativeState administrativeState(); + + /** + * Gets the statements property: Route Policy statements. + * + * @return the statements value. + */ + List statements(); + /** * Gets the annotation property: Switch configuration description. * @@ -109,7 +138,7 @@ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, - DefinitionStages.WithStatements, + DefinitionStages.WithNetworkFabricId, DefinitionStages.WithCreate { } /** The RoutePolicy definition stages. */ @@ -143,23 +172,27 @@ interface WithResourceGroup { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ - WithStatements withExistingResourceGroup(String resourceGroupName); + WithNetworkFabricId withExistingResourceGroup(String resourceGroupName); } - /** The stage of the RoutePolicy definition allowing to specify statements. */ - interface WithStatements { + /** The stage of the RoutePolicy definition allowing to specify networkFabricId. */ + interface WithNetworkFabricId { /** - * Specifies the statements property: Route Policy statements.. + * Specifies the networkFabricId property: Arm Resource ID of Network Fabric.. * - * @param statements Route Policy statements. + * @param networkFabricId Arm Resource ID of Network Fabric. * @return the next definition stage. */ - WithCreate withStatements(List statements); + WithCreate withNetworkFabricId(String networkFabricId); } /** * The stage of the RoutePolicy definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithAnnotation { + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithAddressFamilyType, + DefinitionStages.WithStatements, + DefinitionStages.WithAnnotation { /** * Executes the create request. * @@ -185,6 +218,28 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the RoutePolicy definition allowing to specify addressFamilyType. */ + interface WithAddressFamilyType { + /** + * Specifies the addressFamilyType property: AddressFamilyType. This parameter decides whether the given + * ipv4 or ipv6 route policy.. + * + * @param addressFamilyType AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 route + * policy. + * @return the next definition stage. + */ + WithCreate withAddressFamilyType(AddressFamilyType addressFamilyType); + } + /** The stage of the RoutePolicy definition allowing to specify statements. */ + interface WithStatements { + /** + * Specifies the statements property: Route Policy statements.. + * + * @param statements Route Policy statements. + * @return the next definition stage. + */ + WithCreate withStatements(List statements); + } /** The stage of the RoutePolicy definition allowing to specify annotation. */ interface WithAnnotation { /** @@ -204,7 +259,7 @@ interface WithAnnotation { RoutePolicy.Update update(); /** The template for RoutePolicy update. */ - interface Update extends UpdateStages.WithTags { + interface Update extends UpdateStages.WithTags, UpdateStages.WithStatements { /** * Executes the update request. * @@ -232,6 +287,16 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the RoutePolicy update allowing to specify statements. */ + interface WithStatements { + /** + * Specifies the statements property: Route Policy statements.. + * + * @param statements Route Policy statements. + * @return the next definition stage. + */ + Update withStatements(List statements); + } } /** * Refreshes the resource to sync with Azure. @@ -247,4 +312,75 @@ interface WithTags { * @return the refreshed resource. */ RoutePolicy refresh(Context context); + + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param body Request payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body); + + /** + * Executes enable operation to the underlying resources. + * + *

Updated the admin state for this Route Policy. + * + * @param body Request payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for device updates. + */ + CommonPostActionResponseForDeviceUpdate updateAdministrativeState(UpdateAdministrativeState body, Context context); + + /** + * Validates the configuration of the resources. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + ValidateConfigurationResponse validateConfiguration(); + + /** + * Validates the configuration of the resources. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of the action validate configuration. + */ + ValidateConfigurationResponse validateConfiguration(Context context); + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate commitConfiguration(); + + /** + * Execute the commit on the resources. + * + *

Commits the configuration of the given resources. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return common response for the state updates. + */ + CommonPostActionResponseForStateUpdate commitConfiguration(Context context); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyActionType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyActionType.java new file mode 100644 index 0000000000000..e388d03fe9b18 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyActionType.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Action type. Example: Permit | Deny | Continue. */ +public final class RoutePolicyActionType extends ExpandableStringEnum { + /** Static value Permit for RoutePolicyActionType. */ + public static final RoutePolicyActionType PERMIT = fromString("Permit"); + + /** Static value Deny for RoutePolicyActionType. */ + public static final RoutePolicyActionType DENY = fromString("Deny"); + + /** Static value Continue for RoutePolicyActionType. */ + public static final RoutePolicyActionType CONTINUE = fromString("Continue"); + + /** + * Creates a new instance of RoutePolicyActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RoutePolicyActionType() { + } + + /** + * Creates or finds a RoutePolicyActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RoutePolicyActionType. + */ + @JsonCreator + public static RoutePolicyActionType fromString(String name) { + return fromString(name, RoutePolicyActionType.class); + } + + /** + * Gets known RoutePolicyActionType values. + * + * @return known RoutePolicyActionType values. + */ + public static Collection values() { + return values(RoutePolicyActionType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyConditionType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyConditionType.java new file mode 100644 index 0000000000000..46c1f44670188 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyConditionType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Type of the condition used. */ +public final class RoutePolicyConditionType extends ExpandableStringEnum { + /** Static value Or for RoutePolicyConditionType. */ + public static final RoutePolicyConditionType OR = fromString("Or"); + + /** Static value And for RoutePolicyConditionType. */ + public static final RoutePolicyConditionType AND = fromString("And"); + + /** + * Creates a new instance of RoutePolicyConditionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RoutePolicyConditionType() { + } + + /** + * Creates or finds a RoutePolicyConditionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RoutePolicyConditionType. + */ + @JsonCreator + public static RoutePolicyConditionType fromString(String name) { + return fromString(name, RoutePolicyConditionType.class); + } + + /** + * Gets known RoutePolicyConditionType values. + * + * @return known RoutePolicyConditionType values. + */ + public static Collection values() { + return values(RoutePolicyConditionType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyPatch.java index 08f853add4f63..bfe3c6b0a3a6b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyPatch.java @@ -5,41 +5,60 @@ package com.azure.resourcemanager.managednetworkfabric.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; +import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyPatchableProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; import java.util.Map; -/** The RoutePolicy patch resource definition. */ +/** The Route Policy patch resource definition. */ @Fluent -public final class RoutePolicyPatch { +public final class RoutePolicyPatch extends TagsUpdate { /* - * Resource tags + * The RoutePolicy patchable properties. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; + @JsonProperty(value = "properties") + private RoutePolicyPatchableProperties innerProperties; /** Creates an instance of RoutePolicyPatch class. */ public RoutePolicyPatch() { } /** - * Get the tags property: Resource tags. + * Get the innerProperties property: The RoutePolicy patchable properties. * - * @return the tags value. + * @return the innerProperties value. */ - public Map tags() { - return this.tags; + private RoutePolicyPatchableProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public RoutePolicyPatch withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the statements property: Route Policy statements. + * + * @return the statements value. + */ + public List statements() { + return this.innerProperties() == null ? null : this.innerProperties().statements(); } /** - * Set the tags property: Resource tags. + * Set the statements property: Route Policy statements. * - * @param tags the tags value to set. + * @param statements the statements value to set. * @return the RoutePolicyPatch object itself. */ - public RoutePolicyPatch withTags(Map tags) { - this.tags = tags; + public RoutePolicyPatch withStatements(List statements) { + if (this.innerProperties() == null) { + this.innerProperties = new RoutePolicyPatchableProperties(); + } + this.innerProperties().withStatements(statements); return this; } @@ -48,6 +67,11 @@ public RoutePolicyPatch withTags(Map tags) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementProperties.java index 8aaabf0951d9d..26b295c15d78b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RoutePolicyStatementProperties.java @@ -8,7 +8,7 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Route Policy Statement properties.. */ +/** Route Policy Statement properties. */ @Fluent public final class RoutePolicyStatementProperties extends AnnotationResource { /* diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetInformation.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetInformation.java new file mode 100644 index 0000000000000..f857b884c7055 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RouteTargetInformation.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Route Target Configuration. */ +@Fluent +public final class RouteTargetInformation { + /* + * Route Targets to be applied for incoming routes into CE. + */ + @JsonProperty(value = "importIpv4RouteTargets") + private List importIpv4RouteTargets; + + /* + * Route Targets to be applied for incoming routes from CE. + */ + @JsonProperty(value = "importIpv6RouteTargets") + private List importIpv6RouteTargets; + + /* + * Route Targets to be applied for outgoing routes into CE. + */ + @JsonProperty(value = "exportIpv4RouteTargets") + private List exportIpv4RouteTargets; + + /* + * Route Targets to be applied for outgoing routes from CE. + */ + @JsonProperty(value = "exportIpv6RouteTargets") + private List exportIpv6RouteTargets; + + /** Creates an instance of RouteTargetInformation class. */ + public RouteTargetInformation() { + } + + /** + * Get the importIpv4RouteTargets property: Route Targets to be applied for incoming routes into CE. + * + * @return the importIpv4RouteTargets value. + */ + public List importIpv4RouteTargets() { + return this.importIpv4RouteTargets; + } + + /** + * Set the importIpv4RouteTargets property: Route Targets to be applied for incoming routes into CE. + * + * @param importIpv4RouteTargets the importIpv4RouteTargets value to set. + * @return the RouteTargetInformation object itself. + */ + public RouteTargetInformation withImportIpv4RouteTargets(List importIpv4RouteTargets) { + this.importIpv4RouteTargets = importIpv4RouteTargets; + return this; + } + + /** + * Get the importIpv6RouteTargets property: Route Targets to be applied for incoming routes from CE. + * + * @return the importIpv6RouteTargets value. + */ + public List importIpv6RouteTargets() { + return this.importIpv6RouteTargets; + } + + /** + * Set the importIpv6RouteTargets property: Route Targets to be applied for incoming routes from CE. + * + * @param importIpv6RouteTargets the importIpv6RouteTargets value to set. + * @return the RouteTargetInformation object itself. + */ + public RouteTargetInformation withImportIpv6RouteTargets(List importIpv6RouteTargets) { + this.importIpv6RouteTargets = importIpv6RouteTargets; + return this; + } + + /** + * Get the exportIpv4RouteTargets property: Route Targets to be applied for outgoing routes into CE. + * + * @return the exportIpv4RouteTargets value. + */ + public List exportIpv4RouteTargets() { + return this.exportIpv4RouteTargets; + } + + /** + * Set the exportIpv4RouteTargets property: Route Targets to be applied for outgoing routes into CE. + * + * @param exportIpv4RouteTargets the exportIpv4RouteTargets value to set. + * @return the RouteTargetInformation object itself. + */ + public RouteTargetInformation withExportIpv4RouteTargets(List exportIpv4RouteTargets) { + this.exportIpv4RouteTargets = exportIpv4RouteTargets; + return this; + } + + /** + * Get the exportIpv6RouteTargets property: Route Targets to be applied for outgoing routes from CE. + * + * @return the exportIpv6RouteTargets value. + */ + public List exportIpv6RouteTargets() { + return this.exportIpv6RouteTargets; + } + + /** + * Set the exportIpv6RouteTargets property: Route Targets to be applied for outgoing routes from CE. + * + * @param exportIpv6RouteTargets the exportIpv6RouteTargets value to set. + * @return the RouteTargetInformation object itself. + */ + public RouteTargetInformation withExportIpv6RouteTargets(List exportIpv6RouteTargets) { + this.exportIpv6RouteTargets = exportIpv6RouteTargets; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleProperties.java new file mode 100644 index 0000000000000..37611b86155a5 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/RuleProperties.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Rules for the InternetGateways. */ +@Fluent +public final class RuleProperties { + /* + * Specify action. + */ + @JsonProperty(value = "action", required = true) + private Action action; + + /* + * List of Addresses to be allowed or denied. + */ + @JsonProperty(value = "addressList", required = true) + private List addressList; + + /** Creates an instance of RuleProperties class. */ + public RuleProperties() { + } + + /** + * Get the action property: Specify action. + * + * @return the action value. + */ + public Action action() { + return this.action; + } + + /** + * Set the action property: Specify action. + * + * @param action the action value to set. + * @return the RuleProperties object itself. + */ + public RuleProperties withAction(Action action) { + this.action = action; + return this; + } + + /** + * Get the addressList property: List of Addresses to be allowed or denied. + * + * @return the addressList value. + */ + public List addressList() { + return this.addressList; + } + + /** + * Set the addressList property: List of Addresses to be allowed or denied. + * + * @param addressList the addressList value to set. + * @return the RuleProperties object itself. + */ + public RuleProperties withAddressList(List addressList) { + this.addressList = addressList; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (action() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property action in model RuleProperties")); + } + if (addressList() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property addressList in model RuleProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RuleProperties.class); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SourceDestinationType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SourceDestinationType.java new file mode 100644 index 0000000000000..38033d46862f2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SourceDestinationType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** IP Address type. */ +public final class SourceDestinationType extends ExpandableStringEnum { + /** Static value SourceIP for SourceDestinationType. */ + public static final SourceDestinationType SOURCE_IP = fromString("SourceIP"); + + /** Static value DestinationIP for SourceDestinationType. */ + public static final SourceDestinationType DESTINATION_IP = fromString("DestinationIP"); + + /** + * Creates a new instance of SourceDestinationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SourceDestinationType() { + } + + /** + * Creates or finds a SourceDestinationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SourceDestinationType. + */ + @JsonCreator + public static SourceDestinationType fromString(String name) { + return fromString(name, SourceDestinationType.class); + } + + /** + * Gets known SourceDestinationType values. + * + * @return known SourceDestinationType values. + */ + public static Collection values() { + return values(SourceDestinationType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/State.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/State.java deleted file mode 100644 index a4edae2e86819..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/State.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** On or Off toggle state. */ -public final class State extends ExpandableStringEnum { - /** Static value On for State. */ - public static final State ON = fromString("On"); - - /** Static value Off for State. */ - public static final State OFF = fromString("Off"); - - /** - * Creates a new instance of State value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public State() { - } - - /** - * Creates or finds a State from its string representation. - * - * @param name a name to look for. - * @return the corresponding State. - */ - @JsonCreator - public static State fromString(String name) { - return fromString(name, State.class); - } - - /** - * Gets known State values. - * - * @return known State values. - */ - public static Collection values() { - return values(State.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionProperties.java index 48b3c3ce6b76e..bcc0f28f2c6dd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementActionProperties.java @@ -12,16 +12,16 @@ @Fluent public final class StatementActionProperties { /* - * localPreference of the route policy. + * Local Preference of the route policy. */ @JsonProperty(value = "localPreference") private Long localPreference; /* - * action. Example: Permit | Deny. + * Action type. Example: Permit | Deny | Continue. */ @JsonProperty(value = "actionType", required = true) - private CommunityActionTypes actionType; + private RoutePolicyActionType actionType; /* * IP Community Properties. @@ -40,7 +40,7 @@ public StatementActionProperties() { } /** - * Get the localPreference property: localPreference of the route policy. + * Get the localPreference property: Local Preference of the route policy. * * @return the localPreference value. */ @@ -49,7 +49,7 @@ public Long localPreference() { } /** - * Set the localPreference property: localPreference of the route policy. + * Set the localPreference property: Local Preference of the route policy. * * @param localPreference the localPreference value to set. * @return the StatementActionProperties object itself. @@ -60,21 +60,21 @@ public StatementActionProperties withLocalPreference(Long localPreference) { } /** - * Get the actionType property: action. Example: Permit | Deny. + * Get the actionType property: Action type. Example: Permit | Deny | Continue. * * @return the actionType value. */ - public CommunityActionTypes actionType() { + public RoutePolicyActionType actionType() { return this.actionType; } /** - * Set the actionType property: action. Example: Permit | Deny. + * Set the actionType property: Action type. Example: Permit | Deny | Continue. * * @param actionType the actionType value to set. * @return the StatementActionProperties object itself. */ - public StatementActionProperties withActionType(CommunityActionTypes actionType) { + public StatementActionProperties withActionType(RoutePolicyActionType actionType) { this.actionType = actionType; return this; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionProperties.java index 4daad791b46ac..ab3791e58331b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StatementConditionProperties.java @@ -11,6 +11,12 @@ /** Route policy statement condition properties. */ @Fluent public final class StatementConditionProperties extends IpCommunityIdList { + /* + * Type of the condition used. + */ + @JsonProperty(value = "type") + private RoutePolicyConditionType type; + /* * Arm Resource Id of IpPrefix. */ @@ -27,6 +33,26 @@ public final class StatementConditionProperties extends IpCommunityIdList { public StatementConditionProperties() { } + /** + * Get the type property: Type of the condition used. + * + * @return the type value. + */ + public RoutePolicyConditionType type() { + return this.type; + } + + /** + * Set the type property: Type of the condition used. + * + * @param type the type value to set. + * @return the StatementConditionProperties object itself. + */ + public StatementConditionProperties withType(RoutePolicyConditionType type) { + this.type = type; + return this; + } + /** * Get the ipPrefixId property: Arm Resource Id of IpPrefix. * diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteConfiguration.java index 68abc94699b88..a9bd944746ca4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteConfiguration.java @@ -8,9 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** staticRouteConfiguration model. */ +/** Static Route Configuration properties. */ @Fluent -public final class StaticRouteConfiguration { +public class StaticRouteConfiguration { /* * BFD configuration properties */ @@ -18,13 +18,13 @@ public final class StaticRouteConfiguration { private BfdConfiguration bfdConfiguration; /* - * List with object IPv4Routes. + * List of IPv4 Routes. */ @JsonProperty(value = "ipv4Routes") private List ipv4Routes; /* - * List with object IPv6Routes. + * List of IPv6 Routes. */ @JsonProperty(value = "ipv6Routes") private List ipv6Routes; @@ -54,7 +54,7 @@ public StaticRouteConfiguration withBfdConfiguration(BfdConfiguration bfdConfigu } /** - * Get the ipv4Routes property: List with object IPv4Routes. + * Get the ipv4Routes property: List of IPv4 Routes. * * @return the ipv4Routes value. */ @@ -63,7 +63,7 @@ public List ipv4Routes() { } /** - * Set the ipv4Routes property: List with object IPv4Routes. + * Set the ipv4Routes property: List of IPv4 Routes. * * @param ipv4Routes the ipv4Routes value to set. * @return the StaticRouteConfiguration object itself. @@ -74,7 +74,7 @@ public StaticRouteConfiguration withIpv4Routes(List ipv4R } /** - * Get the ipv6Routes property: List with object IPv6Routes. + * Get the ipv6Routes property: List of IPv6 Routes. * * @return the ipv6Routes value. */ @@ -83,7 +83,7 @@ public List ipv6Routes() { } /** - * Set the ipv6Routes property: List with object IPv6Routes. + * Set the ipv6Routes property: List of IPv6 Routes. * * @param ipv6Routes the ipv6Routes value to set. * @return the StaticRouteConfiguration object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteProperties.java index ed95378579e38..ece31ebc2f337 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/StaticRouteProperties.java @@ -9,17 +9,17 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Static Route properties. */ +/** Route Properties. */ @Fluent public final class StaticRouteProperties { /* - * IPv4 | IPv6 Prefix. + * Prefix of the route. */ @JsonProperty(value = "prefix", required = true) private String prefix; /* - * List of next hop IPv4 | IPv6 addresses. + * List of next hop addresses. */ @JsonProperty(value = "nextHop", required = true) private List nextHop; @@ -29,7 +29,7 @@ public StaticRouteProperties() { } /** - * Get the prefix property: IPv4 | IPv6 Prefix. + * Get the prefix property: Prefix of the route. * * @return the prefix value. */ @@ -38,7 +38,7 @@ public String prefix() { } /** - * Set the prefix property: IPv4 | IPv6 Prefix. + * Set the prefix property: Prefix of the route. * * @param prefix the prefix value to set. * @return the StaticRouteProperties object itself. @@ -49,7 +49,7 @@ public StaticRouteProperties withPrefix(String prefix) { } /** - * Get the nextHop property: List of next hop IPv4 | IPv6 addresses. + * Get the nextHop property: List of next hop addresses. * * @return the nextHop value. */ @@ -58,7 +58,7 @@ public List nextHop() { } /** - * Set the nextHop property: List of next hop IPv4 | IPv6 addresses. + * Set the nextHop property: List of next hop addresses. * * @param nextHop the nextHop value to set. * @return the StaticRouteProperties object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportPackageProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportPackageProperties.java deleted file mode 100644 index 0ed2f753460a0..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportPackageProperties.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.resourcemanager.managednetworkfabric.fluent.models.SupportPackagePropertiesInner; - -/** An immutable client-side representation of SupportPackageProperties. */ -public interface SupportPackageProperties { - /** - * Gets the supportPackageUrl property: The URL to fetch the generated support package from. - * - * @return the supportPackageUrl value. - */ - String supportPackageUrl(); - - /** - * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.SupportPackagePropertiesInner object. - * - * @return the inner object. - */ - SupportPackagePropertiesInner innerModel(); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportedConnectorProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportedConnectorProperties.java index a76b37e1a306b..b6faee4175beb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportedConnectorProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportedConnectorProperties.java @@ -11,7 +11,7 @@ @Fluent public final class SupportedConnectorProperties { /* - * Connector type. Example: Optical. + * Type of connector used. Example: Optical. */ @JsonProperty(value = "connectorType") private String connectorType; @@ -27,7 +27,7 @@ public SupportedConnectorProperties() { } /** - * Get the connectorType property: Connector type. Example: Optical. + * Get the connectorType property: Type of connector used. Example: Optical. * * @return the connectorType value. */ @@ -36,7 +36,7 @@ public String connectorType() { } /** - * Set the connectorType property: Connector type. Example: Optical. + * Set the connectorType property: Type of connector used. Example: Optical. * * @param connectorType the connectorType value to set. * @return the SupportedConnectorProperties object itself. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportedVersionProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportedVersionProperties.java index ea3066c13cb96..f6a6d1c186f38 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportedVersionProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/SupportedVersionProperties.java @@ -7,7 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Network device supported version properties. */ +/** Supported version details of the network device. */ @Fluent public final class SupportedVersionProperties { /* @@ -29,16 +29,11 @@ public final class SupportedVersionProperties { private String vendorFirmwareVersion; /* - * If the current version is in use. + * If true newly provisioned Fabric will use this device version by default to bootstrap the network devices for + * the first time. */ - @JsonProperty(value = "isCurrent") - private IsCurrentVersion isCurrent; - - /* - * If the current version is a test version. - */ - @JsonProperty(value = "isTest") - private IsTestVersion isTest; + @JsonProperty(value = "isDefault") + private BooleanEnumProperty isDefault; /** Creates an instance of SupportedVersionProperties class. */ public SupportedVersionProperties() { @@ -105,42 +100,24 @@ public SupportedVersionProperties withVendorFirmwareVersion(String vendorFirmwar } /** - * Get the isCurrent property: If the current version is in use. - * - * @return the isCurrent value. - */ - public IsCurrentVersion isCurrent() { - return this.isCurrent; - } - - /** - * Set the isCurrent property: If the current version is in use. - * - * @param isCurrent the isCurrent value to set. - * @return the SupportedVersionProperties object itself. - */ - public SupportedVersionProperties withIsCurrent(IsCurrentVersion isCurrent) { - this.isCurrent = isCurrent; - return this; - } - - /** - * Get the isTest property: If the current version is a test version. + * Get the isDefault property: If true newly provisioned Fabric will use this device version by default to bootstrap + * the network devices for the first time. * - * @return the isTest value. + * @return the isDefault value. */ - public IsTestVersion isTest() { - return this.isTest; + public BooleanEnumProperty isDefault() { + return this.isDefault; } /** - * Set the isTest property: If the current version is a test version. + * Set the isDefault property: If true newly provisioned Fabric will use this device version by default to bootstrap + * the network devices for the first time. * - * @param isTest the isTest value to set. + * @param isDefault the isDefault value to set. * @return the SupportedVersionProperties object itself. */ - public SupportedVersionProperties withIsTest(IsTestVersion isTest) { - this.isTest = isTest; + public SupportedVersionProperties withIsDefault(BooleanEnumProperty isDefault) { + this.isDefault = isDefault; return this; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackPatch.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TagsUpdate.java similarity index 54% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackPatch.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TagsUpdate.java index 7f166e28ea550..e2629c39231ae 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/NetworkRackPatch.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TagsUpdate.java @@ -9,15 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The NetworkRack patch resource definition. */ +/** Base tracked resource type for PATCH updates. */ @Fluent -public final class NetworkRackPatch { - /* - * Resource properties. - */ - @JsonProperty(value = "properties") - private Object properties; - +public class TagsUpdate { /* * Resource tags */ @@ -25,28 +19,8 @@ public final class NetworkRackPatch { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of NetworkRackPatch class. */ - public NetworkRackPatch() { - } - - /** - * Get the properties property: Resource properties. - * - * @return the properties value. - */ - public Object properties() { - return this.properties; - } - - /** - * Set the properties property: Resource properties. - * - * @param properties the properties value to set. - * @return the NetworkRackPatch object itself. - */ - public NetworkRackPatch withProperties(Object properties) { - this.properties = properties; - return this; + /** Creates an instance of TagsUpdate class. */ + public TagsUpdate() { } /** @@ -62,9 +36,9 @@ public Map tags() { * Set the tags property: Resource tags. * * @param tags the tags value to set. - * @return the NetworkRackPatch object itself. + * @return the TagsUpdate object itself. */ - public NetworkRackPatch withTags(Map tags) { + public TagsUpdate withTags(Map tags) { this.tags = tags; return this; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TapRuleActionType.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TapRuleActionType.java new file mode 100644 index 0000000000000..391e7407574c6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TapRuleActionType.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Type of actions that can be performed. */ +public final class TapRuleActionType extends ExpandableStringEnum { + /** Static value Drop for TapRuleActionType. */ + public static final TapRuleActionType DROP = fromString("Drop"); + + /** Static value Count for TapRuleActionType. */ + public static final TapRuleActionType COUNT = fromString("Count"); + + /** Static value Log for TapRuleActionType. */ + public static final TapRuleActionType LOG = fromString("Log"); + + /** Static value Replicate for TapRuleActionType. */ + public static final TapRuleActionType REPLICATE = fromString("Replicate"); + + /** Static value Goto for TapRuleActionType. */ + public static final TapRuleActionType GOTO = fromString("Goto"); + + /** Static value Redirect for TapRuleActionType. */ + public static final TapRuleActionType REDIRECT = fromString("Redirect"); + + /** Static value Mirror for TapRuleActionType. */ + public static final TapRuleActionType MIRROR = fromString("Mirror"); + + /** + * Creates a new instance of TapRuleActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TapRuleActionType() { + } + + /** + * Creates or finds a TapRuleActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding TapRuleActionType. + */ + @JsonCreator + public static TapRuleActionType fromString(String name) { + return fromString(name, TapRuleActionType.class); + } + + /** + * Gets known TapRuleActionType values. + * + * @return known TapRuleActionType values. + */ + public static Collection values() { + return values(TapRuleActionType.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerConfiguration.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerConfiguration.java index 0289a0bda8b27..7496d2ad09249 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerConfiguration.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerConfiguration.java @@ -9,7 +9,7 @@ /** Network and credentials configuration currently applied to terminal server. */ @Fluent -public final class TerminalServerConfiguration extends Layer3IpPrefixProperties { +public final class TerminalServerConfiguration extends TerminalServerPatchableProperties { /* * ARM Resource ID used for the NetworkDevice. */ @@ -17,22 +17,28 @@ public final class TerminalServerConfiguration extends Layer3IpPrefixProperties private String networkDeviceId; /* - * Username for the terminal server connection. + * IPv4 Address Prefix. */ - @JsonProperty(value = "username") - private String username; + @JsonProperty(value = "primaryIpv4Prefix") + private String primaryIpv4Prefix; /* - * Password for the terminal server connection. + * IPv6 Address Prefix. */ - @JsonProperty(value = "password") - private String password; + @JsonProperty(value = "primaryIpv6Prefix") + private String primaryIpv6Prefix; /* - * Serial Number of Terminal server. + * Secondary IPv4 Address Prefix. */ - @JsonProperty(value = "serialNumber") - private String serialNumber; + @JsonProperty(value = "secondaryIpv4Prefix") + private String secondaryIpv4Prefix; + + /* + * Secondary IPv6 Address Prefix. + */ + @JsonProperty(value = "secondaryIpv6Prefix") + private String secondaryIpv6Prefix; /** Creates an instance of TerminalServerConfiguration class. */ public TerminalServerConfiguration() { @@ -48,90 +54,103 @@ public String networkDeviceId() { } /** - * Get the username property: Username for the terminal server connection. + * Get the primaryIpv4Prefix property: IPv4 Address Prefix. * - * @return the username value. + * @return the primaryIpv4Prefix value. */ - public String username() { - return this.username; + public String primaryIpv4Prefix() { + return this.primaryIpv4Prefix; } /** - * Set the username property: Username for the terminal server connection. + * Set the primaryIpv4Prefix property: IPv4 Address Prefix. * - * @param username the username value to set. + * @param primaryIpv4Prefix the primaryIpv4Prefix value to set. * @return the TerminalServerConfiguration object itself. */ - public TerminalServerConfiguration withUsername(String username) { - this.username = username; + public TerminalServerConfiguration withPrimaryIpv4Prefix(String primaryIpv4Prefix) { + this.primaryIpv4Prefix = primaryIpv4Prefix; return this; } /** - * Get the password property: Password for the terminal server connection. + * Get the primaryIpv6Prefix property: IPv6 Address Prefix. * - * @return the password value. + * @return the primaryIpv6Prefix value. */ - public String password() { - return this.password; + public String primaryIpv6Prefix() { + return this.primaryIpv6Prefix; } /** - * Set the password property: Password for the terminal server connection. + * Set the primaryIpv6Prefix property: IPv6 Address Prefix. * - * @param password the password value to set. + * @param primaryIpv6Prefix the primaryIpv6Prefix value to set. * @return the TerminalServerConfiguration object itself. */ - public TerminalServerConfiguration withPassword(String password) { - this.password = password; + public TerminalServerConfiguration withPrimaryIpv6Prefix(String primaryIpv6Prefix) { + this.primaryIpv6Prefix = primaryIpv6Prefix; return this; } /** - * Get the serialNumber property: Serial Number of Terminal server. + * Get the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. * - * @return the serialNumber value. + * @return the secondaryIpv4Prefix value. */ - public String serialNumber() { - return this.serialNumber; + public String secondaryIpv4Prefix() { + return this.secondaryIpv4Prefix; } /** - * Set the serialNumber property: Serial Number of Terminal server. + * Set the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. * - * @param serialNumber the serialNumber value to set. + * @param secondaryIpv4Prefix the secondaryIpv4Prefix value to set. * @return the TerminalServerConfiguration object itself. */ - public TerminalServerConfiguration withSerialNumber(String serialNumber) { - this.serialNumber = serialNumber; + public TerminalServerConfiguration withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { + this.secondaryIpv4Prefix = secondaryIpv4Prefix; return this; } - /** {@inheritDoc} */ - @Override - public TerminalServerConfiguration withPrimaryIpv4Prefix(String primaryIpv4Prefix) { - super.withPrimaryIpv4Prefix(primaryIpv4Prefix); + /** + * Get the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. + * + * @return the secondaryIpv6Prefix value. + */ + public String secondaryIpv6Prefix() { + return this.secondaryIpv6Prefix; + } + + /** + * Set the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. + * + * @param secondaryIpv6Prefix the secondaryIpv6Prefix value to set. + * @return the TerminalServerConfiguration object itself. + */ + public TerminalServerConfiguration withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + this.secondaryIpv6Prefix = secondaryIpv6Prefix; return this; } /** {@inheritDoc} */ @Override - public TerminalServerConfiguration withPrimaryIpv6Prefix(String primaryIpv6Prefix) { - super.withPrimaryIpv6Prefix(primaryIpv6Prefix); + public TerminalServerConfiguration withUsername(String username) { + super.withUsername(username); return this; } /** {@inheritDoc} */ @Override - public TerminalServerConfiguration withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { - super.withSecondaryIpv4Prefix(secondaryIpv4Prefix); + public TerminalServerConfiguration withPassword(String password) { + super.withPassword(password); return this; } /** {@inheritDoc} */ @Override - public TerminalServerConfiguration withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { - super.withSecondaryIpv6Prefix(secondaryIpv6Prefix); + public TerminalServerConfiguration withSerialNumber(String serialNumber) { + super.withSerialNumber(serialNumber); return this; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchParameters.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchParameters.java deleted file mode 100644 index cf1660d35fa3d..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/TerminalServerPatchParameters.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Terminal server patch parameters. */ -@Fluent -public class TerminalServerPatchParameters { - /* - * Network and credentials configuration already applied to terminal server. - */ - @JsonProperty(value = "terminalServerConfiguration") - private TerminalServerPatchableProperties terminalServerConfiguration; - - /** Creates an instance of TerminalServerPatchParameters class. */ - public TerminalServerPatchParameters() { - } - - /** - * Get the terminalServerConfiguration property: Network and credentials configuration already applied to terminal - * server. - * - * @return the terminalServerConfiguration value. - */ - public TerminalServerPatchableProperties terminalServerConfiguration() { - return this.terminalServerConfiguration; - } - - /** - * Set the terminalServerConfiguration property: Network and credentials configuration already applied to terminal - * server. - * - * @param terminalServerConfiguration the terminalServerConfiguration value to set. - * @return the TerminalServerPatchParameters object itself. - */ - public TerminalServerPatchParameters withTerminalServerConfiguration( - TerminalServerPatchableProperties terminalServerConfiguration) { - this.terminalServerConfiguration = terminalServerConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (terminalServerConfiguration() != null) { - terminalServerConfiguration().validate(); - } - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeState.java index fbfd2e237166a..c2d44f378b24d 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeState.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateAdministrativeState.java @@ -15,7 +15,7 @@ public final class UpdateAdministrativeState extends EnableDisableOnResources { * Administrative state. */ @JsonProperty(value = "state") - private AdministrativeState state; + private EnableDisableState state; /** Creates an instance of UpdateAdministrativeState class. */ public UpdateAdministrativeState() { @@ -26,7 +26,7 @@ public UpdateAdministrativeState() { * * @return the state value. */ - public AdministrativeState state() { + public EnableDisableState state() { return this.state; } @@ -36,7 +36,7 @@ public AdministrativeState state() { * @param state the state value to set. * @return the UpdateAdministrativeState object itself. */ - public UpdateAdministrativeState withState(AdministrativeState state) { + public UpdateAdministrativeState withState(EnableDisableState state) { this.state = state; return this; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateDeviceAdministrativeState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateDeviceAdministrativeState.java new file mode 100644 index 0000000000000..48a1d959a9356 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateDeviceAdministrativeState.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Update the administrative state on list of resources. */ +@Fluent +public final class UpdateDeviceAdministrativeState extends EnableDisableOnResources { + /* + * Administrative state. + */ + @JsonProperty(value = "state") + private DeviceAdministrativeState state; + + /** Creates an instance of UpdateDeviceAdministrativeState class. */ + public UpdateDeviceAdministrativeState() { + } + + /** + * Get the state property: Administrative state. + * + * @return the state value. + */ + public DeviceAdministrativeState state() { + return this.state; + } + + /** + * Set the state property: Administrative state. + * + * @param state the state value to set. + * @return the UpdateDeviceAdministrativeState object itself. + */ + public UpdateDeviceAdministrativeState withState(DeviceAdministrativeState state) { + this.state = state; + return this; + } + + /** {@inheritDoc} */ + @Override + public UpdateDeviceAdministrativeState withResourceIds(List resourceIds) { + super.withResourceIds(resourceIds); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdatePowerCycleProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdatePowerCycleProperties.java deleted file mode 100644 index e5e2dd2741998..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdatePowerCycleProperties.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Update power cycle input properties. */ -@Fluent -public final class UpdatePowerCycleProperties { - /* - * Primary or Secondary power end. - */ - @JsonProperty(value = "powerEnd", required = true) - private PowerEnd powerEnd; - - /* - * On or Off toggle state. - */ - @JsonProperty(value = "state", required = true) - private State state; - - /** Creates an instance of UpdatePowerCycleProperties class. */ - public UpdatePowerCycleProperties() { - } - - /** - * Get the powerEnd property: Primary or Secondary power end. - * - * @return the powerEnd value. - */ - public PowerEnd powerEnd() { - return this.powerEnd; - } - - /** - * Set the powerEnd property: Primary or Secondary power end. - * - * @param powerEnd the powerEnd value to set. - * @return the UpdatePowerCycleProperties object itself. - */ - public UpdatePowerCycleProperties withPowerEnd(PowerEnd powerEnd) { - this.powerEnd = powerEnd; - return this; - } - - /** - * Get the state property: On or Off toggle state. - * - * @return the state value. - */ - public State state() { - return this.state; - } - - /** - * Set the state property: On or Off toggle state. - * - * @param state the state value to set. - * @return the UpdatePowerCycleProperties object itself. - */ - public UpdatePowerCycleProperties withState(State state) { - this.state = state; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (powerEnd() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property powerEnd in model UpdatePowerCycleProperties")); - } - if (state() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model UpdatePowerCycleProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UpdatePowerCycleProperties.class); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateVersion.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateVersion.java new file mode 100644 index 0000000000000..087649ad71d06 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateVersion.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Update version properties. */ +@Fluent +public final class UpdateVersion { + /* + * Specify the version. + */ + @JsonProperty(value = "version") + private String version; + + /** Creates an instance of UpdateVersion class. */ + public UpdateVersion() { + } + + /** + * Get the version property: Specify the version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Specify the version. + * + * @param version the version value to set. + * @return the UpdateVersion object itself. + */ + public UpdateVersion withVersion(String version) { + this.version = version; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateVersionProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateVersionProperties.java deleted file mode 100644 index ed9fed8814a47..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/UpdateVersionProperties.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Generate support package post action properties. */ -@Fluent -public final class UpdateVersionProperties { - /* - * The supported version defined in network device SKU. - */ - @JsonProperty(value = "skuVersion", required = true) - private String skuVersion; - - /** Creates an instance of UpdateVersionProperties class. */ - public UpdateVersionProperties() { - } - - /** - * Get the skuVersion property: The supported version defined in network device SKU. - * - * @return the skuVersion value. - */ - public String skuVersion() { - return this.skuVersion; - } - - /** - * Set the skuVersion property: The supported version defined in network device SKU. - * - * @param skuVersion the skuVersion value to set. - * @return the UpdateVersionProperties object itself. - */ - public UpdateVersionProperties withSkuVersion(String skuVersion) { - this.skuVersion = skuVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (skuVersion() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property skuVersion in model UpdateVersionProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UpdateVersionProperties.class); -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateAction.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateAction.java new file mode 100644 index 0000000000000..56d645d037313 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateAction.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Validate action that to be performed. */ +public final class ValidateAction extends ExpandableStringEnum { + /** Static value Cabling for ValidateAction. */ + public static final ValidateAction CABLING = fromString("Cabling"); + + /** Static value Configuration for ValidateAction. */ + public static final ValidateAction CONFIGURATION = fromString("Configuration"); + + /** Static value Connectivity for ValidateAction. */ + public static final ValidateAction CONNECTIVITY = fromString("Connectivity"); + + /** + * Creates a new instance of ValidateAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ValidateAction() { + } + + /** + * Creates or finds a ValidateAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding ValidateAction. + */ + @JsonCreator + public static ValidateAction fromString(String name) { + return fromString(name, ValidateAction.class); + } + + /** + * Gets known ValidateAction values. + * + * @return known ValidateAction values. + */ + public static Collection values() { + return values(ValidateAction.class); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationProperties.java new file mode 100644 index 0000000000000..ee4ba2d392c7a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationProperties.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Validation configuration properties. */ +@Fluent +public final class ValidateConfigurationProperties { + /* + * Validate action that to be performed + */ + @JsonProperty(value = "validateAction") + private ValidateAction validateAction; + + /** Creates an instance of ValidateConfigurationProperties class. */ + public ValidateConfigurationProperties() { + } + + /** + * Get the validateAction property: Validate action that to be performed. + * + * @return the validateAction value. + */ + public ValidateAction validateAction() { + return this.validateAction; + } + + /** + * Set the validateAction property: Validate action that to be performed. + * + * @param validateAction the validateAction value to set. + * @return the ValidateConfigurationProperties object itself. + */ + public ValidateConfigurationProperties withValidateAction(ValidateAction validateAction) { + this.validateAction = validateAction; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationResponse.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationResponse.java new file mode 100644 index 0000000000000..33cc19f728291 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/ValidateConfigurationResponse.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner; + +/** An immutable client-side representation of ValidateConfigurationResponse. */ +public interface ValidateConfigurationResponse { + /** + * Gets the configurationState property: Gets the configuration state. + * + * @return the configurationState value. + */ + ConfigurationState configurationState(); + + /** + * Gets the url property: URL for the details of the response. + * + * @return the url value. + */ + String url(); + + /** + * Gets the inner com.azure.resourcemanager.managednetworkfabric.fluent.models.ValidateConfigurationResponseInner + * object. + * + * @return the inner object. + */ + ValidateConfigurationResponseInner innerModel(); +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupProperties.java new file mode 100644 index 0000000000000..9836a47956d1b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanGroupProperties.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Vlan group properties. */ +@Fluent +public final class VlanGroupProperties { + /* + * Vlan group name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * List of vlans. + */ + @JsonProperty(value = "vlans") + private List vlans; + + /** Creates an instance of VlanGroupProperties class. */ + public VlanGroupProperties() { + } + + /** + * Get the name property: Vlan group name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Vlan group name. + * + * @param name the name value to set. + * @return the VlanGroupProperties object itself. + */ + public VlanGroupProperties withName(String name) { + this.name = name; + return this; + } + + /** + * Get the vlans property: List of vlans. + * + * @return the vlans value. + */ + public List vlans() { + return this.vlans; + } + + /** + * Set the vlans property: List of vlans. + * + * @param vlans the vlans value to set. + * @return the VlanGroupProperties object itself. + */ + public VlanGroupProperties withVlans(List vlans) { + this.vlans = vlans; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchCondition.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchCondition.java new file mode 100644 index 0000000000000..55300c8ec647a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VlanMatchCondition.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The vlan match conditions that needs to be matched. */ +@Fluent +public final class VlanMatchCondition { + /* + * List of vlans that needs to be matched. + */ + @JsonProperty(value = "vlans") + private List vlans; + + /* + * List of inner vlans that needs to be matched. + */ + @JsonProperty(value = "innerVlans") + private List innerVlans; + + /* + * List of vlan group names that to be matched. + */ + @JsonProperty(value = "vlanGroupNames") + private List vlanGroupNames; + + /** Creates an instance of VlanMatchCondition class. */ + public VlanMatchCondition() { + } + + /** + * Get the vlans property: List of vlans that needs to be matched. + * + * @return the vlans value. + */ + public List vlans() { + return this.vlans; + } + + /** + * Set the vlans property: List of vlans that needs to be matched. + * + * @param vlans the vlans value to set. + * @return the VlanMatchCondition object itself. + */ + public VlanMatchCondition withVlans(List vlans) { + this.vlans = vlans; + return this; + } + + /** + * Get the innerVlans property: List of inner vlans that needs to be matched. + * + * @return the innerVlans value. + */ + public List innerVlans() { + return this.innerVlans; + } + + /** + * Set the innerVlans property: List of inner vlans that needs to be matched. + * + * @param innerVlans the innerVlans value to set. + * @return the VlanMatchCondition object itself. + */ + public VlanMatchCondition withInnerVlans(List innerVlans) { + this.innerVlans = innerVlans; + return this; + } + + /** + * Get the vlanGroupNames property: List of vlan group names that to be matched. + * + * @return the vlanGroupNames value. + */ + public List vlanGroupNames() { + return this.vlanGroupNames; + } + + /** + * Set the vlanGroupNames property: List of vlan group names that to be matched. + * + * @param vlanGroupNames the vlanGroupNames value to set. + * @return the VlanMatchCondition object itself. + */ + public VlanMatchCondition withVlanGroupNames(List vlanGroupNames) { + this.vlanGroupNames = vlanGroupNames; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchableProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchableProperties.java new file mode 100644 index 0000000000000..3c291246a4b64 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchableProperties.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Network and credential configuration currently applied on terminal server. */ +@Fluent +public final class VpnConfigurationPatchableProperties { + /* + * ARM Resource ID of the Network To Network Interconnect. + */ + @JsonProperty(value = "networkToNetworkInterconnectId") + private String networkToNetworkInterconnectId; + + /* + * Peering option list. + */ + @JsonProperty(value = "peeringOption") + private PeeringOption peeringOption; + + /* + * option B properties + */ + @JsonProperty(value = "optionBProperties") + private OptionBProperties optionBProperties; + + /* + * option A properties + */ + @JsonProperty(value = "optionAProperties") + private VpnConfigurationPatchablePropertiesOptionAProperties optionAProperties; + + /** Creates an instance of VpnConfigurationPatchableProperties class. */ + public VpnConfigurationPatchableProperties() { + } + + /** + * Get the networkToNetworkInterconnectId property: ARM Resource ID of the Network To Network Interconnect. + * + * @return the networkToNetworkInterconnectId value. + */ + public String networkToNetworkInterconnectId() { + return this.networkToNetworkInterconnectId; + } + + /** + * Set the networkToNetworkInterconnectId property: ARM Resource ID of the Network To Network Interconnect. + * + * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. + * @return the VpnConfigurationPatchableProperties object itself. + */ + public VpnConfigurationPatchableProperties withNetworkToNetworkInterconnectId( + String networkToNetworkInterconnectId) { + this.networkToNetworkInterconnectId = networkToNetworkInterconnectId; + return this; + } + + /** + * Get the peeringOption property: Peering option list. + * + * @return the peeringOption value. + */ + public PeeringOption peeringOption() { + return this.peeringOption; + } + + /** + * Set the peeringOption property: Peering option list. + * + * @param peeringOption the peeringOption value to set. + * @return the VpnConfigurationPatchableProperties object itself. + */ + public VpnConfigurationPatchableProperties withPeeringOption(PeeringOption peeringOption) { + this.peeringOption = peeringOption; + return this; + } + + /** + * Get the optionBProperties property: option B properties. + * + * @return the optionBProperties value. + */ + public OptionBProperties optionBProperties() { + return this.optionBProperties; + } + + /** + * Set the optionBProperties property: option B properties. + * + * @param optionBProperties the optionBProperties value to set. + * @return the VpnConfigurationPatchableProperties object itself. + */ + public VpnConfigurationPatchableProperties withOptionBProperties(OptionBProperties optionBProperties) { + this.optionBProperties = optionBProperties; + return this; + } + + /** + * Get the optionAProperties property: option A properties. + * + * @return the optionAProperties value. + */ + public VpnConfigurationPatchablePropertiesOptionAProperties optionAProperties() { + return this.optionAProperties; + } + + /** + * Set the optionAProperties property: option A properties. + * + * @param optionAProperties the optionAProperties value to set. + * @return the VpnConfigurationPatchableProperties object itself. + */ + public VpnConfigurationPatchableProperties withOptionAProperties( + VpnConfigurationPatchablePropertiesOptionAProperties optionAProperties) { + this.optionAProperties = optionAProperties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (optionBProperties() != null) { + optionBProperties().validate(); + } + if (optionAProperties() != null) { + optionAProperties().validate(); + } + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchablePropertiesOptionAProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchablePropertiesOptionAProperties.java new file mode 100644 index 0000000000000..c7d7763755681 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPatchablePropertiesOptionAProperties.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** option A properties. */ +@Fluent +public final class VpnConfigurationPatchablePropertiesOptionAProperties extends OptionAProperties { + /* + * IPv4 Address Prefix. + */ + @JsonProperty(value = "primaryIpv4Prefix") + private String primaryIpv4Prefix; + + /* + * IPv6 Address Prefix. + */ + @JsonProperty(value = "primaryIpv6Prefix") + private String primaryIpv6Prefix; + + /* + * Secondary IPv4 Address Prefix. + */ + @JsonProperty(value = "secondaryIpv4Prefix") + private String secondaryIpv4Prefix; + + /* + * Secondary IPv6 Address Prefix. + */ + @JsonProperty(value = "secondaryIpv6Prefix") + private String secondaryIpv6Prefix; + + /** Creates an instance of VpnConfigurationPatchablePropertiesOptionAProperties class. */ + public VpnConfigurationPatchablePropertiesOptionAProperties() { + } + + /** + * Get the primaryIpv4Prefix property: IPv4 Address Prefix. + * + * @return the primaryIpv4Prefix value. + */ + public String primaryIpv4Prefix() { + return this.primaryIpv4Prefix; + } + + /** + * Set the primaryIpv4Prefix property: IPv4 Address Prefix. + * + * @param primaryIpv4Prefix the primaryIpv4Prefix value to set. + * @return the VpnConfigurationPatchablePropertiesOptionAProperties object itself. + */ + public VpnConfigurationPatchablePropertiesOptionAProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) { + this.primaryIpv4Prefix = primaryIpv4Prefix; + return this; + } + + /** + * Get the primaryIpv6Prefix property: IPv6 Address Prefix. + * + * @return the primaryIpv6Prefix value. + */ + public String primaryIpv6Prefix() { + return this.primaryIpv6Prefix; + } + + /** + * Set the primaryIpv6Prefix property: IPv6 Address Prefix. + * + * @param primaryIpv6Prefix the primaryIpv6Prefix value to set. + * @return the VpnConfigurationPatchablePropertiesOptionAProperties object itself. + */ + public VpnConfigurationPatchablePropertiesOptionAProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) { + this.primaryIpv6Prefix = primaryIpv6Prefix; + return this; + } + + /** + * Get the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. + * + * @return the secondaryIpv4Prefix value. + */ + public String secondaryIpv4Prefix() { + return this.secondaryIpv4Prefix; + } + + /** + * Set the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. + * + * @param secondaryIpv4Prefix the secondaryIpv4Prefix value to set. + * @return the VpnConfigurationPatchablePropertiesOptionAProperties object itself. + */ + public VpnConfigurationPatchablePropertiesOptionAProperties withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { + this.secondaryIpv4Prefix = secondaryIpv4Prefix; + return this; + } + + /** + * Get the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. + * + * @return the secondaryIpv6Prefix value. + */ + public String secondaryIpv6Prefix() { + return this.secondaryIpv6Prefix; + } + + /** + * Set the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. + * + * @param secondaryIpv6Prefix the secondaryIpv6Prefix value to set. + * @return the VpnConfigurationPatchablePropertiesOptionAProperties object itself. + */ + public VpnConfigurationPatchablePropertiesOptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + this.secondaryIpv6Prefix = secondaryIpv6Prefix; + return this; + } + + /** {@inheritDoc} */ + @Override + public VpnConfigurationPatchablePropertiesOptionAProperties withMtu(Integer mtu) { + super.withMtu(mtu); + return this; + } + + /** {@inheritDoc} */ + @Override + public VpnConfigurationPatchablePropertiesOptionAProperties withVlanId(Integer vlanId) { + super.withVlanId(vlanId); + return this; + } + + /** {@inheritDoc} */ + @Override + public VpnConfigurationPatchablePropertiesOptionAProperties withPeerAsn(Long peerAsn) { + super.withPeerAsn(peerAsn); + return this; + } + + /** {@inheritDoc} */ + @Override + public VpnConfigurationPatchablePropertiesOptionAProperties withBfdConfiguration( + BfdConfiguration bfdConfiguration) { + super.withBfdConfiguration(bfdConfiguration); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationProperties.java index 66b531bf6df50..1fbaee87f2036 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationProperties.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationProperties.java @@ -8,20 +8,20 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Configuration for infrastructure vpn. */ +/** Network and credential configuration currently applied on terminal server. */ @Fluent public final class VpnConfigurationProperties { /* - * Indicates configuration state. Example: Enabled | Disabled. + * ARM Resource ID of the Network To Network Interconnect. */ - @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) - private EnabledDisabledState administrativeState; + @JsonProperty(value = "networkToNetworkInterconnectId") + private String networkToNetworkInterconnectId; /* - * Gets the networkToNetworkInterconnectId of the resource. + * Administrative state of the resource. */ - @JsonProperty(value = "networkToNetworkInterconnectId", access = JsonProperty.Access.WRITE_ONLY) - private String networkToNetworkInterconnectId; + @JsonProperty(value = "administrativeState", access = JsonProperty.Access.WRITE_ONLY) + private AdministrativeState administrativeState; /* * Peering option list. @@ -33,34 +33,45 @@ public final class VpnConfigurationProperties { * option B properties */ @JsonProperty(value = "optionBProperties") - private OptionBPropertiesAutoGenerated optionBProperties; + private OptionBProperties optionBProperties; /* * option A properties */ @JsonProperty(value = "optionAProperties") - private OptionAProperties optionAProperties; + private VpnConfigurationPropertiesOptionAProperties optionAProperties; /** Creates an instance of VpnConfigurationProperties class. */ public VpnConfigurationProperties() { } /** - * Get the administrativeState property: Indicates configuration state. Example: Enabled | Disabled. + * Get the networkToNetworkInterconnectId property: ARM Resource ID of the Network To Network Interconnect. * - * @return the administrativeState value. + * @return the networkToNetworkInterconnectId value. */ - public EnabledDisabledState administrativeState() { - return this.administrativeState; + public String networkToNetworkInterconnectId() { + return this.networkToNetworkInterconnectId; } /** - * Get the networkToNetworkInterconnectId property: Gets the networkToNetworkInterconnectId of the resource. + * Set the networkToNetworkInterconnectId property: ARM Resource ID of the Network To Network Interconnect. * - * @return the networkToNetworkInterconnectId value. + * @param networkToNetworkInterconnectId the networkToNetworkInterconnectId value to set. + * @return the VpnConfigurationProperties object itself. */ - public String networkToNetworkInterconnectId() { - return this.networkToNetworkInterconnectId; + public VpnConfigurationProperties withNetworkToNetworkInterconnectId(String networkToNetworkInterconnectId) { + this.networkToNetworkInterconnectId = networkToNetworkInterconnectId; + return this; + } + + /** + * Get the administrativeState property: Administrative state of the resource. + * + * @return the administrativeState value. + */ + public AdministrativeState administrativeState() { + return this.administrativeState; } /** @@ -88,7 +99,7 @@ public VpnConfigurationProperties withPeeringOption(PeeringOption peeringOption) * * @return the optionBProperties value. */ - public OptionBPropertiesAutoGenerated optionBProperties() { + public OptionBProperties optionBProperties() { return this.optionBProperties; } @@ -98,7 +109,7 @@ public OptionBPropertiesAutoGenerated optionBProperties() { * @param optionBProperties the optionBProperties value to set. * @return the VpnConfigurationProperties object itself. */ - public VpnConfigurationProperties withOptionBProperties(OptionBPropertiesAutoGenerated optionBProperties) { + public VpnConfigurationProperties withOptionBProperties(OptionBProperties optionBProperties) { this.optionBProperties = optionBProperties; return this; } @@ -108,7 +119,7 @@ public VpnConfigurationProperties withOptionBProperties(OptionBPropertiesAutoGen * * @return the optionAProperties value. */ - public OptionAProperties optionAProperties() { + public VpnConfigurationPropertiesOptionAProperties optionAProperties() { return this.optionAProperties; } @@ -118,7 +129,8 @@ public OptionAProperties optionAProperties() { * @param optionAProperties the optionAProperties value to set. * @return the VpnConfigurationProperties object itself. */ - public VpnConfigurationProperties withOptionAProperties(OptionAProperties optionAProperties) { + public VpnConfigurationProperties withOptionAProperties( + VpnConfigurationPropertiesOptionAProperties optionAProperties) { this.optionAProperties = optionAProperties; return this; } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPropertiesOptionAProperties.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPropertiesOptionAProperties.java new file mode 100644 index 0000000000000..1f9d5bffb8270 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/VpnConfigurationPropertiesOptionAProperties.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** option A properties. */ +@Fluent +public final class VpnConfigurationPropertiesOptionAProperties extends OptionAProperties { + /* + * IPv4 Address Prefix. + */ + @JsonProperty(value = "primaryIpv4Prefix") + private String primaryIpv4Prefix; + + /* + * IPv6 Address Prefix. + */ + @JsonProperty(value = "primaryIpv6Prefix") + private String primaryIpv6Prefix; + + /* + * Secondary IPv4 Address Prefix. + */ + @JsonProperty(value = "secondaryIpv4Prefix") + private String secondaryIpv4Prefix; + + /* + * Secondary IPv6 Address Prefix. + */ + @JsonProperty(value = "secondaryIpv6Prefix") + private String secondaryIpv6Prefix; + + /** Creates an instance of VpnConfigurationPropertiesOptionAProperties class. */ + public VpnConfigurationPropertiesOptionAProperties() { + } + + /** + * Get the primaryIpv4Prefix property: IPv4 Address Prefix. + * + * @return the primaryIpv4Prefix value. + */ + public String primaryIpv4Prefix() { + return this.primaryIpv4Prefix; + } + + /** + * Set the primaryIpv4Prefix property: IPv4 Address Prefix. + * + * @param primaryIpv4Prefix the primaryIpv4Prefix value to set. + * @return the VpnConfigurationPropertiesOptionAProperties object itself. + */ + public VpnConfigurationPropertiesOptionAProperties withPrimaryIpv4Prefix(String primaryIpv4Prefix) { + this.primaryIpv4Prefix = primaryIpv4Prefix; + return this; + } + + /** + * Get the primaryIpv6Prefix property: IPv6 Address Prefix. + * + * @return the primaryIpv6Prefix value. + */ + public String primaryIpv6Prefix() { + return this.primaryIpv6Prefix; + } + + /** + * Set the primaryIpv6Prefix property: IPv6 Address Prefix. + * + * @param primaryIpv6Prefix the primaryIpv6Prefix value to set. + * @return the VpnConfigurationPropertiesOptionAProperties object itself. + */ + public VpnConfigurationPropertiesOptionAProperties withPrimaryIpv6Prefix(String primaryIpv6Prefix) { + this.primaryIpv6Prefix = primaryIpv6Prefix; + return this; + } + + /** + * Get the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. + * + * @return the secondaryIpv4Prefix value. + */ + public String secondaryIpv4Prefix() { + return this.secondaryIpv4Prefix; + } + + /** + * Set the secondaryIpv4Prefix property: Secondary IPv4 Address Prefix. + * + * @param secondaryIpv4Prefix the secondaryIpv4Prefix value to set. + * @return the VpnConfigurationPropertiesOptionAProperties object itself. + */ + public VpnConfigurationPropertiesOptionAProperties withSecondaryIpv4Prefix(String secondaryIpv4Prefix) { + this.secondaryIpv4Prefix = secondaryIpv4Prefix; + return this; + } + + /** + * Get the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. + * + * @return the secondaryIpv6Prefix value. + */ + public String secondaryIpv6Prefix() { + return this.secondaryIpv6Prefix; + } + + /** + * Set the secondaryIpv6Prefix property: Secondary IPv6 Address Prefix. + * + * @param secondaryIpv6Prefix the secondaryIpv6Prefix value to set. + * @return the VpnConfigurationPropertiesOptionAProperties object itself. + */ + public VpnConfigurationPropertiesOptionAProperties withSecondaryIpv6Prefix(String secondaryIpv6Prefix) { + this.secondaryIpv6Prefix = secondaryIpv6Prefix; + return this; + } + + /** {@inheritDoc} */ + @Override + public VpnConfigurationPropertiesOptionAProperties withMtu(Integer mtu) { + super.withMtu(mtu); + return this; + } + + /** {@inheritDoc} */ + @Override + public VpnConfigurationPropertiesOptionAProperties withVlanId(Integer vlanId) { + super.withVlanId(vlanId); + return this; + } + + /** {@inheritDoc} */ + @Override + public VpnConfigurationPropertiesOptionAProperties withPeerAsn(Long peerAsn) { + super.withPeerAsn(peerAsn); + return this; + } + + /** {@inheritDoc} */ + @Override + public VpnConfigurationPropertiesOptionAProperties withBfdConfiguration(BfdConfiguration bfdConfiguration) { + super.withBfdConfiguration(bfdConfiguration); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/WorkloadServices.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/WorkloadServices.java deleted file mode 100644 index cd94cd944e52f..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/main/java/com/azure/resourcemanager/managednetworkfabric/models/WorkloadServices.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** WorkloadServices IP ranges. */ -@Fluent -public final class 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. - */ - @JsonProperty(value = "ipv4AddressSpaces") - private List ipv4AddressSpaces; - - /* - * The IPv6 is not supported right now. - */ - @JsonProperty(value = "ipv6AddressSpaces") - private List ipv6AddressSpaces; - - /** Creates an instance of WorkloadServices class. */ - public WorkloadServices() { - } - - /** - * Get the ipv4AddressSpaces property: 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. - * - * @return the ipv4AddressSpaces value. - */ - public List ipv4AddressSpaces() { - return this.ipv4AddressSpaces; - } - - /** - * Set the ipv4AddressSpaces property: 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. - * - * @param ipv4AddressSpaces the ipv4AddressSpaces value to set. - * @return the WorkloadServices object itself. - */ - public WorkloadServices withIpv4AddressSpaces(List ipv4AddressSpaces) { - this.ipv4AddressSpaces = ipv4AddressSpaces; - return this; - } - - /** - * Get the ipv6AddressSpaces property: The IPv6 is not supported right now. - * - * @return the ipv6AddressSpaces value. - */ - public List ipv6AddressSpaces() { - return this.ipv6AddressSpaces; - } - - /** - * Set the ipv6AddressSpaces property: The IPv6 is not supported right now. - * - * @param ipv6AddressSpaces the ipv6AddressSpaces value to set. - * @return the WorkloadServices object itself. - */ - public WorkloadServices withIpv6AddressSpaces(List ipv6AddressSpaces) { - this.ipv6AddressSpaces = ipv6AddressSpaces; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateSamples.java index a2c007fd94912..15174015dbe78 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateSamples.java @@ -4,40 +4,123 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListConditionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; -import com.azure.resourcemanager.managednetworkfabric.models.ConditionActionType; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAction; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortType; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; +import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** Samples for AccessControlLists Create. */ public final class AccessControlListsCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Create_MinimumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Create_MaximumSet_Gen.json */ /** - * Sample code: AccessControlLists_Create_MinimumSet_Gen. + * Sample code: AccessControlLists_Create_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void accessControlListsCreateMinimumSetGen( + public static void accessControlListsCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .accessControlLists() - .define("aclOne") - .withRegion("EastUs") - .withExistingResourceGroup("resourceGroupName") - .withAddressFamily(AddressFamily.IPV4) - .withConditions( + .define("example-acl") + .withRegion("eastUs") + .withExistingResourceGroup("example-rg") + .withTags(mapOf("keyID", "KeyValue")) + .withConfigurationType(ConfigurationType.FILE) + .withAclsUrl("https://ACL-Storage-URL") + .withMatchConfigurations( Arrays .asList( - new AccessControlListConditionProperties() - .withSequenceNumber(3) - .withAction(ConditionActionType.ALLOW) - .withDestinationAddress("1.1.1.1") - .withDestinationPort("21") - .withSourceAddress("2.2.2.2") - .withSourcePort("65000") - .withProtocol(6))) + new AccessControlListMatchConfiguration() + .withMatchConfigurationName("example-match") + .withSequenceNumber(123L) + .withIpAddressType(IpAddressType.IPV4) + .withMatchConditions( + Arrays + .asList( + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("TCP")) + .withVlanMatchCondition( + new VlanMatchCondition() + .withVlans(Arrays.asList("20-30")) + .withInnerVlans(Arrays.asList("30")) + .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) + .withIpCondition( + new IpMatchCondition() + .withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) + .withIpGroupNames(Arrays.asList("example-ipGroup"))) + .withEtherTypes(Arrays.asList("0x1")) + .withFragments(Arrays.asList("0xff00-0xffff")) + .withIpLengths(Arrays.asList("4094-9214")) + .withTtlValues(Arrays.asList("23")) + .withDscpMarkings(Arrays.asList("32")) + .withPortCondition( + new AccessControlListPortCondition() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("1-20")) + .withPortGroupNames(Arrays.asList("example-portGroup")) + .withFlags(Arrays.asList("established"))))) + .withActions( + Arrays + .asList( + new AccessControlListAction() + .withType(AclActionType.COUNT) + .withCounterName("example-counter"))))) + .withDynamicMatchConfigurations( + Arrays + .asList( + new CommonDynamicMatchConfiguration() + .withIpGroups( + Arrays + .asList( + new IpGroupProperties() + .withName("example-ipGroup") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("10.20.3.1/20")))) + .withVlanGroups( + Arrays + .asList( + new VlanGroupProperties() + .withName("example-vlanGroup") + .withVlans(Arrays.asList("20-30")))) + .withPortGroups( + Arrays + .asList( + new PortGroupProperties() + .withName("example-portGroup") + .withPorts(Arrays.asList("100-200")))))) + .withAnnotation("annotation") .create(); } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsDeleteSamples.java index 904215389bdc9..576ad0fda24bb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsDeleteSamples.java @@ -7,17 +7,15 @@ /** Samples for AccessControlLists Delete. */ public final class AccessControlListsDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Delete_MaximumSet_Gen.json */ /** - * Sample code: AccessControlLists_Delete_MinimumSet_Gen. + * Sample code: AccessControlLists_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void accessControlListsDeleteMinimumSetGen( + public static void accessControlListsDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .accessControlLists() - .deleteByResourceGroupWithResponse("subscriptionId", "aclOne", com.azure.core.util.Context.NONE); + manager.accessControlLists().delete("example-rg", "example-acl", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsGetByResourceGroupSamples.java index 16f97f53558f6..4bc0bf63c5972 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsGetByResourceGroupSamples.java @@ -7,17 +7,17 @@ /** Samples for AccessControlLists GetByResourceGroup. */ public final class AccessControlListsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Get_MaximumSet_Gen.json */ /** - * Sample code: AccessControlLists_Get_MinimumSet_Gen. + * Sample code: AccessControlLists_Get_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void accessControlListsGetMinimumSetGen( + public static void accessControlListsGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .accessControlLists() - .getByResourceGroupWithResponse("resourceGroupName", "aclOne", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("example-rg", "example-acl", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListByResourceGroupSamples.java index e6c898f50c9b1..11fa2db1547d4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListByResourceGroupSamples.java @@ -7,15 +7,15 @@ /** Samples for AccessControlLists ListByResourceGroup. */ public final class AccessControlListsListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: AccessControlLists_ListByResourceGroup_MinimumSet_Gen. + * Sample code: AccessControlLists_ListByResourceGroup_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void accessControlListsListByResourceGroupMinimumSetGen( + public static void accessControlListsListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.accessControlLists().listByResourceGroup("resourceGroupName", com.azure.core.util.Context.NONE); + manager.accessControlLists().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListSamples.java index 8281870a63d45..fedca9337f850 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListSamples.java @@ -7,14 +7,14 @@ /** Samples for AccessControlLists List. */ public final class AccessControlListsListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_ListBySubscription_MinimumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: AccessControlLists_ListBySubscription_MinimumSet_Gen. + * Sample code: AccessControlLists_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void accessControlListsListBySubscriptionMinimumSetGen( + public static void accessControlListsListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager.accessControlLists().list(com.azure.core.util.Context.NONE); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsResyncSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsResyncSamples.java new file mode 100644 index 0000000000000..e0a6ee9473180 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsResyncSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for AccessControlLists Resync. */ +public final class AccessControlListsResyncSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Resync_MaximumSet_Gen.json + */ + /** + * Sample code: AccessControlLists_Resync_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void accessControlListsResyncMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.accessControlLists().resync("example-rg", "example-acl", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsUpdateAdministrativeStateSamples.java new file mode 100644 index 0000000000000..5836d8d2b48ed --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsUpdateAdministrativeStateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for AccessControlLists UpdateAdministrativeState. */ +public final class AccessControlListsUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_UpdateAdministrativeState_MaximumSet_Gen.json + */ + /** + * Sample code: AccessControlLists_UpdateAdministrativeState_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void accessControlListsUpdateAdministrativeStateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .accessControlLists() + .updateAdministrativeState( + "example-rg", + "example-acl", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsUpdateSamples.java index bda58516fd14e..439dda6f25938 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsUpdateSamples.java @@ -5,42 +5,125 @@ package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListConditionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; -import com.azure.resourcemanager.managednetworkfabric.models.ConditionActionType; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListAction; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.AclActionType; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortType; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; +import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** Samples for AccessControlLists Update. */ public final class AccessControlListsUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Update_MaximumSet_Gen.json */ /** - * Sample code: AccessControlLists_Update_MinimumSet_Gen. + * Sample code: AccessControlLists_Update_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void accessControlListsUpdateMinimumSetGen( + public static void accessControlListsUpdateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { AccessControlList resource = manager .accessControlLists() - .getByResourceGroupWithResponse("resourceGroupName", "aclOne", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("example-rg", "example-acl", com.azure.core.util.Context.NONE) .getValue(); resource .update() - .withAddressFamily(AddressFamily.IPV4) - .withConditions( + .withTags(mapOf("keyID", "KeyValue")) + .withAnnotation("annotation") + .withConfigurationType(ConfigurationType.FILE) + .withAclsUrl("https://microsoft.com/a") + .withMatchConfigurations( Arrays .asList( - new AccessControlListConditionProperties() - .withSequenceNumber(4) - .withAction(ConditionActionType.ALLOW) - .withDestinationAddress("1.1.1.2") - .withDestinationPort("21") - .withSourceAddress("2.2.2.3") - .withSourcePort("65000") - .withProtocol(6))) + new AccessControlListMatchConfiguration() + .withMatchConfigurationName("example-match") + .withSequenceNumber(123L) + .withIpAddressType(IpAddressType.IPV4) + .withMatchConditions( + Arrays + .asList( + new AccessControlListMatchCondition() + .withProtocolTypes(Arrays.asList("TCP")) + .withVlanMatchCondition( + new VlanMatchCondition() + .withVlans(Arrays.asList("20-30")) + .withInnerVlans(Arrays.asList("30")) + .withVlanGroupNames(Arrays.asList("example-vlanGroup"))) + .withIpCondition( + new IpMatchCondition() + .withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("10.20.20.20/12")) + .withIpGroupNames(Arrays.asList("example-ipGroup"))) + .withEtherTypes(Arrays.asList("0x1")) + .withFragments(Arrays.asList("0xff00-0xffff")) + .withIpLengths(Arrays.asList("4094-9214")) + .withTtlValues(Arrays.asList("23")) + .withDscpMarkings(Arrays.asList("32")) + .withPortCondition( + new AccessControlListPortCondition() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("1-20")) + .withPortGroupNames(Arrays.asList("example-portGroup")) + .withFlags(Arrays.asList("established"))))) + .withActions( + Arrays + .asList( + new AccessControlListAction() + .withType(AclActionType.COUNT) + .withCounterName("example-counter"))))) + .withDynamicMatchConfigurations( + Arrays + .asList( + new CommonDynamicMatchConfiguration() + .withIpGroups( + Arrays + .asList( + new IpGroupProperties() + .withName("example-ipGroup") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("10.20.3.1/20")))) + .withVlanGroups( + Arrays + .asList( + new VlanGroupProperties() + .withName("example-vlanGroup") + .withVlans(Arrays.asList("20-30")))) + .withPortGroups( + Arrays + .asList( + new PortGroupProperties() + .withName("example-portGroup") + .withPorts(Arrays.asList("100-200")))))) .apply(); } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsValidateConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsValidateConfigurationSamples.java new file mode 100644 index 0000000000000..1be610d6a86fc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsValidateConfigurationSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for AccessControlLists ValidateConfiguration. */ +public final class AccessControlListsValidateConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_ValidateConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: AccessControlLists_ValidateConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void accessControlListsValidateConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .accessControlLists() + .validateConfiguration("example-rg", "example-acl", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksClearArpEntriesSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksClearArpEntriesSamples.java deleted file mode 100644 index 0169a6e34c01a..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksClearArpEntriesSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import java.util.Arrays; - -/** Samples for ExternalNetworks ClearArpEntries. */ -public final class ExternalNetworksClearArpEntriesSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_clearArpEntries_MaximumSet_Gen.json - */ - /** - * Sample code: ExternalNetworks_clearArpEntries_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void externalNetworksClearArpEntriesMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .externalNetworks() - .clearArpEntries( - "resourceGroupName", - "example-l3domain", - "example-externalnetwork", - new EnableDisableOnResources() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksClearIpv6NeighborsSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksClearIpv6NeighborsSamples.java deleted file mode 100644 index 98c727fc0e02f..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksClearIpv6NeighborsSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import java.util.Arrays; - -/** Samples for ExternalNetworks ClearIpv6Neighbors. */ -public final class ExternalNetworksClearIpv6NeighborsSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_clearIpv6Neighbors_MaximumSet_Gen.json - */ - /** - * Sample code: ExternalNetworks_clearIpv6Neighbors_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void externalNetworksClearIpv6NeighborsMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .externalNetworks() - .clearIpv6Neighbors( - "resourceGroupName", - "example-l3domain", - "example-externalnetwork", - new EnableDisableOnResources() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateSamples.java index 4a82b8e7c33a4..e4247096b7539 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateSamples.java @@ -5,15 +5,18 @@ package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; import java.util.Arrays; /** Samples for ExternalNetworks Create. */ public final class ExternalNetworksCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Create_MaximumSet_Gen.json */ /** * Sample code: ExternalNetworks_Create_MaximumSet_Gen. @@ -25,12 +28,18 @@ public static void externalNetworksCreateMaximumSetGen( manager .externalNetworks() .define("example-externalnetwork") - .withExistingL3IsolationDomain("resourceGroupName", "example-l3domain") + .withExistingL3IsolationDomain("example-rg", "example-l3domain") .withPeeringOption(PeeringOption.OPTIONA) .withOptionBProperties( - new OptionBProperties() + new L3OptionBProperties() .withImportRouteTargets(Arrays.asList("65046:10039")) - .withExportRouteTargets(Arrays.asList("65046:10039"))) + .withExportRouteTargets(Arrays.asList("65046:10039")) + .withRouteTargets( + new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10039")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10039")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10039")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10039")))) .withOptionAProperties( new ExternalNetworkPropertiesOptionAProperties() .withPrimaryIpv4Prefix("10.1.1.0/30") @@ -39,12 +48,29 @@ public static void externalNetworksCreateMaximumSetGen( .withSecondaryIpv6Prefix("3FFE:FFFF:0:CD30::a4/126") .withMtu(1500) .withVlanId(1001) - .withPeerAsn(65047) - .withBfdConfiguration(new BfdConfiguration())) + .withPeerAsn(65047L) + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) + .withIngressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withEgressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl")) .withImportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") .withExportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportRoutePolicy( + new ImportRoutePolicy() + .withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withExportRoutePolicy( + new ExportRoutePolicy() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withAnnotation("annotation") .create(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksDeleteSamples.java index 6a3813bdf9f25..73fe962e0a00f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ExternalNetworks Delete. */ public final class ExternalNetworksDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Delete_MaximumSet_Gen.json */ /** * Sample code: ExternalNetworks_Delete_MaximumSet_Gen. @@ -18,7 +18,6 @@ public static void externalNetworksDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .externalNetworks() - .delete( - "resourceGroupName", "example-l3domain", "example-externalnetwork", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-l3domain", "example-externalnetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksGetSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksGetSamples.java index 366514c90c220..de87afdf95b9a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksGetSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ExternalNetworks Get. */ public final class ExternalNetworksGetSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Get_MaximumSet_Gen.json */ /** * Sample code: ExternalNetworks_Get_MaximumSet_Gen. @@ -18,7 +18,6 @@ public static void externalNetworksGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .externalNetworks() - .getWithResponse( - "resourceGroupName", "example-l3domain", "example-externalnetwork", com.azure.core.util.Context.NONE); + .getWithResponse("rgL3IsolationDomains", "yhtr", "fltpszzikbalrzaqq", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListByL3IsolationDomainSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListByL3IsolationDomainSamples.java new file mode 100644 index 0000000000000..b698b1bb93f69 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListByL3IsolationDomainSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for ExternalNetworks ListByL3IsolationDomain. */ +public final class ExternalNetworksListByL3IsolationDomainSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen.json + */ + /** + * Sample code: ExternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void externalNetworksListByL3IsolationDomainMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .externalNetworks() + .listByL3IsolationDomain("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateAdministrativeStateSamples.java index a4ad0fa3dfd7c..9cda8a8acfec4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateAdministrativeStateSamples.java @@ -4,17 +4,17 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.util.Arrays; /** Samples for ExternalNetworks UpdateAdministrativeState. */ public final class ExternalNetworksUpdateAdministrativeStateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_UpdateAdministrativeState_MaximumSet_Gen.json */ /** - * Sample code: ExternalNetworks_updateAdministrativeState_MaximumSet_Gen. + * Sample code: ExternalNetworks_UpdateAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ @@ -23,15 +23,10 @@ public static void externalNetworksUpdateAdministrativeStateMaximumSetGen( manager .externalNetworks() .updateAdministrativeState( - "resourceGroupName", + "example-rg", "example-l3domain", "example-externalnetwork", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) - .withState(AdministrativeState.ENABLE), + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateBfdForBgpAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateBfdForBgpAdministrativeStateSamples.java deleted file mode 100644 index c603edf2ab6a8..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateBfdForBgpAdministrativeStateSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Arrays; - -/** Samples for ExternalNetworks UpdateBfdForBgpAdministrativeState. */ -public final class ExternalNetworksUpdateBfdForBgpAdministrativeStateSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen.json - */ - /** - * Sample code: ExternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void externalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .externalNetworks() - .updateBfdForBgpAdministrativeState( - "resourceGroupName", - "example-l3domain", - "example-externalnetwork", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) - .withState(AdministrativeState.ENABLE), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateBgpAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateBgpAdministrativeStateSamples.java deleted file mode 100644 index b7172344c1c04..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateBgpAdministrativeStateSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Arrays; - -/** Samples for ExternalNetworks UpdateBgpAdministrativeState. */ -public final class ExternalNetworksUpdateBgpAdministrativeStateSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen.json - */ - /** - * Sample code: ExternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void externalNetworksUpdateBgpAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .externalNetworks() - .updateBgpAdministrativeState( - "resourceGroupName", - "example-l3domain", - "example-externalnetwork", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) - .withState(AdministrativeState.ENABLE), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateSamples.java index ed7cfc2096092..385d84fb5c081 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateSamples.java @@ -5,16 +5,19 @@ package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3OptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchPropertiesOptionAProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3OptionBProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; import java.util.Arrays; /** Samples for ExternalNetworks Update. */ public final class ExternalNetworksUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Update_MaximumSet_Gen.json */ /** * Sample code: ExternalNetworks_Update_MaximumSet_Gen. @@ -27,33 +30,52 @@ public static void externalNetworksUpdateMaximumSetGen( manager .externalNetworks() .getWithResponse( - "resourceGroupName", - "example-l3domain", - "example-externalnetwork", - com.azure.core.util.Context.NONE) + "example-rg", "example-l3domain", "example-externalnetwork", com.azure.core.util.Context.NONE) .getValue(); resource .update() .withPeeringOption(PeeringOption.OPTIONA) .withOptionBProperties( - new OptionBProperties() + new L3OptionBProperties() .withImportRouteTargets(Arrays.asList("65046:10039")) - .withExportRouteTargets(Arrays.asList("65046:10039"))) + .withExportRouteTargets(Arrays.asList("65046:10039")) + .withRouteTargets( + new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10039")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10039")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10039")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10039")))) .withOptionAProperties( - new Layer3OptionAProperties() + new ExternalNetworkPatchPropertiesOptionAProperties() .withPrimaryIpv4Prefix("10.1.1.0/30") .withPrimaryIpv6Prefix("3FFE:FFFF:0:CD30::a0/126") .withSecondaryIpv4Prefix("10.1.1.4/30") .withSecondaryIpv6Prefix("3FFE:FFFF:0:CD30::a4/126") .withMtu(1500) .withVlanId(1001) - .withPeerAsn(65047) - .withBfdConfiguration(new BfdConfiguration())) + .withPeerAsn(65047L) + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) + .withIngressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withEgressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl")) .withImportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") .withExportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") - .withAnnotation("Lab 1") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportRoutePolicy( + new ImportRoutePolicy() + .withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withExportRoutePolicy( + new ExportRoutePolicy() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withAnnotation("annotation1") .apply(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java new file mode 100644 index 0000000000000..2e540f0736835 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for ExternalNetworks UpdateStaticRouteBfdAdministrativeState. */ +public final class ExternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen.json + */ + /** + * Sample code: ExternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void externalNetworksUpdateStaticRouteBfdAdministrativeStateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .externalNetworks() + .updateStaticRouteBfdAdministrativeState( + "example-rg", + "example-l3domain", + "example-externalnetwork", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksClearArpEntriesSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksClearArpEntriesSamples.java deleted file mode 100644 index e1fbf81ff4dc3..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksClearArpEntriesSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import java.util.Arrays; - -/** Samples for InternalNetworks ClearArpEntries. */ -public final class InternalNetworksClearArpEntriesSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_clearArpEntries_MaximumSet_Gen.json - */ - /** - * Sample code: InternalNetworks_clearArpEntries_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void internalNetworksClearArpEntriesMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .internalNetworks() - .clearArpEntries( - "resourceGroupName", - "example-l3domain", - "example-internalnetwork", - new EnableDisableOnResources() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksClearIpv6NeighborsSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksClearIpv6NeighborsSamples.java deleted file mode 100644 index ba0e1159ac975..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksClearIpv6NeighborsSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import java.util.Arrays; - -/** Samples for InternalNetworks ClearIpv6Neighbors. */ -public final class InternalNetworksClearIpv6NeighborsSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_clearIpv6Neighbors_MaximumSet_Gen.json - */ - /** - * Sample code: InternalNetworks_clearIpv6Neighbors_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void internalNetworksClearIpv6NeighborsMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .internalNetworks() - .clearIpv6Neighbors( - "resourceGroupName", - "example-l3domain", - "example-internalnetwork", - new EnableDisableOnResources() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateSamples.java index 6b4fb9ff0e2a5..5cf407dee4795 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateSamples.java @@ -6,18 +6,22 @@ import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.Extension; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesBgpConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPropertiesStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; import java.util.Arrays; /** Samples for InternalNetworks Create. */ public final class InternalNetworksCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Create_MaximumSet_Gen.json */ /** * Sample code: InternalNetworks_Create_MaximumSet_Gen. @@ -29,41 +33,64 @@ public static void internalNetworksCreateMaximumSetGen( manager .internalNetworks() .define("example-internalnetwork") - .withExistingL3IsolationDomain("resourceGroupName", "example-l3domain") - .withVlanId(501) - .withMtu(1500) - .withConnectedIPv4Subnets(Arrays.asList(new ConnectedSubnet().withPrefix("10.0.0.0/24"))) - .withConnectedIPv6Subnets(Arrays.asList(new ConnectedSubnet().withPrefix("3FFE:FFFF:0:CD30::a0/29"))) + .withExistingL3IsolationDomain("example-rg", "example-l3domain") + .withVlanId(755) + .withBgpConfiguration( + new InternalNetworkPropertiesBgpConfiguration() + .withAnnotation("annotation") + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5)) + .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) + .withAllowAS(10) + .withAllowASOverride(AllowASOverride.ENABLE) + .withPeerAsn(61234L) + .withIpv4ListenRangePrefixes(Arrays.asList("10.1.0.0/25")) + .withIpv6ListenRangePrefixes(Arrays.asList("2fff::/66")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("10.1.0.0"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("2fff::")))) .withStaticRouteConfiguration( - new StaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration()) + new InternalNetworkPropertiesStaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) .withIpv4Routes( Arrays .asList( new StaticRouteProperties() - .withPrefix("10.1.0.0/24") + .withPrefix("jffgck") .withNextHop(Arrays.asList("10.0.0.1")))) .withIpv6Routes( Arrays .asList( new StaticRouteProperties() .withPrefix("2fff::/64") - .withNextHop(Arrays.asList("2ffe::1"))))) - .withBgpConfiguration( - new BgpConfiguration() - .withBfdConfiguration(new BfdConfiguration()) - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(1) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(6) - .withIpv4ListenRangePrefixes(Arrays.asList("10.1.0.0/25")) - .withIpv6ListenRangePrefixes(Arrays.asList("2fff::/66")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("10.1.0.0"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("2fff::")))) + .withNextHop(Arrays.asList("3ffe::1")))) + .withExtension(Extension.NO_EXTENSION)) + .withMtu(1500) + .withConnectedIPv4Subnets( + Arrays.asList(new ConnectedSubnet().withAnnotation("annotation").withPrefix("10.0.0.0/24"))) + .withConnectedIPv6Subnets( + Arrays.asList(new ConnectedSubnet().withAnnotation("annotation").withPrefix("3FFE:FFFF:0:CD30::a0/29"))) .withImportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") .withExportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportRoutePolicy( + new ImportRoutePolicy() + .withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withExportRoutePolicy( + new ExportRoutePolicy() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withIngressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withEgressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) + .withExtension(Extension.NO_EXTENSION) + .withAnnotation("annotation") .create(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksDeleteSamples.java index 2813eef69c929..594d82e625318 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for InternalNetworks Delete. */ public final class InternalNetworksDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Delete_MaximumSet_Gen.json */ /** * Sample code: InternalNetworks_Delete_MaximumSet_Gen. @@ -18,7 +18,6 @@ public static void internalNetworksDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .internalNetworks() - .delete( - "resourceGroupName", "example-l3domain", "example-internalnetwork", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-l3domain", "example-internalnetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksGetSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksGetSamples.java index 920abf2f05b05..d5783d447b765 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksGetSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksGetSamples.java @@ -7,7 +7,7 @@ /** Samples for InternalNetworks Get. */ public final class InternalNetworksGetSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Get_MaximumSet_Gen.json */ /** * Sample code: InternalNetworks_Get_MaximumSet_Gen. @@ -19,6 +19,6 @@ public static void internalNetworksGetMaximumSetGen( manager .internalNetworks() .getWithResponse( - "resourceGroupName", "example-l3domain", "example-internalnetwork", com.azure.core.util.Context.NONE); + "example-rg", "example-l3domain", "example-internalnetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListByL3IsolationDomainSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListByL3IsolationDomainSamples.java new file mode 100644 index 0000000000000..1b2613515b7cc --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListByL3IsolationDomainSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for InternalNetworks ListByL3IsolationDomain. */ +public final class InternalNetworksListByL3IsolationDomainSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen.json + */ + /** + * Sample code: InternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void internalNetworksListByL3IsolationDomainMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .internalNetworks() + .listByL3IsolationDomain("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateAdministrativeStateSamples.java index dd5a7775cd16c..90f639721796f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateAdministrativeStateSamples.java @@ -4,17 +4,17 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.util.Arrays; /** Samples for InternalNetworks UpdateAdministrativeState. */ public final class InternalNetworksUpdateAdministrativeStateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_UpdateAdministrativeState_MaximumSet_Gen.json */ /** - * Sample code: InternalNetworks_updateAdministrativeState_MaximumSet_Gen. + * Sample code: InternalNetworks_UpdateAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ @@ -23,15 +23,10 @@ public static void internalNetworksUpdateAdministrativeStateMaximumSetGen( manager .internalNetworks() .updateAdministrativeState( - "resourceGroupName", + "example-rg", "example-l3domain", "example-internalnetwork", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork")) - .withState(AdministrativeState.ENABLE), + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBfdForBgpAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBfdForBgpAdministrativeStateSamples.java deleted file mode 100644 index cab49093ab563..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBfdForBgpAdministrativeStateSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Arrays; - -/** Samples for InternalNetworks UpdateBfdForBgpAdministrativeState. */ -public final class InternalNetworksUpdateBfdForBgpAdministrativeStateSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen.json - */ - /** - * Sample code: InternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void internalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .internalNetworks() - .updateBfdForBgpAdministrativeState( - "resourceGroupName", - "example-l3domain", - "example-internalnetwork", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork")) - .withState(AdministrativeState.ENABLE), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBfdForStaticRouteAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBfdForStaticRouteAdministrativeStateSamples.java deleted file mode 100644 index 644a12f8bb907..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBfdForStaticRouteAdministrativeStateSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Arrays; - -/** Samples for InternalNetworks UpdateBfdForStaticRouteAdministrativeState. */ -public final class InternalNetworksUpdateBfdForStaticRouteAdministrativeStateSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBfdForStaticRouteAdministrativeState_MaximumSet_Gen.json - */ - /** - * Sample code: InternalNetworks_updateBfdForStaticRouteAdministrativeState_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void internalNetworksUpdateBfdForStaticRouteAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .internalNetworks() - .updateBfdForStaticRouteAdministrativeState( - "resourceGroupName", - "example-l3domain", - "example-internalnetwork", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork")) - .withState(AdministrativeState.ENABLE), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBgpAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBgpAdministrativeStateSamples.java index 11e734334eb3c..04d40a1e827f4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBgpAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateBgpAdministrativeStateSamples.java @@ -4,17 +4,17 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.util.Arrays; /** Samples for InternalNetworks UpdateBgpAdministrativeState. */ public final class InternalNetworksUpdateBgpAdministrativeStateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_UpdateBgpAdministrativeState_MaximumSet_Gen.json */ /** - * Sample code: InternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen. + * Sample code: InternalNetworks_UpdateBgpAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ @@ -23,15 +23,10 @@ public static void internalNetworksUpdateBgpAdministrativeStateMaximumSetGen( manager .internalNetworks() .updateBgpAdministrativeState( - "resourceGroupName", + "example-rg", "example-l3domain", - "example-internalnetwork", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork")) - .withState(AdministrativeState.ENABLE), + "example-internalNetwork", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateSamples.java index d974bc1c4eec2..77fcaaed13208 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateSamples.java @@ -9,7 +9,10 @@ import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; +import com.azure.resourcemanager.managednetworkfabric.models.IsMonitoringEnabled; import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; @@ -18,7 +21,7 @@ /** Samples for InternalNetworks Update. */ public final class InternalNetworksUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Update_MaximumSet_Gen.json */ /** * Sample code: InternalNetworks_Update_MaximumSet_Gen. @@ -31,46 +34,64 @@ public static void internalNetworksUpdateMaximumSetGen( manager .internalNetworks() .getWithResponse( - "resourceGroupName", - "example-l3domain", - "example-internalnetwork", - com.azure.core.util.Context.NONE) + "example-rg", "example-l3domain", "example-internalnetwork", com.azure.core.util.Context.NONE) .getValue(); resource .update() - .withMtu(1500) - .withConnectedIPv4Subnets(Arrays.asList(new ConnectedSubnet().withPrefix("10.0.0.0/24"))) - .withConnectedIPv6Subnets(Arrays.asList(new ConnectedSubnet().withPrefix("3FFE:FFFF:0:CD30::a0/29"))) + .withBgpConfiguration( + new BgpConfiguration() + .withAnnotation("annotation") + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5)) + .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) + .withAllowAS(10) + .withAllowASOverride(AllowASOverride.ENABLE) + .withPeerAsn(61234L) + .withIpv4ListenRangePrefixes(Arrays.asList("10.1.0.0/25")) + .withIpv6ListenRangePrefixes(Arrays.asList("2fff::/66")) + .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("10.1.0.0"))) + .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("2fff::")))) .withStaticRouteConfiguration( new StaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration()) + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(15)) .withIpv4Routes( Arrays .asList( new StaticRouteProperties() - .withPrefix("10.1.0.0/24") + .withPrefix("20.20.20.20/25") .withNextHop(Arrays.asList("10.0.0.1")))) .withIpv6Routes( Arrays .asList( new StaticRouteProperties() .withPrefix("2fff::/64") - .withNextHop(Arrays.asList("2ffe::1"))))) - .withBgpConfiguration( - new BgpConfiguration() - .withBfdConfiguration(new BfdConfiguration()) - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(1) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(6) - .withIpv4ListenRangePrefixes(Arrays.asList("10.1.0.0/25")) - .withIpv6ListenRangePrefixes(Arrays.asList("2fff::/66")) - .withIpv4NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("10.1.0.0"))) - .withIpv6NeighborAddress(Arrays.asList(new NeighborAddress().withAddress("2fff::")))) + .withNextHop(Arrays.asList("3ffe::1"))))) + .withMtu(1500) + .withConnectedIPv4Subnets( + Arrays.asList(new ConnectedSubnet().withAnnotation("annotation").withPrefix("10.0.0.0/24"))) + .withConnectedIPv6Subnets( + Arrays.asList(new ConnectedSubnet().withAnnotation("annotation").withPrefix("3FFE:FFFF:0:CD30::a0/29"))) .withImportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") .withExportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportRoutePolicy( + new ImportRoutePolicy() + .withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withImportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withExportRoutePolicy( + new ExportRoutePolicy() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + .withIngressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withEgressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withIsMonitoringEnabled(IsMonitoringEnabled.TRUE) + .withAnnotation("annotation") .apply(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java new file mode 100644 index 0000000000000..eb6428ba90b0a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for InternalNetworks UpdateStaticRouteBfdAdministrativeState. */ +public final class InternalNetworksUpdateStaticRouteBfdAdministrativeStateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen.json + */ + /** + * Sample code: InternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void internalNetworksUpdateStaticRouteBfdAdministrativeStateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .internalNetworks() + .updateStaticRouteBfdAdministrativeState( + "example-rg", + "example-l3domain", + "example-internalNetwork", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesCreateSamples.java new file mode 100644 index 0000000000000..b6016d6990b88 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesCreateSamples.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.Action; +import com.azure.resourcemanager.managednetworkfabric.models.RuleProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for InternetGatewayRules Create. */ +public final class InternetGatewayRulesCreateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Create_MaximumSet_Gen.json + */ + /** + * Sample code: InternetGatewayRules_Create_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void internetGatewayRulesCreateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .internetGatewayRules() + .define("example-internetGatewayRule") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withRuleProperties( + new RuleProperties().withAction(Action.ALLOW).withAddressList(Arrays.asList("10.10.10.10"))) + .withTags(mapOf("keyID", "keyValue")) + .withAnnotation("annotationValue") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRestoreConfigSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesDeleteSamples.java similarity index 50% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRestoreConfigSamples.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesDeleteSamples.java index 2cc636657a2fd..84a79d9548ed5 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRestoreConfigSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesDeleteSamples.java @@ -4,20 +4,20 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -/** Samples for NetworkDevices RestoreConfig. */ -public final class NetworkDevicesRestoreConfigSamples { +/** Samples for InternetGatewayRules Delete. */ +public final class InternetGatewayRulesDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_restoreConfig_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Delete_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_restoreConfig_MaximumSet_Gen. + * Sample code: InternetGatewayRules_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesRestoreConfigMaximumSetGen( + public static void internetGatewayRulesDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager - .networkDevices() - .restoreConfig("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); + .internetGatewayRules() + .delete("example-rg", "example-internetGatewayRule", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..eda69e04a6283 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesGetByResourceGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for InternetGatewayRules GetByResourceGroup. */ +public final class InternetGatewayRulesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Get_MaximumSet_Gen.json + */ + /** + * Sample code: InternetGatewayRules_Get_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void internetGatewayRulesGetMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .internetGatewayRules() + .getByResourceGroupWithResponse( + "example-rg", "example-internetGatewayRule", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListByResourceGroupSamples.java new file mode 100644 index 0000000000000..e5404b2b2aa91 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for InternetGatewayRules ListByResourceGroup. */ +public final class InternetGatewayRulesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: InternetGatewayRules_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void internetGatewayRulesListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .internetGatewayRules() + .listByResourceGroup("example-internetGatewayRule", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListSamples.java new file mode 100644 index 0000000000000..701a1d2fbd7c6 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for InternetGatewayRules List. */ +public final class InternetGatewayRulesListSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: InternetGatewayRules_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void internetGatewayRulesListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.internetGatewayRules().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesUpdateSamples.java new file mode 100644 index 0000000000000..c0cc782ad130d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewayRulesUpdateSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.InternetGatewayRule; +import java.util.HashMap; +import java.util.Map; + +/** Samples for InternetGatewayRules Update. */ +public final class InternetGatewayRulesUpdateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Update_MaximumSet_Gen.json + */ + /** + * Sample code: InternetGatewayRules_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void internetGatewayRulesUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + InternetGatewayRule resource = + manager + .internetGatewayRules() + .getByResourceGroupWithResponse( + "example-rg", "example-internetGatewayRule", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key3311", "1234")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysCreateSamples.java new file mode 100644 index 0000000000000..19faa17dd47ea --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysCreateSamples.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.GatewayType; +import java.util.HashMap; +import java.util.Map; + +/** Samples for InternetGateways Create. */ +public final class InternetGatewaysCreateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_Create_MaximumSet_Gen.json + */ + /** + * Sample code: InternetGateways_Create_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void internetGatewaysCreateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .internetGateways() + .define("example-internetGateway") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withTypePropertiesType(GatewayType.INFRASTRUCTURE) + .withNetworkFabricControllerId( + "/subscriptions/xxxx-xxxx-xxxx-xxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-networkFabricController") + .withTags(mapOf("key3540", "1234")) + .withInternetGatewayRuleId( + "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule") + .withAnnotation("annotation") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysDeleteSamples.java new file mode 100644 index 0000000000000..b3471b175f22e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysDeleteSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for InternetGateways Delete. */ +public final class InternetGatewaysDeleteSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: InternetGateways_Delete_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void internetGatewaysDeleteMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.internetGateways().delete("example-rg", "example-internetGateway", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..79d1afa1b7d2d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for InternetGateways GetByResourceGroup. */ +public final class InternetGatewaysGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_Get_MaximumSet_Gen.json + */ + /** + * Sample code: InternetGateways_Get_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void internetGatewaysGetMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .internetGateways() + .getByResourceGroupWithResponse("example-rg", "example-internetGateway", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListByResourceGroupSamples.java new file mode 100644 index 0000000000000..072646c49fe53 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListByResourceGroupSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for InternetGateways ListByResourceGroup. */ +public final class InternetGatewaysListByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: InternetGateways_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void internetGatewaysListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.internetGateways().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListSamples.java similarity index 52% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListSamples.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListSamples.java index 9652bf1e6192c..7d1c9b4621d38 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysListSamples.java @@ -4,18 +4,18 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -/** Samples for InternalNetworks List. */ -public final class InternalNetworksListSamples { +/** Samples for InternetGateways List. */ +public final class InternetGatewaysListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_List_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: InternalNetworks_List_MaximumSet_Gen. + * Sample code: InternetGateways_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void internalNetworksListMaximumSetGen( + public static void internetGatewaysListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.internalNetworks().list("resourceGroupName", "example-l3domain", com.azure.core.util.Context.NONE); + manager.internetGateways().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysUpdateSamples.java new file mode 100644 index 0000000000000..bcef6805661f7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/InternetGatewaysUpdateSamples.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.InternetGateway; +import java.util.HashMap; +import java.util.Map; + +/** Samples for InternetGateways Update. */ +public final class InternetGatewaysUpdateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_Update_MaximumSet_Gen.json + */ + /** + * Sample code: InternetGateways_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void internetGatewaysUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + InternetGateway resource = + manager + .internetGateways() + .getByResourceGroupWithResponse( + "example-rg", "example-internetGateway", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key81", "2345")) + .withInternetGatewayRuleId( + "/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule") + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateSamples.java index 3758855419218..0885cecc0b621 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; import java.util.Arrays; import java.util.HashMap; @@ -13,7 +14,7 @@ /** Samples for IpCommunities Create. */ public final class IpCommunitiesCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Create_MaximumSet_Gen.json */ /** * Sample code: IpCommunities_Create_MaximumSet_Gen. @@ -24,20 +25,19 @@ public static void ipCommunitiesCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .ipCommunities() - .define("example-ipCommunity") - .withRegion("EastUS") - .withExistingResourceGroup("rgIpCommunityLists") - .withTags(mapOf("key2814", "")) - .withAction(CommunityActionTypes.PERMIT) - .withWellKnownCommunities( + .define("example-ipcommunity") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withTags(mapOf("keyId", "KeyValue")) + .withIpCommunityRules( Arrays .asList( - WellKnownCommunities.INTERNET, - WellKnownCommunities.LOCAL_AS, - WellKnownCommunities.NO_EXPORT, - WellKnownCommunities.GSHUT)) - .withCommunityMembers(Arrays.asList("1234:5678")) - .withAnnotation("annotationValue") + new IpCommunityRule() + .withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) + .withCommunityMembers(Arrays.asList("1:1")))) + .withAnnotation("annotation") .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesDeleteSamples.java index 6a4996760872d..846c64356ed2e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for IpCommunities Delete. */ public final class IpCommunitiesDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Delete_MaximumSet_Gen.json */ /** * Sample code: IpCommunities_Delete_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class IpCommunitiesDeleteSamples { */ public static void ipCommunitiesDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.ipCommunities().delete("resourceGroupName", "IpCommunityList1", com.azure.core.util.Context.NONE); + manager.ipCommunities().delete("example-rg", "example-ipcommunity", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesGetByResourceGroupSamples.java index 8695d0544454c..1a7edcbd0126a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for IpCommunities GetByResourceGroup. */ public final class IpCommunitiesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Get_MaximumSet_Gen.json */ /** * Sample code: IpCommunities_Get_MaximumSet_Gen. @@ -18,7 +18,6 @@ public static void ipCommunitiesGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .ipCommunities() - .getByResourceGroupWithResponse( - "resourceGroupName", "example-ipCommunity", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("example-rg", "example-ipcommunity", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListByResourceGroupSamples.java index 26815eebf638c..c1345342a1884 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for IpCommunities ListByResourceGroup. */ public final class IpCommunitiesListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: IpCommunities_ListByResourceGroup_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class IpCommunitiesListByResourceGroupSamples { */ public static void ipCommunitiesListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.ipCommunities().listByResourceGroup("resourceGroupName", com.azure.core.util.Context.NONE); + manager.ipCommunities().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListSamples.java index ccc955e65d746..adcd51fd53619 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListSamples.java @@ -7,7 +7,7 @@ /** Samples for IpCommunities List. */ public final class IpCommunitiesListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: IpCommunities_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesUpdateSamples.java index 8121f52f4c2f4..1da3705be6297 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesUpdateSamples.java @@ -4,14 +4,16 @@ package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunity; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityRule; +import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; +import java.util.Arrays; /** Samples for IpCommunities Update. */ public final class IpCommunitiesUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Update_MaximumSet_Gen.json */ /** * Sample code: IpCommunities_Update_MaximumSet_Gen. @@ -23,20 +25,18 @@ public static void ipCommunitiesUpdateMaximumSetGen( IpCommunity resource = manager .ipCommunities() - .getByResourceGroupWithResponse( - "resourceGroupName", "example-ipCommunity", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("example-rg", "example-ipcommunity", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key2814", "")).apply(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + resource + .update() + .withIpCommunityRules( + Arrays + .asList( + new IpCommunityRule() + .withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.INTERNET)) + .withCommunityMembers(Arrays.asList("1:1")))) + .apply(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateSamples.java index 71eeb979491b2..204c1022e30a0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -12,7 +13,7 @@ /** Samples for IpExtendedCommunities Create. */ public final class IpExtendedCommunitiesCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Create_MaximumSet_Gen.json */ /** * Sample code: IpExtendedCommunities_Create_MaximumSet_Gen. @@ -23,13 +24,18 @@ public static void ipExtendedCommunitiesCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .ipExtendedCommunities() - .define("example_ipExtendedCommunity") - .withRegion("EastUs") - .withExistingResourceGroup("rgIpExtendedCommunityLists") - .withTags(mapOf("key5054", "key")) - .withAction(CommunityActionTypes.PERMIT) - .withRouteTargets(Arrays.asList("1234:5678")) - .withAnnotation("annotationValue") + .define("example-ipExtendedCommunity") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withIpExtendedCommunityRules( + Arrays + .asList( + new IpExtendedCommunityRule() + .withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withRouteTargets(Arrays.asList("1234:2345")))) + .withTags(mapOf("keyID", "KeyValue")) + .withAnnotation("annotation") .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesDeleteSamples.java index 0da91681aab01..3ddb2af19a097 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for IpExtendedCommunities Delete. */ public final class IpExtendedCommunitiesDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Delete_MaximumSet_Gen.json */ /** * Sample code: IpExtendedCommunities_Delete_MaximumSet_Gen. @@ -18,6 +18,6 @@ public static void ipExtendedCommunitiesDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .ipExtendedCommunities() - .delete("rgIpExtendedCommunityLists", "example_ipExtendedCommunity", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-ipExtendedCommunity", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesGetByResourceGroupSamples.java index 8f1ce7f637c64..8dd7bd86cbebd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for IpExtendedCommunities GetByResourceGroup. */ public final class IpExtendedCommunitiesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Get_MaximumSet_Gen.json */ /** * Sample code: IpExtendedCommunities_Get_MaximumSet_Gen. @@ -19,6 +19,6 @@ public static void ipExtendedCommunitiesGetMaximumSetGen( manager .ipExtendedCommunities() .getByResourceGroupWithResponse( - "rgIpExtendedCommunityLists", "example_ipExtendedCommunity", com.azure.core.util.Context.NONE); + "example-rg", "example-ipExtendedCommunity", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListByResourceGroupSamples.java index 047d8167db6fb..adb0ee92cb5ca 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for IpExtendedCommunities ListByResourceGroup. */ public final class IpExtendedCommunitiesListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen. @@ -16,8 +16,6 @@ public final class IpExtendedCommunitiesListByResourceGroupSamples { */ public static void ipExtendedCommunitiesListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .ipExtendedCommunities() - .listByResourceGroup("rgIpExtendedCommunityLists", com.azure.core.util.Context.NONE); + manager.ipExtendedCommunities().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListSamples.java index ab8fb22d9303d..9bac6e7ed188f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListSamples.java @@ -7,7 +7,7 @@ /** Samples for IpExtendedCommunities List. */ public final class IpExtendedCommunitiesListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: IpExtendedCommunities_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesUpdateSamples.java index 07645d8467ecb..2f5c2c66c5730 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesUpdateSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunity; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityRule; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for IpExtendedCommunities Update. */ public final class IpExtendedCommunitiesUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Update_MaximumSet_Gen.json */ /** * Sample code: IpExtendedCommunities_Update_MaximumSet_Gen. @@ -24,9 +27,19 @@ public static void ipExtendedCommunitiesUpdateMaximumSetGen( manager .ipExtendedCommunities() .getByResourceGroupWithResponse( - "rgIpExtendedCommunityLists", "example_ipExtendedCommunity", com.azure.core.util.Context.NONE) + "example-rg", "example-ipExtendedCommunity", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key5054", "key1")).apply(); + resource + .update() + .withTags(mapOf("keyID", "KeyValue")) + .withIpExtendedCommunityRules( + Arrays + .asList( + new IpExtendedCommunityRule() + .withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withRouteTargets(Arrays.asList("1234:2345")))) + .apply(); } @SuppressWarnings("unchecked") diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesCreateSamples.java index 8c7ea4a0cc6b1..cf7e8cbc490cc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesCreateSamples.java @@ -6,7 +6,7 @@ import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; import com.azure.resourcemanager.managednetworkfabric.models.Condition; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPropertiesIpPrefixRulesItem; +import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -14,7 +14,7 @@ /** Samples for IpPrefixes Create. */ public final class IpPrefixesCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Create_MaximumSet_Gen.json */ /** * Sample code: IpPrefixes_Create_MaximumSet_Gen. @@ -26,19 +26,19 @@ public static void ipPrefixesCreateMaximumSetGen( manager .ipPrefixes() .define("example-ipPrefix") - .withRegion("EastUS") - .withExistingResourceGroup("resourcegroupname") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withTags(mapOf("keyID", "KeyValue")) .withIpPrefixRules( Arrays .asList( - new IpPrefixPropertiesIpPrefixRulesItem() + new IpPrefixRule() .withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(12L) - .withNetworkPrefix("1.1.1.0/24") - .withCondition(Condition.EQUAL_TO) - .withSubnetMaskLength(28))) - .withTags(mapOf("key6404", "")) - .withAnnotation("annotationValue") + .withSequenceNumber(4155123341L) + .withNetworkPrefix("10.10.10.10/30") + .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) + .withSubnetMaskLength("10"))) + .withAnnotation("annotation") .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesDeleteSamples.java index 7d340d626e6dd..497ca000360bd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for IpPrefixes Delete. */ public final class IpPrefixesDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Delete_MaximumSet_Gen.json */ /** * Sample code: IpPrefixes_Delete_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class IpPrefixesDeleteSamples { */ public static void ipPrefixesDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.ipPrefixes().delete("rgIpPrefixLists", "example-ipPrefix", com.azure.core.util.Context.NONE); + manager.ipPrefixes().delete("example-rg", "example-ipPrefix", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesGetByResourceGroupSamples.java index 0d38a5da56cb7..2ded7ba81ad48 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for IpPrefixes GetByResourceGroup. */ public final class IpPrefixesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Get_MaximumSet_Gen.json */ /** * Sample code: IpPrefixes_Get_MaximumSet_Gen. @@ -18,6 +18,6 @@ public static void ipPrefixesGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .ipPrefixes() - .getByResourceGroupWithResponse("resourcegroupname", "example-ipPrefix", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("example-rg", "example-ipPrefix", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListByResourceGroupSamples.java index a25da1861d822..6a415b2f480bd 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for IpPrefixes ListByResourceGroup. */ public final class IpPrefixesListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: IpPrefixes_ListByResourceGroup_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class IpPrefixesListByResourceGroupSamples { */ public static void ipPrefixesListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.ipPrefixes().listByResourceGroup("resourcegroupname", com.azure.core.util.Context.NONE); + manager.ipPrefixes().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListSamples.java index f59779526e11b..ccb0d5c3ff524 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListSamples.java @@ -7,7 +7,7 @@ /** Samples for IpPrefixes List. */ public final class IpPrefixesListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: IpPrefixes_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesUpdateSamples.java index 46f8727c9325a..9a29042e3c8c3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesUpdateSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.Condition; import com.azure.resourcemanager.managednetworkfabric.models.IpPrefix; +import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixRule; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for IpPrefixes Update. */ public final class IpPrefixesUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Update_MaximumSet_Gen.json */ /** * Sample code: IpPrefixes_Update_MaximumSet_Gen. @@ -23,10 +27,22 @@ public static void ipPrefixesUpdateMaximumSetGen( IpPrefix resource = manager .ipPrefixes() - .getByResourceGroupWithResponse( - "resourcegroupname", "example-ipPrefix", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("example-rg", "example-ipPrefix", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key3127", "key")).apply(); + resource + .update() + .withTags(mapOf("keyID", "KeyValue")) + .withIpPrefixRules( + Arrays + .asList( + new IpPrefixRule() + .withAction(CommunityActionTypes.PERMIT) + .withSequenceNumber(4155123341L) + .withNetworkPrefix("10.10.10.10/30") + .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) + .withSubnetMaskLength("10"))) + .withAnnotation("annotation") + .apply(); } @SuppressWarnings("unchecked") diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsClearArpTableSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsClearArpTableSamples.java deleted file mode 100644 index a7006e9ac21a3..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsClearArpTableSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import java.util.Arrays; - -/** Samples for L2IsolationDomains ClearArpTable. */ -public final class L2IsolationDomainsClearArpTableSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_clearArpTable_MaximumSet_Gen.json - */ - /** - * Sample code: L2IsolationDomains_clearArpTable_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void l2IsolationDomainsClearArpTableMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .l2IsolationDomains() - .clearArpTable( - "resourceGroupName", - "example-l2domain", - new EnableDisableOnResources() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsClearNeighborTableSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsClearNeighborTableSamples.java deleted file mode 100644 index 68ea854e362c0..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsClearNeighborTableSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import java.util.Arrays; - -/** Samples for L2IsolationDomains ClearNeighborTable. */ -public final class L2IsolationDomainsClearNeighborTableSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_clearNeighborTable_MaximumSet_Gen.json - */ - /** - * Sample code: L2IsolationDomains_clearNeighborTable_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void l2IsolationDomainsClearNeighborTableMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .l2IsolationDomains() - .clearNeighborTable( - "rgL2IsolationDomains", - "oz", - new EnableDisableOnResources() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetArpEntriesSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCommitConfigurationSamples.java similarity index 51% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetArpEntriesSamples.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCommitConfigurationSamples.java index c4d9cac21506d..482a7962a8220 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetArpEntriesSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCommitConfigurationSamples.java @@ -4,20 +4,20 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -/** Samples for L2IsolationDomains GetArpEntries. */ -public final class L2IsolationDomainsGetArpEntriesSamples { +/** Samples for L2IsolationDomains CommitConfiguration. */ +public final class L2IsolationDomainsCommitConfigurationSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_getArpEntries_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_CommitConfiguration_MaximumSet_Gen.json */ /** - * Sample code: L2IsolationDomains_getArpEntries_MaximumSet_Gen. + * Sample code: L2IsolationDomains_CommitConfiguration_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void l2IsolationDomainsGetArpEntriesMaximumSetGen( + public static void l2IsolationDomainsCommitConfigurationMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .l2IsolationDomains() - .getArpEntries("resourceGroupName", "l2IsolationDomainName", com.azure.core.util.Context.NONE); + .commitConfiguration("example-rg", "example-l2domain", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCreateSamples.java index 378f465c85d64..eb76a069b56a9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCreateSamples.java @@ -4,10 +4,13 @@ package com.azure.resourcemanager.managednetworkfabric.generated; +import java.util.HashMap; +import java.util.Map; + /** Samples for L2IsolationDomains Create. */ public final class L2IsolationDomainsCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Create_MaximumSet_Gen.json */ /** * Sample code: L2IsolationDomains_Create_MaximumSet_Gen. @@ -20,11 +23,24 @@ public static void l2IsolationDomainsCreateMaximumSetGen( .l2IsolationDomains() .define("example-l2domain") .withRegion("eastus") - .withExistingResourceGroup("resourceGroupName") + .withExistingResourceGroup("example-rg") .withNetworkFabricId( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/networkFabrics/FabricName") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") .withVlanId(501) + .withTags(mapOf("keyID", "keyValue")) .withMtu(1500) + .withAnnotation("annotation") .create(); } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsDeleteSamples.java index 47b598f3d266c..d8f5be710b9ca 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for L2IsolationDomains Delete. */ public final class L2IsolationDomainsDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Delete_MaximumSet_Gen.json */ /** * Sample code: L2IsolationDomains_Delete_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class L2IsolationDomainsDeleteSamples { */ public static void l2IsolationDomainsDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.l2IsolationDomains().delete("resourceGroupName", "example-l2domain", com.azure.core.util.Context.NONE); + manager.l2IsolationDomains().delete("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetByResourceGroupSamples.java index 9851b0e305c68..cb473305a436c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for L2IsolationDomains GetByResourceGroup. */ public final class L2IsolationDomainsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Get_MaximumSet_Gen.json */ /** * Sample code: L2IsolationDomains_Get_MaximumSet_Gen. @@ -18,7 +18,6 @@ public static void l2IsolationDomainsGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .l2IsolationDomains() - .getByResourceGroupWithResponse( - "resourceGroupName", "l2IsolationDomainName", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListByResourceGroupSamples.java index d6795ecdc05f4..f33c6dc6100ed 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for L2IsolationDomains ListByResourceGroup. */ public final class L2IsolationDomainsListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class L2IsolationDomainsListByResourceGroupSamples { */ public static void l2IsolationDomainsListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.l2IsolationDomains().listByResourceGroup("resourceGroupName", com.azure.core.util.Context.NONE); + manager.l2IsolationDomains().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListSamples.java index 7f1ed3a6f9800..fe6abf5e7312e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListSamples.java @@ -7,7 +7,7 @@ /** Samples for L2IsolationDomains List. */ public final class L2IsolationDomainsListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: L2IsolationDomains_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsUpdateAdministrativeStateSamples.java index f17fbe9e327b5..9e6e46823a823 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsUpdateAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsUpdateAdministrativeStateSamples.java @@ -4,14 +4,14 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.util.Arrays; /** Samples for L2IsolationDomains UpdateAdministrativeState. */ public final class L2IsolationDomainsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json */ /** * Sample code: L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen. @@ -23,14 +23,9 @@ public static void l2IsolationDomainsUpdateAdministrativeStateMaximumSetGen( manager .l2IsolationDomains() .updateAdministrativeState( - "resourceGroupName", - "l2IsolationDomainName", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain")) - .withState(AdministrativeState.ENABLE), + "example-rg", + "example-l2Domain", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsUpdateSamples.java index ac6d785f8f36d..97e1251a68bdf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsUpdateSamples.java @@ -5,11 +5,13 @@ package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; +import java.util.HashMap; +import java.util.Map; /** Samples for L2IsolationDomains Update. */ public final class L2IsolationDomainsUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Update_MaximumSet_Gen.json */ /** * Sample code: L2IsolationDomains_Update_MaximumSet_Gen. @@ -21,9 +23,19 @@ public static void l2IsolationDomainsUpdateMaximumSetGen( L2IsolationDomain resource = manager .l2IsolationDomains() - .getByResourceGroupWithResponse( - "resourceGroupName", "l2IsolationDomainName", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("example-rg", "example-l2Domain", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withMtu(9000).apply(); + resource.update().withTags(mapOf("keyID", "keyValue")).withMtu(6000).withAnnotation("annotation1").apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsValidateConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsValidateConfigurationSamples.java new file mode 100644 index 0000000000000..1cdb03c9e6f46 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsValidateConfigurationSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for L2IsolationDomains ValidateConfiguration. */ +public final class L2IsolationDomainsValidateConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_ValidateConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: L2IsolationDomains_ValidateConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l2IsolationDomainsValidateConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .l2IsolationDomains() + .validateConfiguration("example-rg", "example-l2domain", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsClearArpTableSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsClearArpTableSamples.java deleted file mode 100644 index 5b890fe675eb3..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsClearArpTableSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import java.util.Arrays; - -/** Samples for L3IsolationDomains ClearArpTable. */ -public final class L3IsolationDomainsClearArpTableSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_clearArpTable_MaximumSet_Gen.json - */ - /** - * Sample code: L3IsolationDomains_clearArpTable_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void l3IsolationDomainsClearArpTableMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .l3IsolationDomains() - .clearArpTable( - "resourceGroupName", - "l3IsolationDomainName", - new EnableDisableOnResources() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsClearNeighborTableSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsClearNeighborTableSamples.java deleted file mode 100644 index 05c39649df123..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsClearNeighborTableSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import java.util.Arrays; - -/** Samples for L3IsolationDomains ClearNeighborTable. */ -public final class L3IsolationDomainsClearNeighborTableSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_clearNeighborTable_MaximumSet_Gen.json - */ - /** - * Sample code: L3IsolationDomains_clearNeighborTable_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void l3IsolationDomainsClearNeighborTableMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .l3IsolationDomains() - .clearNeighborTable( - "resourceGroupName", - "example-l3domain", - new EnableDisableOnResources().withResourceIds(Arrays.asList("wnaxqikneofcni")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCommitConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCommitConfigurationSamples.java new file mode 100644 index 0000000000000..e5444796c821a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCommitConfigurationSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for L3IsolationDomains CommitConfiguration. */ +public final class L3IsolationDomainsCommitConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_CommitConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: L3IsolationDomains_CommitConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l3IsolationDomainsCommitConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .l3IsolationDomains() + .commitConfiguration("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCreateSamples.java index 965a69def745e..0caf24d8a3232 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCreateSamples.java @@ -6,15 +6,18 @@ import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** Samples for L3IsolationDomains Create. */ public final class L3IsolationDomainsCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Create_MaximumSet_Gen.json */ /** * Sample code: L3IsolationDomains_Create_MaximumSet_Gen. @@ -27,20 +30,38 @@ public static void l3IsolationDomainsCreateMaximumSetGen( .l3IsolationDomains() .define("example-l3domain") .withRegion("eastus") - .withExistingResourceGroup("resourceGroupName") + .withExistingResourceGroup("example-rg") .withNetworkFabricId( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/networkFabrics/FabricName") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withTags(mapOf("keyID", "KeyValue")) .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) .withAggregateRouteConfiguration( new AggregateRouteConfiguration() .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("10.0.0.0/24"))) - .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("10.0.0.1")))) - .withDescription("creating L3 isolation domain") + .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("3FFE:FFFF:0:CD30::a0/29")))) .withConnectedSubnetRoutePolicy( - new L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy() + new ConnectedSubnetRoutePolicy() .withExportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2")) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withExportRoutePolicy( + new L3ExportRoutePolicy() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy"))) + .withAnnotation("annotation") .create(); } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsDeleteSamples.java index aba58d72e6983..9bfd4ffc59706 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for L3IsolationDomains Delete. */ public final class L3IsolationDomainsDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Delete_MaximumSet_Gen.json */ /** * Sample code: L3IsolationDomains_Delete_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class L3IsolationDomainsDeleteSamples { */ public static void l3IsolationDomainsDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.l3IsolationDomains().delete("resourceGroupName", "example-l3domain", com.azure.core.util.Context.NONE); + manager.l3IsolationDomains().delete("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsGetByResourceGroupSamples.java index 13468af55b546..277e98ec512a4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for L3IsolationDomains GetByResourceGroup. */ public final class L3IsolationDomainsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Get_MaximumSet_Gen.json */ /** * Sample code: L3IsolationDomains_Get_MaximumSet_Gen. @@ -18,6 +18,6 @@ public static void l3IsolationDomainsGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .l3IsolationDomains() - .getByResourceGroupWithResponse("resourceGroupName", "example-l3domain", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListByResourceGroupSamples.java index 6413f55d37d7f..0e11b2ff21254 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for L3IsolationDomains ListByResourceGroup. */ public final class L3IsolationDomainsListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class L3IsolationDomainsListByResourceGroupSamples { */ public static void l3IsolationDomainsListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.l3IsolationDomains().listByResourceGroup("resourceGroupName", com.azure.core.util.Context.NONE); + manager.l3IsolationDomains().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListSamples.java index 78841fb53a25e..4093c77878fc4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListSamples.java @@ -7,7 +7,7 @@ /** Samples for L3IsolationDomains List. */ public final class L3IsolationDomainsListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: L3IsolationDomains_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateAdministrativeStateSamples.java index 00f94c40f4cd1..01fe5881b679e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateAdministrativeStateSamples.java @@ -4,14 +4,14 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; import java.util.Arrays; /** Samples for L3IsolationDomains UpdateAdministrativeState. */ public final class L3IsolationDomainsUpdateAdministrativeStateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json */ /** * Sample code: L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen. @@ -23,14 +23,9 @@ public static void l3IsolationDomainsUpdateAdministrativeStateMaximumSetGen( manager .l3IsolationDomains() .updateAdministrativeState( - "resourceGroupName", + "example-rg", "example-l3domain", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) - .withState(AdministrativeState.ENABLE), + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateOptionBAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateOptionBAdministrativeStateSamples.java deleted file mode 100644 index 755a7a49e7c12..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateOptionBAdministrativeStateSamples.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Arrays; - -/** Samples for L3IsolationDomains UpdateOptionBAdministrativeState. */ -public final class L3IsolationDomainsUpdateOptionBAdministrativeStateSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_updateOptionBAdministrativeState_MaximumSet_Gen.json - */ - /** - * Sample code: L3IsolationDomains_updateOptionBAdministrativeState_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void l3IsolationDomainsUpdateOptionBAdministrativeStateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .l3IsolationDomains() - .updateOptionBAdministrativeState( - "resourceGroupName", - "example-l3domain", - new UpdateAdministrativeState() - .withResourceIds( - Arrays - .asList( - "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain")) - .withState(AdministrativeState.ENABLE), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateSamples.java index 093b4a35657ef..4678fdda105ed 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsUpdateSamples.java @@ -6,16 +6,19 @@ import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnetRoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.L3ExportRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** Samples for L3IsolationDomains Update. */ public final class L3IsolationDomainsUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Update_MaximumSet_Gen.json */ /** * Sample code: L3IsolationDomains_Update_MaximumSet_Gen. @@ -27,22 +30,39 @@ public static void l3IsolationDomainsUpdateMaximumSetGen( L3IsolationDomain resource = manager .l3IsolationDomains() - .getByResourceGroupWithResponse( - "resourceGroupName", "example-l3domain", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("example-rg", "example-l3domain", com.azure.core.util.Context.NONE) .getValue(); resource .update() + .withTags(mapOf("key4953", "1234")) .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) .withAggregateRouteConfiguration( new AggregateRouteConfiguration() .withIpv4Routes(Arrays.asList(new AggregateRoute().withPrefix("10.0.0.0/24"))) .withIpv6Routes(Arrays.asList(new AggregateRoute().withPrefix("3FFE:FFFF:0:CD30::a0/29")))) - .withDescription("creating L3 isolation domain") .withConnectedSubnetRoutePolicy( - new L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy() + new ConnectedSubnetRoutePolicy() .withExportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName")) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName") + .withExportRoutePolicy( + new L3ExportRoutePolicy() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1"))) + .withAnnotation("annotation1") .apply(); } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsValidateConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsValidateConfigurationSamples.java new file mode 100644 index 0000000000000..2e0197a8c7d86 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsValidateConfigurationSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for L3IsolationDomains ValidateConfiguration. */ +public final class L3IsolationDomainsValidateConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_ValidateConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: L3IsolationDomains_ValidateConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void l3IsolationDomainsValidateConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .l3IsolationDomains() + .validateConfiguration("example-rg", "example-l3domain", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsCreateSamples.java new file mode 100644 index 0000000000000..c7609918751f8 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsCreateSamples.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for NeighborGroups Create. */ +public final class NeighborGroupsCreateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Create_MaximumSet_Gen.json + */ + /** + * Sample code: NeighborGroups_Create_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void neighborGroupsCreateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .neighborGroups() + .define("example-neighborGroup") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withTags(mapOf("key8107", "1234")) + .withDestination( + new NeighborGroupDestination() + .withIpv4Addresses( + Arrays + .asList( + "10.10.10.10", + "20.10.10.10", + "30.10.10.10", + "40.10.10.10", + "50.10.10.10", + "60.10.10.10", + "70.10.10.10", + "80.10.10.10", + "90.10.10.10")) + .withIpv6Addresses(Arrays.asList("2F::/100"))) + .withAnnotation("annotation") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsDeleteSamples.java similarity index 52% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListSamples.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsDeleteSamples.java index 91ce6c4d5fdae..cb82dec2e6a60 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsDeleteSamples.java @@ -4,18 +4,18 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -/** Samples for ExternalNetworks List. */ -public final class ExternalNetworksListSamples { +/** Samples for NeighborGroups Delete. */ +public final class NeighborGroupsDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_List_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Delete_MaximumSet_Gen.json */ /** - * Sample code: ExternalNetworks_List_MaximumSet_Gen. + * Sample code: NeighborGroups_Delete_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void externalNetworksListMaximumSetGen( + public static void neighborGroupsDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.externalNetworks().list("resourceGroupName", "example-l3domain", com.azure.core.util.Context.NONE); + manager.neighborGroups().delete("example-rg", "example-neighborGroup", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..bac78aaa3eb8e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NeighborGroups GetByResourceGroup. */ +public final class NeighborGroupsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Get_MaximumSet_Gen.json + */ + /** + * Sample code: NeighborGroups_Get_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void neighborGroupsGetMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .neighborGroups() + .getByResourceGroupWithResponse("example-rg", "example-neighborGroup", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListByResourceGroupSamples.java new file mode 100644 index 0000000000000..ec4a7b3e8715a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListByResourceGroupSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NeighborGroups ListByResourceGroup. */ +public final class NeighborGroupsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: NeighborGroups_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void neighborGroupsListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.neighborGroups().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusGetSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListSamples.java similarity index 53% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusGetSamples.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListSamples.java index dac13b13d1711..2c98cf97fba4e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusGetSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsListSamples.java @@ -4,18 +4,18 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -/** Samples for NetworkRackSkus Get. */ -public final class NetworkRackSkusGetSamples { +/** Samples for NeighborGroups List. */ +public final class NeighborGroupsListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: NetworkRackSkus_Get_MaximumSet_Gen. + * Sample code: NeighborGroups_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkRackSkusGetMaximumSetGen( + public static void neighborGroupsListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkRackSkus().getWithResponse("networkRackSkuName", com.azure.core.util.Context.NONE); + manager.neighborGroups().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsUpdateSamples.java new file mode 100644 index 0000000000000..0aef865a2e8f4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborGroupsUpdateSamples.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroup; +import com.azure.resourcemanager.managednetworkfabric.models.NeighborGroupDestination; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for NeighborGroups Update. */ +public final class NeighborGroupsUpdateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Update_MaximumSet_Gen.json + */ + /** + * Sample code: NeighborGroups_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void neighborGroupsUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NeighborGroup resource = + manager + .neighborGroups() + .getByResourceGroupWithResponse("example-rg", "example-neighborGroup", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key8107", "2345")) + .withDestination( + new NeighborGroupDestination() + .withIpv4Addresses( + Arrays + .asList( + "10.10.10.10", + "20.10.10.10", + "30.10.10.10", + "40.10.10.10", + "50.10.10.10", + "60.10.10.10", + "70.10.10.10", + "80.10.10.10", + "90.10.10.10")) + .withIpv6Addresses(Arrays.asList("2F::/100"))) + .withAnnotation("Updating") + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusGetSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusGetSamples.java index 14348ae8a251e..c212153590b0f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusGetSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusGetSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkDeviceSkus Get. */ public final class NetworkDeviceSkusGetSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDeviceSkus_Get_MaximumSet_Gen.json */ /** * Sample code: NetworkDeviceSkus_Get_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class NetworkDeviceSkusGetSamples { */ public static void networkDeviceSkusGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDeviceSkus().getWithResponse("DefaultSku", com.azure.core.util.Context.NONE); + manager.networkDeviceSkus().getWithResponse("example-deviceSku", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListSamples.java index a59e76939e329..1b857549e9730 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkDeviceSkus List. */ public final class NetworkDeviceSkusListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesCreateSamples.java index 2182fa03182d8..95acba2ef2f29 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesCreateSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleTypes; import java.util.HashMap; import java.util.Map; /** Samples for NetworkDevices Create. */ public final class NetworkDevicesCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Create_MaximumSet_Gen.json */ /** * Sample code: NetworkDevices_Create_MaximumSet_Gen. @@ -22,15 +21,14 @@ public static void networkDevicesCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkDevices() - .define("networkDeviceName") - .withRegion("eastus") - .withExistingResourceGroup("resourceGroupName") - .withTags(mapOf("keyID", "keyValue")) - .withNetworkDeviceSku("DefaultSku") - .withNetworkDeviceRole(NetworkDeviceRoleTypes.CE) - .withHostname("networkDeviceName") - .withSerialNumber("Arista;DCS-7280PR3-24;12.05;JPE21330382") - .withAnnotation("null") + .define("example-device") + .withRegion("eastuseuap") + .withExistingResourceGroup("example-rg") + .withTags(mapOf("keyID", "KeyValue")) + .withNetworkDeviceSku("DeviceSku") + .withHostname("NFA-Device") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .withAnnotation("annotation") .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesDeleteSamples.java index a2a752fc21722..3f6c47e39cda7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkDevices Delete. */ public final class NetworkDevicesDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Delete_MaximumSet_Gen.json */ /** * Sample code: NetworkDevices_Delete_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class NetworkDevicesDeleteSamples { */ public static void networkDevicesDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices().delete("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); + manager.networkDevices().delete("example-rg", "example-device", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGenerateSupportPackageSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGenerateSupportPackageSamples.java deleted file mode 100644 index 2c2f8c0ae8e48..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGenerateSupportPackageSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -/** Samples for NetworkDevices GenerateSupportPackage. */ -public final class NetworkDevicesGenerateSupportPackageSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_generateSupportPackage_MaximumSet_Gen.json - */ - /** - * Sample code: NetworkDevices_generateSupportPackage_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void networkDevicesGenerateSupportPackageMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkDevices() - .generateSupportPackage("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetByResourceGroupSamples.java index f43240314ad2d..99e2aebc14efb 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkDevices GetByResourceGroup. */ public final class NetworkDevicesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Get_MaximumSet_Gen.json */ /** * Sample code: NetworkDevices_Get_MaximumSet_Gen. @@ -18,6 +18,6 @@ public static void networkDevicesGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkDevices() - .getByResourceGroupWithResponse("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("example-rg", "example-device", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetDynamicInterfaceMapsSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetDynamicInterfaceMapsSamples.java deleted file mode 100644 index 335c553b7b9a9..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetDynamicInterfaceMapsSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -/** Samples for NetworkDevices GetDynamicInterfaceMaps. */ -public final class NetworkDevicesGetDynamicInterfaceMapsSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getDynamicInterfaceMaps_MaximumSet_Gen.json - */ - /** - * Sample code: NetworkDevices_getDynamicInterfaceMaps_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void networkDevicesGetDynamicInterfaceMapsMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkDevices() - .getDynamicInterfaceMaps("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetStaticInterfaceMapsSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetStaticInterfaceMapsSamples.java deleted file mode 100644 index b6a19872a4e1f..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetStaticInterfaceMapsSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -/** Samples for NetworkDevices GetStaticInterfaceMaps. */ -public final class NetworkDevicesGetStaticInterfaceMapsSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getStaticInterfaceMaps_MaximumSet_Gen.json - */ - /** - * Sample code: NetworkDevices_getStaticInterfaceMaps_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void networkDevicesGetStaticInterfaceMapsMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkDevices() - .getStaticInterfaceMaps("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListByResourceGroupSamples.java index 69c0736641116..98124dc5a9dbf 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkDevices ListByResourceGroup. */ public final class NetworkDevicesListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: NetworkDevices_ListByResourceGroup_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class NetworkDevicesListByResourceGroupSamples { */ public static void networkDevicesListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices().listByResourceGroup("resourceGroupName", com.azure.core.util.Context.NONE); + manager.networkDevices().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListSamples.java index fd4a67d3abbbb..7b30ac9c51be1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkDevices List. */ public final class NetworkDevicesListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: NetworkDevices_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRebootSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRebootSamples.java index bec837a7ade45..f264a440c0c8f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRebootSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRebootSamples.java @@ -4,18 +4,27 @@ package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.RebootProperties; +import com.azure.resourcemanager.managednetworkfabric.models.RebootType; + /** Samples for NetworkDevices Reboot. */ public final class NetworkDevicesRebootSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_reboot_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Reboot_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_reboot_MaximumSet_Gen. + * Sample code: NetworkDevices_Reboot_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ public static void networkDevicesRebootMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices().reboot("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); + manager + .networkDevices() + .reboot( + "example-rg", + "example-device", + new RebootProperties().withRebootType(RebootType.GRACEFUL_REBOOT_WITH_ZTP), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRefreshConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRefreshConfigurationSamples.java new file mode 100644 index 0000000000000..faeb81baae774 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesRefreshConfigurationSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkDevices RefreshConfiguration. */ +public final class NetworkDevicesRefreshConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_RefreshConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkDevices_RefreshConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkDevicesRefreshConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkDevices().refreshConfiguration("example-rg", "example-device", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateAdministrativeStateSamples.java new file mode 100644 index 0000000000000..18715f5e08ab2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateAdministrativeStateSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.DeviceAdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateDeviceAdministrativeState; +import java.util.Arrays; + +/** Samples for NetworkDevices UpdateAdministrativeState. */ +public final class NetworkDevicesUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_UpdateAdministrativeState_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkDevices_UpdateAdministrativeState_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkDevicesUpdateAdministrativeStateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkDevices() + .updateAdministrativeState( + "example-rg", + "example-device", + new UpdateDeviceAdministrativeState() + .withResourceIds(Arrays.asList("")) + .withState(DeviceAdministrativeState.RMA), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdatePowerCycleSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdatePowerCycleSamples.java deleted file mode 100644 index 386884d71c5a7..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdatePowerCycleSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.resourcemanager.managednetworkfabric.models.PowerEnd; -import com.azure.resourcemanager.managednetworkfabric.models.State; -import com.azure.resourcemanager.managednetworkfabric.models.UpdatePowerCycleProperties; - -/** Samples for NetworkDevices UpdatePowerCycle. */ -public final class NetworkDevicesUpdatePowerCycleSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_updatePowerCycle_MaximumSet_Gen.json - */ - /** - * Sample code: NetworkDevices_updatePowerCycle_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void networkDevicesUpdatePowerCycleMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkDevices() - .updatePowerCycle( - "resourceGroupName", - "networkDeviceName", - new UpdatePowerCycleProperties().withPowerEnd(PowerEnd.PRIMARY).withState(State.ON), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateSamples.java index 2bf001284b2ab..db010f483ce6a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for NetworkDevices Update. */ public final class NetworkDevicesUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Update_MaximumSet_Gen.json */ /** * Sample code: NetworkDevices_Update_MaximumSet_Gen. @@ -23,15 +23,14 @@ public static void networkDevicesUpdateMaximumSetGen( NetworkDevice resource = manager .networkDevices() - .getByResourceGroupWithResponse( - "resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("example-rg", "example-device", com.azure.core.util.Context.NONE) .getValue(); resource .update() - .withTags(mapOf("keyID", "keyValue")) - .withHostname("networkDeviceName") - .withSerialNumber("Arista;DCS-7280PR3-24;12.05;JPE21330382") - .withAnnotation("null") + .withTags(mapOf("keyID", "KeyValue")) + .withHostname("NFA-Device") + .withSerialNumber("Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX") + .withAnnotation("annotation") .apply(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateVersionSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpgradeSamples.java similarity index 53% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateVersionSamples.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpgradeSamples.java index c4a1eb8c21e31..b64d41354848e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpdateVersionSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesUpgradeSamples.java @@ -4,26 +4,26 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; -/** Samples for NetworkDevices UpdateVersion. */ -public final class NetworkDevicesUpdateVersionSamples { +/** Samples for NetworkDevices Upgrade. */ +public final class NetworkDevicesUpgradeSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_updateVersion_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Upgrade_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_updateVersion_MaximumSet_Gen. + * Sample code: NetworkDevices_Upgrade_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesUpdateVersionMaximumSetGen( + public static void networkDevicesUpgradeMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkDevices() - .updateVersion( - "resourceGroupName", - "networkDeviceName", - new UpdateVersionProperties().withSkuVersion("DefaultSku"), + .upgrade( + "example-rg", + "example-device", + new UpdateVersion().withVersion("1.0.0"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersCreateSamples.java index bb1eabd7cdedb..107e5d3374e76 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersCreateSamples.java @@ -5,13 +5,15 @@ package com.azure.resourcemanager.managednetworkfabric.generated; import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation; +import com.azure.resourcemanager.managednetworkfabric.models.IsWorkloadManagementNetworkEnabled; import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.NfcSku; import java.util.Arrays; /** Samples for NetworkFabricControllers Create. */ public final class NetworkFabricControllersCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Create_MaximumSet_Gen.json */ /** * Sample code: NetworkFabricControllers_Create_MaximumSet_Gen. @@ -22,27 +24,30 @@ public static void networkFabricControllersCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkFabricControllers() - .define("NetworkControllerName") + .define("example-networkController") .withRegion("eastus") - .withExistingResourceGroup("resourceGroupName") + .withExistingResourceGroup("example-rg") .withManagedResourceGroupConfiguration( new ManagedResourceGroupConfiguration().withName("managedResourceGroupName").withLocation("eastus")) + .withIsWorkloadManagementNetworkEnabled(IsWorkloadManagementNetworkEnabled.TRUE) .withIpv4AddressSpace("172.253.0.0/19") + .withIpv6AddressSpace("::/60") + .withNfcSku(NfcSku.STANDARD) .withInfrastructureExpressRouteConnections( Arrays .asList( new ExpressRouteConnectionInformation() .withExpressRouteCircuitId( - "/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) .withWorkloadExpressRouteConnections( Arrays .asList( new ExpressRouteConnectionInformation() .withExpressRouteCircuitId( - "/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) - .withAnnotation("lab 1") + .withAnnotation("annotation") .create(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDeleteSamples.java index d490c58a79ab9..625879d3ce177 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkFabricControllers Delete. */ public final class NetworkFabricControllersDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Delete_MaximumSet_Gen.json */ /** * Sample code: NetworkFabricControllers_Delete_MaximumSet_Gen. @@ -18,6 +18,6 @@ public static void networkFabricControllersDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkFabricControllers() - .delete("resourceGroupName", "networkFabricControllerName", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-networkController", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDisableWorkloadManagementNetworkSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDisableWorkloadManagementNetworkSamples.java deleted file mode 100644 index e0de188f75416..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDisableWorkloadManagementNetworkSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -/** Samples for NetworkFabricControllers DisableWorkloadManagementNetwork. */ -public final class NetworkFabricControllersDisableWorkloadManagementNetworkSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_disableWorkloadManagementNetwork_MaximumSet_Gen.json - */ - /** - * Sample code: NetworkFabricControllers_disableWorkloadManagementNetwork_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void networkFabricControllersDisableWorkloadManagementNetworkMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkFabricControllers() - .disableWorkloadManagementNetwork( - "resourceGroupName", "networkFabricControllerName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersEnableWorkloadManagementNetworkSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersEnableWorkloadManagementNetworkSamples.java deleted file mode 100644 index 52fbb96d7a0cf..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersEnableWorkloadManagementNetworkSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -/** Samples for NetworkFabricControllers EnableWorkloadManagementNetwork. */ -public final class NetworkFabricControllersEnableWorkloadManagementNetworkSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_enableWorkloadManagementNetwork_MaximumSet_Gen.json - */ - /** - * Sample code: NetworkFabricControllers_enableWorkloadManagementNetwork_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void networkFabricControllersEnableWorkloadManagementNetworkMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkFabricControllers() - .enableWorkloadManagementNetwork( - "resourceGroupName", "networkFabricControllerName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersGetByResourceGroupSamples.java index 21c4a119b3491..c5fd74c844014 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkFabricControllers GetByResourceGroup. */ public final class NetworkFabricControllersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Get_MaximumSet_Gen.json */ /** * Sample code: NetworkFabricControllers_Get_MaximumSet_Gen. @@ -19,6 +19,6 @@ public static void networkFabricControllersGetMaximumSetGen( manager .networkFabricControllers() .getByResourceGroupWithResponse( - "resourceGroupName", "networkFabricControllerName", com.azure.core.util.Context.NONE); + "example-rg", "example-networkController", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListByResourceGroupSamples.java index 7ab97efb81c76..0d541be667b4f 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkFabricControllers ListByResourceGroup. */ public final class NetworkFabricControllersListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class NetworkFabricControllersListByResourceGroupSamples { */ public static void networkFabricControllersListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabricControllers().listByResourceGroup("resourceGroupName", com.azure.core.util.Context.NONE); + manager.networkFabricControllers().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListSamples.java index c1aa133cdaa5f..9c59f970809a9 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkFabricControllers List. */ public final class NetworkFabricControllersListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: NetworkFabricControllers_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersUpdateSamples.java index 986a31ca55d7f..d5025610ecab2 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for NetworkFabricControllers Update. */ public final class NetworkFabricControllersUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Update_MaximumSet_Gen.json */ /** * Sample code: NetworkFabricControllers_Update_MaximumSet_Gen. @@ -24,16 +24,23 @@ public static void networkFabricControllersUpdateMaximumSetGen( manager .networkFabricControllers() .getByResourceGroupWithResponse( - "resourceGroupName", "networkFabricControllerName", com.azure.core.util.Context.NONE) + "example-rg", "example-networkController", com.azure.core.util.Context.NONE) .getValue(); resource .update() + .withInfrastructureExpressRouteConnections( + Arrays + .asList( + new ExpressRouteConnectionInformation() + .withExpressRouteCircuitId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") + .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) .withWorkloadExpressRouteConnections( Arrays .asList( new ExpressRouteConnectionInformation() .withExpressRouteCircuitId( - "/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") .withExpressRouteAuthorizationKey("fakeTokenPlaceholder"))) .apply(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetSamples.java index fa9722181d24f..98377a70aed42 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkFabricSkus Get. */ public final class NetworkFabricSkusGetSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricSkus_Get_MaximumSet_Gen.json */ /** * Sample code: NetworkFabricSkus_Get_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class NetworkFabricSkusGetSamples { */ public static void networkFabricSkusGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabricSkus().getWithResponse("networkFabricSkuName", com.azure.core.util.Context.NONE); + manager.networkFabricSkus().getWithResponse("example-fabricsku", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListSamples.java index 3c7ab1a6e2854..b973d35d15529 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkFabricSkus List. */ public final class NetworkFabricSkusListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricSkus_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: NetworkFabricSkus_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCommitConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCommitConfigurationSamples.java new file mode 100644 index 0000000000000..c942195eaf8e7 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCommitConfigurationSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkFabrics CommitConfiguration. */ +public final class NetworkFabricsCommitConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_CommitConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkFabrics_CommitConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsCommitConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().commitConfiguration("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCreateSamples.java index c2705323d3a8e..086a171c19082 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsCreateSamples.java @@ -4,12 +4,14 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBPropertiesAutoGenerated; +import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPropertiesOptionAProperties; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -17,7 +19,7 @@ /** Samples for NetworkFabrics Create. */ public final class NetworkFabricsCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Create_MaximumSet_Gen.json */ /** * Sample code: NetworkFabrics_Create_MaximumSet_Gen. @@ -28,62 +30,82 @@ public static void networkFabricsCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkFabrics() - .define("FabricName") + .define("example-fabric") .withRegion("eastuseuap") - .withExistingResourceGroup("resourceGroupName") - .withTags(mapOf("key6468", "")) + .withExistingResourceGroup("example-rg") .withNetworkFabricSku("M4-A400-A100-C16-aa") - .withRackCount(4) + .withNetworkFabricControllerId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-fabricController") .withServerCountPerRack(8) .withIpv4Prefix("10.18.0.0/19") - .withIpv6Prefix("3FFE:FFFF:0:CD40::/59") - .withFabricAsn(29249) - .withNetworkFabricControllerId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName") + .withFabricAsn(29249L) .withTerminalServerConfiguration( new TerminalServerConfiguration() - .withPrimaryIpv4Prefix("20.0.0.12/30") - .withPrimaryIpv6Prefix("3FFE:FFFF:0:CD30::a8/126") - .withSecondaryIpv4Prefix("20.0.0.13/30") - .withSecondaryIpv6Prefix("3FFE:FFFF:0:CD30::ac/126") .withUsername("username") .withPassword("fakeTokenPlaceholder") - .withSerialNumber("123456")) + .withSerialNumber("123456") + .withPrimaryIpv4Prefix("10.0.0.12/30") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") + .withSecondaryIpv4Prefix("20.0.0.13/30") + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127")) .withManagementNetworkConfiguration( - new ManagementNetworkConfiguration() + new ManagementNetworkConfigurationProperties() .withInfrastructureVpnConfiguration( new VpnConfigurationProperties() + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") .withPeeringOption(PeeringOption.OPTIONA) .withOptionBProperties( - new OptionBPropertiesAutoGenerated() - .withImportRouteTargets(Arrays.asList("65046:10039")) - .withExportRouteTargets(Arrays.asList("65046:10039"))) + new OptionBProperties() + .withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets( + new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10039")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10039")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10039")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10039")))) .withOptionAProperties( - new OptionAProperties() - .withPrimaryIpv4Prefix("20.0.0.12/30") - .withPrimaryIpv6Prefix("3FFE:FFFF:0:CD30::a8/126") + new VpnConfigurationPropertiesOptionAProperties() + .withMtu(1501) + .withVlanId(3001) + .withPeerAsn(1235L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withPrimaryIpv4Prefix("10.0.0.12/30") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") .withSecondaryIpv4Prefix("20.0.0.13/30") - .withSecondaryIpv6Prefix("3FFE:FFFF:0:CD30::ac/126") - .withMtu(5892) - .withVlanId(2724) - .withPeerAsn(42666))) + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127"))) .withWorkloadVpnConfiguration( new VpnConfigurationProperties() + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") .withPeeringOption(PeeringOption.OPTIONA) .withOptionBProperties( - new OptionBPropertiesAutoGenerated() + new OptionBProperties() .withImportRouteTargets(Arrays.asList("65046:10050")) - .withExportRouteTargets(Arrays.asList("65046:10050"))) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets( + new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10039")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10039")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10039")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10039")))) .withOptionAProperties( - new OptionAProperties() + new VpnConfigurationPropertiesOptionAProperties() + .withMtu(1500) + .withVlanId(3000) + .withPeerAsn(61234L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5)) .withPrimaryIpv4Prefix("10.0.0.14/30") .withPrimaryIpv6Prefix("2FFE:FFFF:0:CD30::a7/126") .withSecondaryIpv4Prefix("10.0.0.15/30") - .withSecondaryIpv6Prefix("2FFE:FFFF:0:CD30::ac/126") - .withMtu(5892) - .withVlanId(2724) - .withPeerAsn(42666)))) - .withAnnotation("annotationValue") + .withSecondaryIpv6Prefix("2FFE:FFFF:0:CD30::ac/126")))) + .withTags(mapOf("keyID", "keyValue")) + .withRackCount(4) + .withIpv6Prefix("3FFE:FFFF:0:CD40::/59") + .withAnnotation("annotation") .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeleteSamples.java index 93e58bb805256..85f0c8fb6605b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkFabrics Delete. */ public final class NetworkFabricsDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Delete_MaximumSet_Gen.json */ /** * Sample code: NetworkFabrics_Delete_MaximumSet_Gen. @@ -16,8 +16,6 @@ public final class NetworkFabricsDeleteSamples { */ public static void networkFabricsDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkFabrics() - .delete("rgNetworkFabrics", "lrhjxlxlhgvufessdcuetcwnto", com.azure.core.util.Context.NONE); + manager.networkFabrics().delete("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeprovisionSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeprovisionSamples.java index b3f2fd6e8f717..036f2f5555edc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeprovisionSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeprovisionSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkFabrics Deprovision. */ public final class NetworkFabricsDeprovisionSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_deprovision_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_deprovision_MaximumSet_Gen.json */ /** * Sample code: NetworkFabrics_deprovision_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class NetworkFabricsDeprovisionSamples { */ public static void networkFabricsDeprovisionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().deprovision("resourceGroupName", "FabricName", com.azure.core.util.Context.NONE); + manager.networkFabrics().deprovision("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetByResourceGroupSamples.java index 26b05c085e8f3..4dde408b44860 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkFabrics GetByResourceGroup. */ public final class NetworkFabricsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Get_MaximumSet_Gen.json */ /** * Sample code: NetworkFabrics_Get_MaximumSet_Gen. @@ -18,6 +18,6 @@ public static void networkFabricsGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkFabrics() - .getByResourceGroupWithResponse("resourceGroupName", "FabricName", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetTopologySamples.java similarity index 51% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListSamples.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetTopologySamples.java index 40eaba3f8342a..b303b8beea20e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsGetTopologySamples.java @@ -4,18 +4,18 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -/** Samples for NetworkInterfaces List. */ -public final class NetworkInterfacesListSamples { +/** Samples for NetworkFabrics GetTopology. */ +public final class NetworkFabricsGetTopologySamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_List_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_GetTopology_MaximumSet_Gen.json */ /** - * Sample code: NetworkInterfaces_List_MaximumSet_Gen. + * Sample code: NetworkFabrics_GetTopology_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkInterfacesListMaximumSetGen( + public static void networkFabricsGetTopologyMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkInterfaces().list("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); + manager.networkFabrics().getTopology("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListByResourceGroupSamples.java index 549dc69984bb6..4040c7c7cb3aa 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkFabrics ListByResourceGroup. */ public final class NetworkFabricsListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: NetworkFabrics_ListByResourceGroup_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class NetworkFabricsListByResourceGroupSamples { */ public static void networkFabricsListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().listByResourceGroup("rgNetworkFabrics", com.azure.core.util.Context.NONE); + manager.networkFabrics().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListSamples.java index fc067bebdfa4e..007b6c0b1300b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkFabrics List. */ public final class NetworkFabricsListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: NetworkFabrics_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsProvisionSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsProvisionSamples.java index afbbd11d6e03b..89f4a4b0eceea 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsProvisionSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsProvisionSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkFabrics Provision. */ public final class NetworkFabricsProvisionSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_provision_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_provision_MaximumSet_Gen.json */ /** * Sample code: NetworkFabrics_provision_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class NetworkFabricsProvisionSamples { */ public static void networkFabricsProvisionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkFabrics().provision("resourceGroupName", "FabricName", com.azure.core.util.Context.NONE); + manager.networkFabrics().provision("example-rg", "example-fabric", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsRefreshConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsRefreshConfigurationSamples.java new file mode 100644 index 0000000000000..78cd033f140cd --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsRefreshConfigurationSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkFabrics RefreshConfiguration. */ +public final class NetworkFabricsRefreshConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_refreshConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkFabrics_refreshConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsRefreshConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkFabrics().refreshConfiguration("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateInfraManagementBfdConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateInfraManagementBfdConfigurationSamples.java new file mode 100644 index 0000000000000..7c49046ad3559 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateInfraManagementBfdConfigurationSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for NetworkFabrics UpdateInfraManagementBfdConfiguration. */ +public final class NetworkFabricsUpdateInfraManagementBfdConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_UpdateInfraManagementBfdConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkFabrics_UpdateInfraManagementBfdConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsUpdateInfraManagementBfdConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkFabrics() + .updateInfraManagementBfdConfiguration( + "example-rg", + "example-fabric", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateSamples.java index 26711595bf61e..e82c9bda751d4 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateSamples.java @@ -4,15 +4,23 @@ package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfigurationPatchableProperties; import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabric; -import com.azure.resourcemanager.managednetworkfabric.models.TerminalServerPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatchablePropertiesTerminalServerConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; +import com.azure.resourcemanager.managednetworkfabric.models.RouteTargetInformation; +import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchableProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationPatchablePropertiesOptionAProperties; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for NetworkFabrics Update. */ public final class NetworkFabricsUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Update_MaximumSet_Gen.json */ /** * Sample code: NetworkFabrics_Update_MaximumSet_Gen. @@ -24,17 +32,80 @@ public static void networkFabricsUpdateMaximumSetGen( NetworkFabric resource = manager .networkFabrics() - .getByResourceGroupWithResponse("resourceGroupName", "FabricName", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("example-rg", "example-fabric", com.azure.core.util.Context.NONE) .getValue(); resource .update() - .withTags(mapOf("key1758", "")) + .withTags(mapOf("keyID", "KeyValue")) + .withRackCount(6) + .withServerCountPerRack(10) + .withIpv4Prefix("10.18.0.0/17") + .withIpv6Prefix("3FFE:FFFF:0:CD40::/60") + .withFabricAsn(12345L) .withTerminalServerConfiguration( - new TerminalServerPatchableProperties() - .withUsername("username") + new NetworkFabricPatchablePropertiesTerminalServerConfiguration() + .withUsername("username1") .withPassword("fakeTokenPlaceholder") - .withSerialNumber("234567")) - .withAnnotation("annotationValue") + .withSerialNumber("1234567") + .withPrimaryIpv4Prefix("10.0.0.12/30") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") + .withSecondaryIpv4Prefix("40.0.0.14/30") + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127")) + .withManagementNetworkConfiguration( + new ManagementNetworkConfigurationPatchableProperties() + .withInfrastructureVpnConfiguration( + new VpnConfigurationPatchableProperties() + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .withPeeringOption(PeeringOption.OPTIONB) + .withOptionBProperties( + new OptionBProperties() + .withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets( + new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) + .withOptionAProperties( + new VpnConfigurationPatchablePropertiesOptionAProperties() + .withMtu(1501) + .withVlanId(3001) + .withPeerAsn(1235L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(10)) + .withPrimaryIpv4Prefix("10.0.0.12/30") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") + .withSecondaryIpv4Prefix("20.0.0.13/30") + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127"))) + .withWorkloadVpnConfiguration( + new VpnConfigurationPatchableProperties() + .withNetworkToNetworkInterconnectId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni") + .withPeeringOption(PeeringOption.OPTIONA) + .withOptionBProperties( + new OptionBProperties() + .withImportRouteTargets(Arrays.asList("65046:10050")) + .withExportRouteTargets(Arrays.asList("65046:10050")) + .withRouteTargets( + new RouteTargetInformation() + .withImportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withImportIpv6RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv4RouteTargets(Arrays.asList("65046:10050")) + .withExportIpv6RouteTargets(Arrays.asList("65046:10050")))) + .withOptionAProperties( + new VpnConfigurationPatchablePropertiesOptionAProperties() + .withMtu(1500) + .withVlanId(3000) + .withPeerAsn(61234L) + .withBfdConfiguration( + new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(5)) + .withPrimaryIpv4Prefix("10.0.0.14/30") + .withPrimaryIpv6Prefix("2FFE:FFFF:0:CD30::a7/126") + .withSecondaryIpv4Prefix("10.0.0.15/30") + .withSecondaryIpv6Prefix("2FFE:FFFF:0:CD30::ac/126")))) + .withAnnotation("annotation1") .apply(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateWorkloadManagementBfdConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateWorkloadManagementBfdConfigurationSamples.java new file mode 100644 index 0000000000000..fb12a729119a2 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpdateWorkloadManagementBfdConfigurationSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for NetworkFabrics UpdateWorkloadManagementBfdConfiguration. */ +public final class NetworkFabricsUpdateWorkloadManagementBfdConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_UpdateWorkloadManagementBfdConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkFabrics_UpdateWorkloadManagementBfdConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsUpdateWorkloadManagementBfdConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkFabrics() + .updateWorkloadManagementBfdConfiguration( + "example-rg", + "example-fabric", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpgradeSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpgradeSamples.java new file mode 100644 index 0000000000000..a9e17ab15bae1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsUpgradeSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersion; + +/** Samples for NetworkFabrics Upgrade. */ +public final class NetworkFabricsUpgradeSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_upgrade_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkFabrics_upgrade_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsUpgradeMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkFabrics() + .upgrade( + "example-rg", + "example-fabric", + new UpdateVersion().withVersion("version1"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsValidateConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsValidateConfigurationSamples.java new file mode 100644 index 0000000000000..755bee73e790d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsValidateConfigurationSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.ValidateAction; +import com.azure.resourcemanager.managednetworkfabric.models.ValidateConfigurationProperties; + +/** Samples for NetworkFabrics ValidateConfiguration. */ +public final class NetworkFabricsValidateConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_ValidateConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkFabrics_ValidateConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkFabricsValidateConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkFabrics() + .validateConfiguration( + "example-rg", + "example-fabric", + new ValidateConfigurationProperties().withValidateAction(ValidateAction.CABLING), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateSamples.java index d23bdfff2f067..8cb0a8cd7c857 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkInterfaces Create. */ public final class NetworkInterfacesCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Create_MaximumSet_Gen.json */ /** * Sample code: NetworkInterfaces_Create_MaximumSet_Gen. @@ -18,9 +18,9 @@ public static void networkInterfacesCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkInterfaces() - .define("networkInterfaceName") - .withExistingNetworkDevice("resourceGroupName", "networkDeviceName") - .withAnnotation("null") + .define("example-interface") + .withExistingNetworkDevice("example-rg", "example-device") + .withAnnotation("annotation") .create(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesDeleteSamples.java index c5bc709e445c0..47d2286d96f50 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkInterfaces Delete. */ public final class NetworkInterfacesDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Delete_MaximumSet_Gen.json */ /** * Sample code: NetworkInterfaces_Delete_MaximumSet_Gen. @@ -16,8 +16,6 @@ public final class NetworkInterfacesDeleteSamples { */ public static void networkInterfacesDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkInterfaces() - .delete("resourceGroupName", "networkDeviceName", "networkInterfaceName", com.azure.core.util.Context.NONE); + manager.networkInterfaces().delete("rgNetworkDevices", "sjzd", "emrgu", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetSamples.java index 26e7d54fb2db3..bf98db7db6df7 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkInterfaces Get. */ public final class NetworkInterfacesGetSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Get_MaximumSet_Gen.json */ /** * Sample code: NetworkInterfaces_Get_MaximumSet_Gen. @@ -18,7 +18,6 @@ public static void networkInterfacesGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkInterfaces() - .getWithResponse( - "resourceGroupName", "networkDeviceName", "networkInterfaceName", com.azure.core.util.Context.NONE); + .getWithResponse("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetStatusSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceSamples.java similarity index 51% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetStatusSamples.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceSamples.java index 98c77c23439fa..495ddd33e5d8c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetStatusSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListByNetworkDeviceSamples.java @@ -4,21 +4,20 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -/** Samples for NetworkInterfaces GetStatus. */ -public final class NetworkInterfacesGetStatusSamples { +/** Samples for NetworkInterfaces ListByNetworkDevice. */ +public final class NetworkInterfacesListByNetworkDeviceSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_getStatus_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_ListByNetworkDevice_MaximumSet_Gen.json */ /** - * Sample code: NetworkInterfaces_getStatus_MaximumSet_Gen. + * Sample code: NetworkInterfaces_ListByNetworkDevice_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkInterfacesGetStatusMaximumSetGen( + public static void networkInterfacesListByNetworkDeviceMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkInterfaces() - .getStatus( - "resourceGroupName", "networkDeviceName", "networkInterfaceName", com.azure.core.util.Context.NONE); + .listByNetworkDevice("example-rg", "example-device", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesUpdateAdministrativeStateSamples.java index 07afdb90218e9..d6b5500d92b91 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesUpdateAdministrativeStateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesUpdateAdministrativeStateSamples.java @@ -4,16 +4,17 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; /** Samples for NetworkInterfaces UpdateAdministrativeState. */ public final class NetworkInterfacesUpdateAdministrativeStateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_updateAdministrativeState_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_UpdateAdministrativeState_MaximumSet_Gen.json */ /** - * Sample code: NetworkInterfaces_updateAdministrativeState_MaximumSet_Gen. + * Sample code: NetworkInterfaces_UpdateAdministrativeState_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ @@ -22,10 +23,10 @@ public static void networkInterfacesUpdateAdministrativeStateMaximumSetGen( manager .networkInterfaces() .updateAdministrativeState( - "resourceGroupName", - "networkDeviceName", - "networkInterfaceName", - new UpdateAdministrativeState().withState(AdministrativeState.ENABLE), + "example-rg", + "example-device", + "example-interface", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesUpdateSamples.java index 65c35e89847fd..efb479bb5ef37 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for NetworkInterfaces Update. */ public final class NetworkInterfacesUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Update_MaximumSet_Gen.json */ /** * Sample code: NetworkInterfaces_Update_MaximumSet_Gen. @@ -21,9 +21,8 @@ public static void networkInterfacesUpdateMaximumSetGen( NetworkInterface resource = manager .networkInterfaces() - .getWithResponse( - "resourceGroupName", "networkDeviceName", "networkInterfaceName", com.azure.core.util.Context.NONE) + .getWithResponse("example-rg", "example-device", "example-interface", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withAnnotation("null").apply(); + resource.update().withAnnotation("annotation").apply(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateSamples.java new file mode 100644 index 0000000000000..a4b31c829857c --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersCreateSamples.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import java.util.HashMap; +import java.util.Map; + +/** Samples for NetworkPacketBrokers Create. */ +public final class NetworkPacketBrokersCreateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Create_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkPacketBrokers_Create_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkPacketBrokersCreateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkPacketBrokers() + .define("example-networkPacketBroker") + .withRegion("eastuseuap") + .withExistingResourceGroup("example-rg") + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-networkFabric") + .withTags(mapOf("key2806", "key")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersDeleteSamples.java new file mode 100644 index 0000000000000..b4602b2460a23 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkPacketBrokers Delete. */ +public final class NetworkPacketBrokersDeleteSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkPacketBrokers_Delete_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkPacketBrokersDeleteMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkPacketBrokers() + .delete("example-rg", "example-networkPacketBroker", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..cff9ec2668518 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersGetByResourceGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkPacketBrokers GetByResourceGroup. */ +public final class NetworkPacketBrokersGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Get_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkPacketBrokers_Get_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkPacketBrokersGetMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkPacketBrokers() + .getByResourceGroupWithResponse( + "example-rg", "example-networkPacketBroker", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListByResourceGroupSamples.java new file mode 100644 index 0000000000000..1449ae8269e7b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListByResourceGroupSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkPacketBrokers ListByResourceGroup. */ +public final class NetworkPacketBrokersListByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkPacketBrokers_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkPacketBrokersListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkPacketBrokers().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListSamples.java new file mode 100644 index 0000000000000..a29671d3ba727 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkPacketBrokers List. */ +public final class NetworkPacketBrokersListSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkPacketBrokers_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkPacketBrokersListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkPacketBrokers().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersUpdateSamples.java new file mode 100644 index 0000000000000..fe2bbaebad01f --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkPacketBrokersUpdateSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.NetworkPacketBroker; +import java.util.HashMap; +import java.util.Map; + +/** Samples for NetworkPacketBrokers Update. */ +public final class NetworkPacketBrokersUpdateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Update_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkPacketBrokers_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkPacketBrokersUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NetworkPacketBroker resource = + manager + .networkPacketBrokers() + .getByResourceGroupWithResponse( + "example-rg", "example-networkPacketBroker", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key8772", "1234")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksCreateSamples.java index 23adacaa109d2..14b5e3501b259 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksCreateSamples.java @@ -4,13 +4,14 @@ package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackType; import java.util.HashMap; import java.util.Map; /** Samples for NetworkRacks Create. */ public final class NetworkRacksCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Create_MaximumSet_Gen.json */ /** * Sample code: NetworkRacks_Create_MaximumSet_Gen. @@ -21,14 +22,14 @@ public static void networkRacksCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkRacks() - .define("networkRackName") - .withRegion("eastus") - .withExistingResourceGroup("resourceGroupName") - .withNetworkRackSku("RackSKU") + .define("example-rack") + .withRegion("eastuseuap") + .withExistingResourceGroup("example-rg") .withNetworkFabricId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/networkFabricName") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-networkFabric") .withTags(mapOf("keyID", "keyValue")) - .withAnnotation("null") + .withNetworkRackType(NetworkRackType.AGGREGATE) + .withAnnotation("annotation") .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksDeleteSamples.java index 90c4beadb5402..873c2d3b2959a 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkRacks Delete. */ public final class NetworkRacksDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Delete_MaximumSet_Gen.json */ /** * Sample code: NetworkRacks_Delete_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class NetworkRacksDeleteSamples { */ public static void networkRacksDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkRacks().delete("resourceGroupName", "networkRackName", com.azure.core.util.Context.NONE); + manager.networkRacks().delete("example-rg", "example-rack", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksGetByResourceGroupSamples.java index 69ac11fb0c7e4..1538b17ad4dc8 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkRacks GetByResourceGroup. */ public final class NetworkRacksGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Get_MaximumSet_Gen.json */ /** * Sample code: NetworkRacks_Get_MaximumSet_Gen. @@ -18,6 +18,6 @@ public static void networkRacksGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkRacks() - .getByResourceGroupWithResponse("resourceGroupName", "networkRackName", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("example-rg", "example-rack", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListByResourceGroupSamples.java index 280cd4b95113e..e8d431069dbdc 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkRacks ListByResourceGroup. */ public final class NetworkRacksListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: NetworkRacks_ListByResourceGroup_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class NetworkRacksListByResourceGroupSamples { */ public static void networkRacksListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkRacks().listByResourceGroup("resourceGroupName", com.azure.core.util.Context.NONE); + manager.networkRacks().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListSamples.java index 1d4e19140128e..db3b7a3c3152e 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkRacks List. */ public final class NetworkRacksListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: NetworkRacks_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksUpdateSamples.java index 00fc175bc5fcb..e2246712cc838 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksUpdateSamples.java @@ -4,17 +4,14 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; -import java.io.IOException; import java.util.HashMap; import java.util.Map; /** Samples for NetworkRacks Update. */ public final class NetworkRacksUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Update_MaximumSet_Gen.json */ /** * Sample code: NetworkRacks_Update_MaximumSet_Gen. @@ -22,21 +19,13 @@ public final class NetworkRacksUpdateSamples { * @param manager Entry point to ManagedNetworkFabricManager. */ public static void networkRacksUpdateMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) throws IOException { + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { NetworkRack resource = manager .networkRacks() - .getByResourceGroupWithResponse( - "resourceGroupName", "networkRackName", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("example-rg", "example-rack", com.azure.core.util.Context.NONE) .getValue(); - resource - .update() - .withTags(mapOf("keyID", "keyValue")) - .withProperties( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)) - .apply(); + resource.update().withTags(mapOf("keyID", "keyValue")).apply(); } @SuppressWarnings("unchecked") diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesCreateSamples.java new file mode 100644 index 0000000000000..3b2aa58ca7f7e --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesCreateSamples.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; +import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.PollingIntervalInSeconds; +import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortType; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; +import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for NetworkTapRules Create. */ +public final class NetworkTapRulesCreateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Create_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTapRules_Create_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapRulesCreateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkTapRules() + .define("example-tapRule") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withTags(mapOf("keyID", "keyValue")) + .withPollingIntervalInSeconds(PollingIntervalInSeconds.THREE_ZERO) + .withConfigurationType(ConfigurationType.FILE) + .withTapRulesUrl("https://microsoft.com/a") + .withMatchConfigurations( + Arrays + .asList( + new NetworkTapRuleMatchConfiguration() + .withMatchConfigurationName("config1") + .withSequenceNumber(10L) + .withIpAddressType(IpAddressType.IPV4) + .withMatchConditions( + Arrays + .asList( + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("TCP")) + .withVlanMatchCondition( + new VlanMatchCondition() + .withVlans(Arrays.asList("10")) + .withInnerVlans(Arrays.asList("11-20")) + .withVlanGroupNames(Arrays.asList("exmaple-vlanGroup"))) + .withIpCondition( + new IpMatchCondition() + .withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("10.10.10.10/20")) + .withIpGroupNames(Arrays.asList("example-ipGroup"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition( + new PortCondition() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("100")) + .withPortGroupNames(Arrays.asList("example-portGroup1"))))) + .withActions( + Arrays + .asList( + new NetworkTapRuleAction() + .withType(TapRuleActionType.DROP) + .withTruncate("100") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup") + .withMatchConfigurationName("match1"))))) + .withDynamicMatchConfigurations( + Arrays + .asList( + new CommonDynamicMatchConfiguration() + .withIpGroups( + Arrays + .asList( + new IpGroupProperties() + .withName("example-ipGroup1") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("10.10.10.10/30")))) + .withVlanGroups( + Arrays + .asList( + new VlanGroupProperties() + .withName("exmaple-vlanGroup") + .withVlans(Arrays.asList("10", "100-200")))) + .withPortGroups( + Arrays + .asList( + new PortGroupProperties() + .withName("example-portGroup1") + .withPorts(Arrays.asList("100-200")), + new PortGroupProperties() + .withName("example-portGroup2") + .withPorts(Arrays.asList("900", "1000-2000")))))) + .withAnnotation("annotation") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesDeleteSamples.java new file mode 100644 index 0000000000000..d4e463f4b4ffb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesDeleteSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkTapRules Delete. */ +public final class NetworkTapRulesDeleteSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTapRules_Delete_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapRulesDeleteMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkTapRules().delete("example-rg", "example-tapRule", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..4d6d6cfc64f41 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkTapRules GetByResourceGroup. */ +public final class NetworkTapRulesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Get_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTapRules_Get_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapRulesGetMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkTapRules() + .getByResourceGroupWithResponse("example-rg", "example-tapRule", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListByResourceGroupSamples.java new file mode 100644 index 0000000000000..ff125cfaa645d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListByResourceGroupSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkTapRules ListByResourceGroup. */ +public final class NetworkTapRulesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTapRules_ListByResourceGroup_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapRulesListByResourceGroupMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkTapRules().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListSamples.java similarity index 55% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusListSamples.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListSamples.java index d190695af9a41..ee77cff7631a0 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesListSamples.java @@ -4,18 +4,18 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -/** Samples for NetworkRackSkus List. */ -public final class NetworkRackSkusListSamples { +/** Samples for NetworkTapRules List. */ +public final class NetworkTapRulesListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: NetworkRackSkus_ListBySubscription_MaximumSet_Gen. + * Sample code: NetworkTapRules_ListBySubscription_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkRackSkusListBySubscriptionMaximumSetGen( + public static void networkTapRulesListBySubscriptionMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkRackSkus().list(com.azure.core.util.Context.NONE); + manager.networkTapRules().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesResyncSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesResyncSamples.java new file mode 100644 index 0000000000000..c009dbfbab7c4 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesResyncSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkTapRules Resync. */ +public final class NetworkTapRulesResyncSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Resync_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTapRules_Resync_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapRulesResyncMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkTapRules().resync("example-rg", "example-tapRule", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesUpdateAdministrativeStateSamples.java new file mode 100644 index 0000000000000..1b5ee2f907acb --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesUpdateAdministrativeStateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for NetworkTapRules UpdateAdministrativeState. */ +public final class NetworkTapRulesUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_UpdateAdministrativeState_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTapRules_UpdateAdministrativeState_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapRulesUpdateAdministrativeStateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkTapRules() + .updateAdministrativeState( + "example-rg", + "example-tapRule", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesUpdateSamples.java new file mode 100644 index 0000000000000..2cf355e4d69d3 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesUpdateSamples.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.CommonDynamicMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ConfigurationType; +import com.azure.resourcemanager.managednetworkfabric.models.EncapsulationType; +import com.azure.resourcemanager.managednetworkfabric.models.IpAddressType; +import com.azure.resourcemanager.managednetworkfabric.models.IpGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.Layer4Protocol; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRule; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleAction; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchCondition; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapRuleMatchConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.PortCondition; +import com.azure.resourcemanager.managednetworkfabric.models.PortGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.PortType; +import com.azure.resourcemanager.managednetworkfabric.models.PrefixType; +import com.azure.resourcemanager.managednetworkfabric.models.SourceDestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.TapRuleActionType; +import com.azure.resourcemanager.managednetworkfabric.models.VlanGroupProperties; +import com.azure.resourcemanager.managednetworkfabric.models.VlanMatchCondition; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for NetworkTapRules Update. */ +public final class NetworkTapRulesUpdateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Update_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTapRules_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapRulesUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NetworkTapRule resource = + manager + .networkTapRules() + .getByResourceGroupWithResponse("example-rg", "example-tapRule", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("keyID", "keyValue")) + .withConfigurationType(ConfigurationType.FILE) + .withTapRulesUrl("https://microsoft.com/amdsdx") + .withMatchConfigurations( + Arrays + .asList( + new NetworkTapRuleMatchConfiguration() + .withMatchConfigurationName("config1") + .withSequenceNumber(10L) + .withIpAddressType(IpAddressType.IPV4) + .withMatchConditions( + Arrays + .asList( + new NetworkTapRuleMatchCondition() + .withProtocolTypes(Arrays.asList("TCP")) + .withVlanMatchCondition( + new VlanMatchCondition() + .withVlans(Arrays.asList("10")) + .withInnerVlans(Arrays.asList("11-20")) + .withVlanGroupNames(Arrays.asList("exmaple-vlanGroup"))) + .withIpCondition( + new IpMatchCondition() + .withType(SourceDestinationType.SOURCE_IP) + .withPrefixType(PrefixType.PREFIX) + .withIpPrefixValues(Arrays.asList("10.10.10.10/20")) + .withIpGroupNames(Arrays.asList("example-ipGroup"))) + .withEncapsulationType(EncapsulationType.NONE) + .withPortCondition( + new PortCondition() + .withPortType(PortType.SOURCE_PORT) + .withLayer4Protocol(Layer4Protocol.TCP) + .withPorts(Arrays.asList("100")) + .withPortGroupNames(Arrays.asList("example-portGroup1"))))) + .withActions( + Arrays + .asList( + new NetworkTapRuleAction() + .withType(TapRuleActionType.GOTO) + .withTruncate("100") + .withIsTimestampEnabled(BooleanEnumProperty.TRUE) + .withDestinationId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup") + .withMatchConfigurationName("match1"))))) + .withDynamicMatchConfigurations( + Arrays + .asList( + new CommonDynamicMatchConfiguration() + .withIpGroups( + Arrays + .asList( + new IpGroupProperties() + .withName("example-ipGroup1") + .withIpAddressType(IpAddressType.IPV4) + .withIpPrefixes(Arrays.asList("10.10.10.10/30")))) + .withVlanGroups( + Arrays + .asList( + new VlanGroupProperties() + .withName("exmaple-vlanGroup") + .withVlans(Arrays.asList("10", "100-200")))) + .withPortGroups( + Arrays + .asList( + new PortGroupProperties() + .withName("example-portGroup1") + .withPorts(Arrays.asList("100-200")))))) + .withAnnotation("annotation") + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesValidateConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesValidateConfigurationSamples.java new file mode 100644 index 0000000000000..9be749c95fc40 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapRulesValidateConfigurationSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkTapRules ValidateConfiguration. */ +public final class NetworkTapRulesValidateConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_ValidateConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTapRules_ValidateConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapRulesValidateConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkTapRules() + .validateConfiguration("example-rg", "example-tapRule", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsCreateSamples.java new file mode 100644 index 0000000000000..ec774f2f4a96b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsCreateSamples.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; +import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPropertiesDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for NetworkTaps Create. */ +public final class NetworkTapsCreateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Create_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTaps_Create_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapsCreateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkTaps() + .define("example-networkTap") + .withRegion("eastuseuap") + .withExistingResourceGroup("example-rg") + .withNetworkPacketBrokerId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/example-networkPacketBroker") + .withDestinations( + Arrays + .asList( + new NetworkTapPropertiesDestinationsItem() + .withName("example-destinaionName") + .withDestinationType(DestinationType.ISOLATION_DOMAIN) + .withDestinationId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsloationDomains/example-l3Domain/internalNetworks/example-internalNetwork") + .withIsolationDomainProperties( + new IsolationDomainProperties() + .withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup"))) + .withDestinationTapRuleId( + "/subscriptions/xxxx-xxxx-xxxx-xxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkTapRules/example-destinationTapRule"))) + .withTags(mapOf("key6024", "1234")) + .withPollingType(PollingType.PULL) + .withAnnotation("annotation") + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsDeleteSamples.java new file mode 100644 index 0000000000000..0db1a03cb6ffe --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsDeleteSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkTaps Delete. */ +public final class NetworkTapsDeleteSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTaps_Delete_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapsDeleteMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkTaps().delete("example-rg", "example-networkTap", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..3f3df15646420 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkTaps GetByResourceGroup. */ +public final class NetworkTapsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Get_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTaps_Get_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapsGetMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkTaps() + .getByResourceGroupWithResponse("example-rg", "example-networkTap", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetStatusSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupSamples.java similarity index 51% rename from sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetStatusSamples.java rename to sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupSamples.java index 38b6156db24fe..18071ccb4dd24 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetStatusSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListByResourceGroupSamples.java @@ -4,18 +4,18 @@ package com.azure.resourcemanager.managednetworkfabric.generated; -/** Samples for NetworkDevices GetStatus. */ -public final class NetworkDevicesGetStatusSamples { +/** Samples for NetworkTaps ListByResourceGroup. */ +public final class NetworkTapsListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getStatus_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: NetworkDevices_getStatus_MaximumSet_Gen. + * Sample code: NetworkTaps_ListByResourceGroup_MaximumSet_Gen. * * @param manager Entry point to ManagedNetworkFabricManager. */ - public static void networkDevicesGetStatusMaximumSetGen( + public static void networkTapsListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.networkDevices().getStatus("resourceGroupName", "networkDeviceName", com.azure.core.util.Context.NONE); + manager.networkTaps().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListSamples.java new file mode 100644 index 0000000000000..836b31a54b14a --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkTaps List. */ +public final class NetworkTapsListSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTaps_ListBySubscription_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapsListBySubscriptionMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkTaps().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsResyncSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsResyncSamples.java new file mode 100644 index 0000000000000..ca874b02b6a86 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsResyncSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkTaps Resync. */ +public final class NetworkTapsResyncSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Resync_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTaps_Resync_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapsResyncMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager.networkTaps().resync("example-rg", "example-networkTap", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsUpdateAdministrativeStateSamples.java new file mode 100644 index 0000000000000..ec8f45b16cf58 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsUpdateAdministrativeStateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for NetworkTaps UpdateAdministrativeState. */ +public final class NetworkTapsUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_UpdateAdministrativeState_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTaps_UpdateAdministrativeState_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapsUpdateAdministrativeStateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkTaps() + .updateAdministrativeState( + "example-rg", + "example-networkTap", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsUpdateSamples.java new file mode 100644 index 0000000000000..13d1f57751a7b --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkTapsUpdateSamples.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.DestinationType; +import com.azure.resourcemanager.managednetworkfabric.models.Encapsulation; +import com.azure.resourcemanager.managednetworkfabric.models.IsolationDomainProperties; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTap; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkTapPatchableParametersDestinationsItem; +import com.azure.resourcemanager.managednetworkfabric.models.PollingType; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for NetworkTaps Update. */ +public final class NetworkTapsUpdateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Update_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkTaps_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkTapsUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NetworkTap resource = + manager + .networkTaps() + .getByResourceGroupWithResponse("example-rg", "example-networkTap", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("key6024", "1234")) + .withPollingType(PollingType.PULL) + .withDestinationsForUpdate( + Arrays + .asList( + new NetworkTapPatchableParametersDestinationsItem() + .withName("example-destinaionName") + .withDestinationType(DestinationType.ISOLATION_DOMAIN) + .withDestinationId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsloationDomains/example-l3Domain/internalNetworks/example-internalNetwork") + .withIsolationDomainProperties( + new IsolationDomainProperties() + .withEncapsulation(Encapsulation.NONE) + .withNeighborGroupIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup"))) + .withDestinationTapRuleId( + "/subscriptions/xxxx-xxxx-xxxx-xxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkTapRules/example-destinationTapRule"))) + .withAnnotation("annotation1") + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsCreateSamples.java index 3ce9a0ae1b4bc..56da29feb926c 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsCreateSamples.java @@ -4,15 +4,22 @@ package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.IsManagementType; import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration; import com.azure.resourcemanager.managednetworkfabric.models.NniType; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import java.util.Arrays; /** Samples for NetworkToNetworkInterconnects Create. */ public final class NetworkToNetworkInterconnectsCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json */ /** * Sample code: NetworkToNetworkInterconnects_Create_MaximumSet_Gen. @@ -23,24 +30,57 @@ public static void networkToNetworkInterconnectsCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkToNetworkInterconnects() - .define("DefaultNNI") - .withExistingNetworkFabric("resourceGroupName", "FabricName") + .define("example-nni") + .withExistingNetworkFabric("example-rg", "example-fabric") + .withUseOptionB(BooleanEnumProperty.TRUE) .withNniType(NniType.CE) - .withIsManagementType(BooleanEnumProperty.TRUE) - .withUseOptionB(BooleanEnumProperty.FALSE) - .withLayer2Configuration(new Layer2Configuration().withPortCount(10).withMtu(1500)) - .withLayer3Configuration( - new Layer3Configuration() - .withPrimaryIpv4Prefix("172.31.0.0/31") - .withPrimaryIpv6Prefix("3FFE:FFFF:0:CD30::a0/126") - .withSecondaryIpv4Prefix("172.31.0.20/31") - .withSecondaryIpv6Prefix("3FFE:FFFF:0:CD30::a4/126") - .withImportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1") - .withExportRoutePolicyId( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2") - .withPeerAsn(50272) - .withVlanId(2064)) + .withIsManagementType(IsManagementType.TRUE) + .withLayer2Configuration( + new Layer2Configuration() + .withMtu(1500) + .withInterfaces( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkDevices/example-networkDevice/networkInterfaces/example-networkInterface"))) + .withOptionBLayer3Configuration( + new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration() + .withPrimaryIpv4Prefix("10.0.0.12/30") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") + .withSecondaryIpv4Prefix("40.0.0.14/30") + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127") + .withPeerAsn(61234L) + .withVlanId(1234)) + .withNpbStaticRouteConfiguration( + new NpbStaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(300).withMultiplier(25)) + .withIpv4Routes( + Arrays + .asList( + new StaticRouteProperties() + .withPrefix("20.0.0.12/30") + .withNextHop(Arrays.asList("21.20.20.20")))) + .withIpv6Routes( + Arrays + .asList( + new StaticRouteProperties() + .withPrefix("3FFE:FFFF:0:CD30::ac/127") + .withNextHop(Arrays.asList("4FFE:FFFF:0:CD30::ac"))))) + .withImportRoutePolicy( + new ImportRoutePolicyInformation() + .withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") + .withImportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy")) + .withExportRoutePolicy( + new ExportRoutePolicyInformation() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy")) + .withEgressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withIngressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") .create(); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsDeleteSamples.java index eb9bd56237502..25a895e0a8a8b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkToNetworkInterconnects Delete. */ public final class NetworkToNetworkInterconnectsDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Delete_MaximumSet_Gen.json */ /** * Sample code: NetworkToNetworkInterconnects_Delete_MaximumSet_Gen. @@ -18,6 +18,6 @@ public static void networkToNetworkInterconnectsDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkToNetworkInterconnects() - .delete("resourceGroupName", "FabricName", "DefaultNNI", com.azure.core.util.Context.NONE); + .delete("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsGetSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsGetSamples.java index 9bd3e11803631..df4f5f635eb4b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsGetSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for NetworkToNetworkInterconnects Get. */ public final class NetworkToNetworkInterconnectsGetSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json */ /** * Sample code: NetworkToNetworkInterconnects_Get_MaximumSet_Gen. @@ -18,6 +18,6 @@ public static void networkToNetworkInterconnectsGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .networkToNetworkInterconnects() - .getWithResponse("resourceGroupName", "FabricName", "DefaultNNI", com.azure.core.util.Context.NONE); + .getWithResponse("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListByNetworkFabricSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListByNetworkFabricSamples.java new file mode 100644 index 0000000000000..e8ddbd31b5ed1 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListByNetworkFabricSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for NetworkToNetworkInterconnects ListByNetworkFabric. */ +public final class NetworkToNetworkInterconnectsListByNetworkFabricSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_ListByNetworkFabric_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkToNetworkInterconnects_ListByNetworkFabric_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkToNetworkInterconnectsListByNetworkFabricMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkToNetworkInterconnects() + .listByNetworkFabric("example-rg", "example-fabric", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListSamples.java deleted file mode 100644 index 90ff455ebab48..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -/** Samples for NetworkToNetworkInterconnects List. */ -public final class NetworkToNetworkInterconnectsListSamples { - /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_List_MaximumSet_Gen.json - */ - /** - * Sample code: NetworkToNetworkInterconnects_List_MaximumSet_Gen. - * - * @param manager Entry point to ManagedNetworkFabricManager. - */ - public static void networkToNetworkInterconnectsListMaximumSetGen( - com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager - .networkToNetworkInterconnects() - .list("resourceGroupName", "FabricName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateAdministrativeStateSamples.java new file mode 100644 index 0000000000000..00fbdbefedc50 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateAdministrativeStateSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for NetworkToNetworkInterconnects UpdateAdministrativeState. */ +public final class NetworkToNetworkInterconnectsUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_updateAdministrativeState_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkToNetworkInterconnects_updateAdministrativeState_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkToNetworkInterconnectsUpdateAdministrativeStateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkToNetworkInterconnects() + .updateAdministrativeState( + "example-rg", + "example-fabric", + "example-nni", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeState.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeState.java new file mode 100644 index 0000000000000..78721ecefc510 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeState.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for NetworkToNetworkInterconnects UpdateNpbStaticRouteBfdAdministrativeState. */ +public final class NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeState { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_updateNpbStaticRouteBfdAdministrativeState_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkToNetworkInterconnects_updateNpbStaticRouteBfdAdministrativeState_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeStateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .networkToNetworkInterconnects() + .updateNpbStaticRouteBfdAdministrativeState( + "example-rg", + "example-fabric", + "example-nni", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateSamples.java new file mode 100644 index 0000000000000..8ec9843e5a979 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsUpdateSamples.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.ExportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.ImportRoutePolicyInformation; +import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; +import com.azure.resourcemanager.managednetworkfabric.models.NpbStaticRouteConfiguration; +import com.azure.resourcemanager.managednetworkfabric.models.OptionBLayer3Configuration; +import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; +import java.util.Arrays; + +/** Samples for NetworkToNetworkInterconnects Update. */ +public final class NetworkToNetworkInterconnectsUpdateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Update_MaximumSet_Gen.json + */ + /** + * Sample code: NetworkToNetworkInterconnects_Update_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void networkToNetworkInterconnectsUpdateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + NetworkToNetworkInterconnect resource = + manager + .networkToNetworkInterconnects() + .getWithResponse("example-rg", "example-fabric", "example-nni", com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withLayer2Configuration( + new Layer2Configuration() + .withMtu(1500) + .withInterfaces( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkDevices/example-networkDevice/networkInterfaces/example-networkInterface"))) + .withOptionBLayer3Configuration( + new OptionBLayer3Configuration() + .withPrimaryIpv4Prefix("20.0.0.12/29") + .withPrimaryIpv6Prefix("4FFE:FFFF:0:CD30::a8/127") + .withSecondaryIpv4Prefix("20.0.0.14/29") + .withSecondaryIpv6Prefix("6FFE:FFFF:0:CD30::ac/127") + .withPeerAsn(2345L) + .withVlanId(1235)) + .withNpbStaticRouteConfiguration( + new NpbStaticRouteConfiguration() + .withBfdConfiguration(new BfdConfiguration().withIntervalInMilliSeconds(310).withMultiplier(15)) + .withIpv4Routes( + Arrays + .asList( + new StaticRouteProperties() + .withPrefix("20.0.0.11/30") + .withNextHop(Arrays.asList("21.20.20.10")))) + .withIpv6Routes( + Arrays + .asList( + new StaticRouteProperties() + .withPrefix("4FFE:FFFF:0:CD30::ac/127") + .withNextHop(Arrays.asList("5FFE:FFFF:0:CD30::ac"))))) + .withImportRoutePolicy( + new ImportRoutePolicyInformation() + .withImportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1") + .withImportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1")) + .withExportRoutePolicy( + new ExportRoutePolicyInformation() + .withExportIpv4RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1") + .withExportIpv6RoutePolicyId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1")) + .withEgressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .withIngressAclId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl") + .apply(); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationsListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationsListSamples.java index bf33d43761120..84541f92bfdee 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationsListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ListOperations.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ListOperations.json */ /** * Sample code: ListOperations. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCommitConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCommitConfigurationSamples.java new file mode 100644 index 0000000000000..c34a18f1ac12d --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCommitConfigurationSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for RoutePolicies CommitConfiguration. */ +public final class RoutePoliciesCommitConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_CommitConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: RoutePolicies_CommitConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void routePoliciesCommitConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .routePolicies() + .commitConfiguration("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCreateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCreateSamples.java index d0dfe04f4cce7..3099280192eb1 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCreateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCreateSamples.java @@ -6,9 +6,11 @@ import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties; import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; +import com.azure.resourcemanager.managednetworkfabric.models.AddressFamilyType; import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyActionType; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyConditionType; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; @@ -19,7 +21,7 @@ /** Samples for RoutePolicies Create. */ public final class RoutePoliciesCreateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Create_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Create_MaximumSet_Gen.json */ /** * Sample code: RoutePolicies_Create_MaximumSet_Gen. @@ -30,31 +32,36 @@ public static void routePoliciesCreateMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .routePolicies() - .define("routePolicyName") - .withRegion("EastUS") - .withExistingResourceGroup("rgRoutePolicies") + .define("example-routePolicy") + .withRegion("eastus") + .withExistingResourceGroup("example-rg") + .withNetworkFabricId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric") + .withTags(mapOf("keyID", "keyValue")) + .withAddressFamilyType(AddressFamilyType.IPV4) .withStatements( Arrays .asList( new RoutePolicyStatementProperties() - .withAnnotation("annotationValue") + .withAnnotation("annotation") .withSequenceNumber(7L) .withCondition( new StatementConditionProperties() .withIpCommunityIds( Arrays .asList( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName")) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity")) + .withType(RoutePolicyConditionType.OR) .withIpPrefixId( - "subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix") .withIpExtendedCommunityIds( Arrays .asList( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName"))) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) .withAction( new StatementActionProperties() .withLocalPreference(20L) - .withActionType(CommunityActionTypes.PERMIT) + .withActionType(RoutePolicyActionType.PERMIT) .withIpCommunityProperties( new ActionIpCommunityProperties() .withAdd( @@ -62,19 +69,19 @@ public static void routePoliciesCreateMaximumSetGen( .withIpCommunityIds( Arrays .asList( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName"))) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity"))) .withDelete( new IpCommunityIdList() .withIpCommunityIds( Arrays .asList( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName"))) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity"))) .withSet( new IpCommunityIdList() .withIpCommunityIds( Arrays .asList( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName")))) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity")))) .withIpExtendedCommunityProperties( new ActionIpExtendedCommunityProperties() .withAdd( @@ -82,21 +89,20 @@ public static void routePoliciesCreateMaximumSetGen( .withIpExtendedCommunityIds( Arrays .asList( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName"))) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) .withDelete( new IpExtendedCommunityIdList() .withIpExtendedCommunityIds( Arrays .asList( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName"))) + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) .withSet( new IpExtendedCommunityIdList() .withIpExtendedCommunityIds( Arrays .asList( - "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName"))))))) - .withTags(mapOf("key8254", "")) - .withAnnotation("annotationValue") + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))))))) + .withAnnotation("annotation") .create(); } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesDeleteSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesDeleteSamples.java index 0e97c1c17c64c..7e073b8ca7312 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesDeleteSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for RoutePolicies Delete. */ public final class RoutePoliciesDeleteSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Delete_MaximumSet_Gen.json */ /** * Sample code: RoutePolicies_Delete_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class RoutePoliciesDeleteSamples { */ public static void routePoliciesDeleteMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.routePolicies().delete("rgRoutePolicies", "routePolicyName", com.azure.core.util.Context.NONE); + manager.routePolicies().delete("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesGetByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesGetByResourceGroupSamples.java index eb15dd9b75085..9a2cf63e044b3 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesGetByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for RoutePolicies GetByResourceGroup. */ public final class RoutePoliciesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Get_MaximumSet_Gen.json */ /** * Sample code: RoutePolicies_Get_MaximumSet_Gen. @@ -18,6 +18,6 @@ public static void routePoliciesGetMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { manager .routePolicies() - .getByResourceGroupWithResponse("rgRoutePolicies", "routePolicyName", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListByResourceGroupSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListByResourceGroupSamples.java index 921547c75e545..b1e736d7bc212 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListByResourceGroupSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for RoutePolicies ListByResourceGroup. */ public final class RoutePoliciesListByResourceGroupSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: RoutePolicies_ListByResourceGroup_MaximumSet_Gen. @@ -16,6 +16,6 @@ public final class RoutePoliciesListByResourceGroupSamples { */ public static void routePoliciesListByResourceGroupMaximumSetGen( com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { - manager.routePolicies().listByResourceGroup("rgRoutePolicies", com.azure.core.util.Context.NONE); + manager.routePolicies().listByResourceGroup("example-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListSamples.java index b34f6993f4af8..795a3dc552c1b 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListSamples.java @@ -7,7 +7,7 @@ /** Samples for RoutePolicies List. */ public final class RoutePoliciesListSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: RoutePolicies_ListBySubscription_MaximumSet_Gen. diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesUpdateAdministrativeStateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesUpdateAdministrativeStateSamples.java new file mode 100644 index 0000000000000..386a4abd39f60 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesUpdateAdministrativeStateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableState; +import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; +import java.util.Arrays; + +/** Samples for RoutePolicies UpdateAdministrativeState. */ +public final class RoutePoliciesUpdateAdministrativeStateSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_UpdateAdministrativeState_MaximumSet_Gen.json + */ + /** + * Sample code: RoutePolicies_UpdateAdministrativeState_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void routePoliciesUpdateAdministrativeStateMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .routePolicies() + .updateAdministrativeState( + "example-rg", + "example-routePolicy", + new UpdateAdministrativeState().withResourceIds(Arrays.asList("")).withState(EnableDisableState.ENABLE), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesUpdateSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesUpdateSamples.java index f8c390af868e1..fdfc014228462 100644 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesUpdateSamples.java +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesUpdateSamples.java @@ -4,14 +4,24 @@ package com.azure.resourcemanager.managednetworkfabric.generated; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties; +import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties; +import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; +import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicy; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyActionType; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyConditionType; +import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; +import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** Samples for RoutePolicies Update. */ public final class RoutePoliciesUpdateSamples { /* - * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Update_MaximumSet_Gen.json */ /** * Sample code: RoutePolicies_Update_MaximumSet_Gen. @@ -23,10 +33,75 @@ public static void routePoliciesUpdateMaximumSetGen( RoutePolicy resource = manager .routePolicies() - .getByResourceGroupWithResponse( - "resourceGroupName", "routePolicyName", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("key8254", "")).apply(); + resource + .update() + .withTags(mapOf("keyID", "keyValue")) + .withStatements( + Arrays + .asList( + new RoutePolicyStatementProperties() + .withAnnotation("annotation") + .withSequenceNumber(7L) + .withCondition( + new StatementConditionProperties() + .withIpCommunityIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity")) + .withType(RoutePolicyConditionType.OR) + .withIpPrefixId( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix") + .withIpExtendedCommunityIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) + .withAction( + new StatementActionProperties() + .withLocalPreference(20L) + .withActionType(RoutePolicyActionType.PERMIT) + .withIpCommunityProperties( + new ActionIpCommunityProperties() + .withAdd( + new IpCommunityIdList() + .withIpCommunityIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity"))) + .withDelete( + new IpCommunityIdList() + .withIpCommunityIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity"))) + .withSet( + new IpCommunityIdList() + .withIpCommunityIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity")))) + .withIpExtendedCommunityProperties( + new ActionIpExtendedCommunityProperties() + .withAdd( + new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) + .withDelete( + new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))) + .withSet( + new IpExtendedCommunityIdList() + .withIpExtendedCommunityIds( + Arrays + .asList( + "/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity"))))))) + .apply(); } @SuppressWarnings("unchecked") diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesValidateConfigurationSamples.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesValidateConfigurationSamples.java new file mode 100644 index 0000000000000..5141198955c61 --- /dev/null +++ b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/samples/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesValidateConfigurationSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.managednetworkfabric.generated; + +/** Samples for RoutePolicies ValidateConfiguration. */ +public final class RoutePoliciesValidateConfigurationSamples { + /* + * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_ValidateConfiguration_MaximumSet_Gen.json + */ + /** + * Sample code: RoutePolicies_ValidateConfiguration_MaximumSet_Gen. + * + * @param manager Entry point to ManagedNetworkFabricManager. + */ + public static void routePoliciesValidateConfigurationMaximumSetGen( + com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) { + manager + .routePolicies() + .validateConfiguration("example-rg", "example-routePolicy", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListConditionPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListConditionPropertiesTests.java deleted file mode 100644 index 16810a8b194c2..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListConditionPropertiesTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListConditionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ConditionActionType; -import org.junit.jupiter.api.Assertions; - -public final class AccessControlListConditionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccessControlListConditionProperties model = - BinaryData - .fromString( - "{\"sequenceNumber\":173106164,\"action\":\"allow\",\"destinationAddress\":\"ithxqhabifpi\",\"destinationPort\":\"xwczbyscnp\",\"sourceAddress\":\"x\",\"sourcePort\":\"hiv\",\"protocol\":1742906904,\"annotation\":\"iwbybrkxvdumjg\"}") - .toObject(AccessControlListConditionProperties.class); - Assertions.assertEquals("iwbybrkxvdumjg", model.annotation()); - Assertions.assertEquals(173106164, model.sequenceNumber()); - Assertions.assertEquals(ConditionActionType.ALLOW, model.action()); - Assertions.assertEquals("ithxqhabifpi", model.destinationAddress()); - Assertions.assertEquals("xwczbyscnp", model.destinationPort()); - Assertions.assertEquals("x", model.sourceAddress()); - Assertions.assertEquals("hiv", model.sourcePort()); - Assertions.assertEquals(1742906904, model.protocol()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccessControlListConditionProperties model = - new AccessControlListConditionProperties() - .withAnnotation("iwbybrkxvdumjg") - .withSequenceNumber(173106164) - .withAction(ConditionActionType.ALLOW) - .withDestinationAddress("ithxqhabifpi") - .withDestinationPort("xwczbyscnp") - .withSourceAddress("x") - .withSourcePort("hiv") - .withProtocol(1742906904); - model = BinaryData.fromObject(model).toObject(AccessControlListConditionProperties.class); - Assertions.assertEquals("iwbybrkxvdumjg", model.annotation()); - Assertions.assertEquals(173106164, model.sequenceNumber()); - Assertions.assertEquals(ConditionActionType.ALLOW, model.action()); - Assertions.assertEquals("ithxqhabifpi", model.destinationAddress()); - Assertions.assertEquals("xwczbyscnp", model.destinationPort()); - Assertions.assertEquals("x", model.sourceAddress()); - Assertions.assertEquals("hiv", model.sourcePort()); - Assertions.assertEquals(1742906904, model.protocol()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListInnerTests.java deleted file mode 100644 index 88147f622b928..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListInnerTests.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListConditionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; -import com.azure.resourcemanager.managednetworkfabric.models.ConditionActionType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AccessControlListInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccessControlListInner model = - BinaryData - .fromString( - "{\"properties\":{\"addressFamily\":\"ipv6\",\"conditions\":[{\"sequenceNumber\":304908421,\"action\":\"deny\",\"destinationAddress\":\"uv\",\"destinationPort\":\"jxpybczmeh\",\"sourceAddress\":\"tzopbsphrupidgsy\",\"sourcePort\":\"bejhphoycmsxa\",\"protocol\":1376980829,\"annotation\":\"dxbmtqioq\"},{\"sequenceNumber\":1819090851,\"action\":\"allow\",\"destinationAddress\":\"htbmuf\",\"destinationPort\":\"ownoizhw\",\"sourceAddress\":\"rxybqsoq\",\"sourcePort\":\"jgkdmbpazlobcu\",\"protocol\":1769463111,\"annotation\":\"znrb\"},{\"sequenceNumber\":895933338,\"action\":\"allow\",\"destinationAddress\":\"qjnqglhqgnufoooj\",\"destinationPort\":\"wifsq\",\"sourceAddress\":\"saagdf\",\"sourcePort\":\"glzlhjxrifkwmrv\",\"protocol\":1604398792,\"annotation\":\"izntocipao\"}],\"provisioningState\":\"Updating\",\"annotation\":\"s\"},\"location\":\"cmpoyfdkfogkny\",\"tags\":{\"deupewnwrei\":\"fjddeqs\",\"arhmofcqhsmy\":\"jzyflu\"},\"id\":\"rkdtmlxh\",\"name\":\"kuksjtxukcdm\",\"type\":\"arcryuanzwuxzdxt\"}") - .toObject(AccessControlListInner.class); - Assertions.assertEquals("cmpoyfdkfogkny", model.location()); - Assertions.assertEquals("fjddeqs", model.tags().get("deupewnwrei")); - Assertions.assertEquals(AddressFamily.IPV6, model.addressFamily()); - Assertions.assertEquals("dxbmtqioq", model.conditions().get(0).annotation()); - Assertions.assertEquals(304908421, model.conditions().get(0).sequenceNumber()); - Assertions.assertEquals(ConditionActionType.DENY, model.conditions().get(0).action()); - Assertions.assertEquals("uv", model.conditions().get(0).destinationAddress()); - Assertions.assertEquals("jxpybczmeh", model.conditions().get(0).destinationPort()); - Assertions.assertEquals("tzopbsphrupidgsy", model.conditions().get(0).sourceAddress()); - Assertions.assertEquals("bejhphoycmsxa", model.conditions().get(0).sourcePort()); - Assertions.assertEquals(1376980829, model.conditions().get(0).protocol()); - Assertions.assertEquals("s", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccessControlListInner model = - new AccessControlListInner() - .withLocation("cmpoyfdkfogkny") - .withTags(mapOf("deupewnwrei", "fjddeqs", "arhmofcqhsmy", "jzyflu")) - .withAddressFamily(AddressFamily.IPV6) - .withConditions( - Arrays - .asList( - new AccessControlListConditionProperties() - .withAnnotation("dxbmtqioq") - .withSequenceNumber(304908421) - .withAction(ConditionActionType.DENY) - .withDestinationAddress("uv") - .withDestinationPort("jxpybczmeh") - .withSourceAddress("tzopbsphrupidgsy") - .withSourcePort("bejhphoycmsxa") - .withProtocol(1376980829), - new AccessControlListConditionProperties() - .withAnnotation("znrb") - .withSequenceNumber(1819090851) - .withAction(ConditionActionType.ALLOW) - .withDestinationAddress("htbmuf") - .withDestinationPort("ownoizhw") - .withSourceAddress("rxybqsoq") - .withSourcePort("jgkdmbpazlobcu") - .withProtocol(1769463111), - new AccessControlListConditionProperties() - .withAnnotation("izntocipao") - .withSequenceNumber(895933338) - .withAction(ConditionActionType.ALLOW) - .withDestinationAddress("qjnqglhqgnufoooj") - .withDestinationPort("wifsq") - .withSourceAddress("saagdf") - .withSourcePort("glzlhjxrifkwmrv") - .withProtocol(1604398792))) - .withAnnotation("s"); - model = BinaryData.fromObject(model).toObject(AccessControlListInner.class); - Assertions.assertEquals("cmpoyfdkfogkny", model.location()); - Assertions.assertEquals("fjddeqs", model.tags().get("deupewnwrei")); - Assertions.assertEquals(AddressFamily.IPV6, model.addressFamily()); - Assertions.assertEquals("dxbmtqioq", model.conditions().get(0).annotation()); - Assertions.assertEquals(304908421, model.conditions().get(0).sequenceNumber()); - Assertions.assertEquals(ConditionActionType.DENY, model.conditions().get(0).action()); - Assertions.assertEquals("uv", model.conditions().get(0).destinationAddress()); - Assertions.assertEquals("jxpybczmeh", model.conditions().get(0).destinationPort()); - Assertions.assertEquals("tzopbsphrupidgsy", model.conditions().get(0).sourceAddress()); - Assertions.assertEquals("bejhphoycmsxa", model.conditions().get(0).sourcePort()); - Assertions.assertEquals(1376980829, model.conditions().get(0).protocol()); - Assertions.assertEquals("s", model.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchPropertiesTests.java deleted file mode 100644 index 3356c11747552..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchPropertiesTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListPatchProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListConditionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; -import com.azure.resourcemanager.managednetworkfabric.models.ConditionActionType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AccessControlListPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccessControlListPatchProperties model = - BinaryData - .fromString( - "{\"addressFamily\":\"ipv6\",\"conditions\":[{\"sequenceNumber\":518831868,\"action\":\"allow\",\"destinationAddress\":\"lahbcryff\",\"destinationPort\":\"fdosyg\",\"sourceAddress\":\"xpaojakhmsbz\",\"sourcePort\":\"hcrzevd\",\"protocol\":656929943,\"annotation\":\"xaolth\"},{\"sequenceNumber\":578472109,\"action\":\"deny\",\"destinationAddress\":\"gqjbpfzfsin\",\"destinationPort\":\"gvfcj\",\"sourceAddress\":\"wzo\",\"sourcePort\":\"xjtfelluwfzit\",\"protocol\":354282788,\"annotation\":\"eqfpj\"}],\"annotation\":\"lxofpdvhpfxxypin\"}") - .toObject(AccessControlListPatchProperties.class); - Assertions.assertEquals("lxofpdvhpfxxypin", model.annotation()); - Assertions.assertEquals(AddressFamily.IPV6, model.addressFamily()); - Assertions.assertEquals("xaolth", model.conditions().get(0).annotation()); - Assertions.assertEquals(518831868, model.conditions().get(0).sequenceNumber()); - Assertions.assertEquals(ConditionActionType.ALLOW, model.conditions().get(0).action()); - Assertions.assertEquals("lahbcryff", model.conditions().get(0).destinationAddress()); - Assertions.assertEquals("fdosyg", model.conditions().get(0).destinationPort()); - Assertions.assertEquals("xpaojakhmsbz", model.conditions().get(0).sourceAddress()); - Assertions.assertEquals("hcrzevd", model.conditions().get(0).sourcePort()); - Assertions.assertEquals(656929943, model.conditions().get(0).protocol()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccessControlListPatchProperties model = - new AccessControlListPatchProperties() - .withAnnotation("lxofpdvhpfxxypin") - .withAddressFamily(AddressFamily.IPV6) - .withConditions( - Arrays - .asList( - new AccessControlListConditionProperties() - .withAnnotation("xaolth") - .withSequenceNumber(518831868) - .withAction(ConditionActionType.ALLOW) - .withDestinationAddress("lahbcryff") - .withDestinationPort("fdosyg") - .withSourceAddress("xpaojakhmsbz") - .withSourcePort("hcrzevd") - .withProtocol(656929943), - new AccessControlListConditionProperties() - .withAnnotation("eqfpj") - .withSequenceNumber(578472109) - .withAction(ConditionActionType.DENY) - .withDestinationAddress("gqjbpfzfsin") - .withDestinationPort("gvfcj") - .withSourceAddress("wzo") - .withSourcePort("xjtfelluwfzit") - .withProtocol(354282788))); - model = BinaryData.fromObject(model).toObject(AccessControlListPatchProperties.class); - Assertions.assertEquals("lxofpdvhpfxxypin", model.annotation()); - Assertions.assertEquals(AddressFamily.IPV6, model.addressFamily()); - Assertions.assertEquals("xaolth", model.conditions().get(0).annotation()); - Assertions.assertEquals(518831868, model.conditions().get(0).sequenceNumber()); - Assertions.assertEquals(ConditionActionType.ALLOW, model.conditions().get(0).action()); - Assertions.assertEquals("lahbcryff", model.conditions().get(0).destinationAddress()); - Assertions.assertEquals("fdosyg", model.conditions().get(0).destinationPort()); - Assertions.assertEquals("xpaojakhmsbz", model.conditions().get(0).sourceAddress()); - Assertions.assertEquals("hcrzevd", model.conditions().get(0).sourcePort()); - Assertions.assertEquals(656929943, model.conditions().get(0).protocol()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchTests.java deleted file mode 100644 index dfd51f36149e1..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPatchTests.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListConditionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListPatch; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; -import com.azure.resourcemanager.managednetworkfabric.models.ConditionActionType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AccessControlListPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccessControlListPatch model = - BinaryData - .fromString( - "{\"properties\":{\"addressFamily\":\"ipv6\",\"conditions\":[{\"sequenceNumber\":300178324,\"action\":\"deny\",\"destinationAddress\":\"nhsjcnyej\",\"destinationPort\":\"kryhtnapczwlokj\",\"sourceAddress\":\"emkkvnipjox\",\"sourcePort\":\"jnchgej\",\"protocol\":1948326965,\"annotation\":\"dmailzydehojw\"},{\"sequenceNumber\":2010120941,\"action\":\"deny\",\"destinationAddress\":\"uxinpmqnjaq\",\"destinationPort\":\"ixjsprozvcputeg\",\"sourceAddress\":\"vwmf\",\"sourcePort\":\"atscmd\",\"protocol\":883957794,\"annotation\":\"hulsuuvmkjozkrwf\"}],\"annotation\":\"iodjp\"},\"tags\":{\"pvwryoqpsoacc\":\"ej\"}}") - .toObject(AccessControlListPatch.class); - Assertions.assertEquals("ej", model.tags().get("pvwryoqpsoacc")); - Assertions.assertEquals(AddressFamily.IPV6, model.addressFamily()); - Assertions.assertEquals("dmailzydehojw", model.conditions().get(0).annotation()); - Assertions.assertEquals(300178324, model.conditions().get(0).sequenceNumber()); - Assertions.assertEquals(ConditionActionType.DENY, model.conditions().get(0).action()); - Assertions.assertEquals("nhsjcnyej", model.conditions().get(0).destinationAddress()); - Assertions.assertEquals("kryhtnapczwlokj", model.conditions().get(0).destinationPort()); - Assertions.assertEquals("emkkvnipjox", model.conditions().get(0).sourceAddress()); - Assertions.assertEquals("jnchgej", model.conditions().get(0).sourcePort()); - Assertions.assertEquals(1948326965, model.conditions().get(0).protocol()); - Assertions.assertEquals("iodjp", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccessControlListPatch model = - new AccessControlListPatch() - .withTags(mapOf("pvwryoqpsoacc", "ej")) - .withAddressFamily(AddressFamily.IPV6) - .withConditions( - Arrays - .asList( - new AccessControlListConditionProperties() - .withAnnotation("dmailzydehojw") - .withSequenceNumber(300178324) - .withAction(ConditionActionType.DENY) - .withDestinationAddress("nhsjcnyej") - .withDestinationPort("kryhtnapczwlokj") - .withSourceAddress("emkkvnipjox") - .withSourcePort("jnchgej") - .withProtocol(1948326965), - new AccessControlListConditionProperties() - .withAnnotation("hulsuuvmkjozkrwf") - .withSequenceNumber(2010120941) - .withAction(ConditionActionType.DENY) - .withDestinationAddress("uxinpmqnjaq") - .withDestinationPort("ixjsprozvcputeg") - .withSourceAddress("vwmf") - .withSourcePort("atscmd") - .withProtocol(883957794))) - .withAnnotation("iodjp"); - model = BinaryData.fromObject(model).toObject(AccessControlListPatch.class); - Assertions.assertEquals("ej", model.tags().get("pvwryoqpsoacc")); - Assertions.assertEquals(AddressFamily.IPV6, model.addressFamily()); - Assertions.assertEquals("dmailzydehojw", model.conditions().get(0).annotation()); - Assertions.assertEquals(300178324, model.conditions().get(0).sequenceNumber()); - Assertions.assertEquals(ConditionActionType.DENY, model.conditions().get(0).action()); - Assertions.assertEquals("nhsjcnyej", model.conditions().get(0).destinationAddress()); - Assertions.assertEquals("kryhtnapczwlokj", model.conditions().get(0).destinationPort()); - Assertions.assertEquals("emkkvnipjox", model.conditions().get(0).sourceAddress()); - Assertions.assertEquals("jnchgej", model.conditions().get(0).sourcePort()); - Assertions.assertEquals(1948326965, model.conditions().get(0).protocol()); - Assertions.assertEquals("iodjp", model.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPropertiesTests.java deleted file mode 100644 index 8aebade4721ba..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListPropertiesTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListConditionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; -import com.azure.resourcemanager.managednetworkfabric.models.ConditionActionType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AccessControlListPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccessControlListProperties model = - BinaryData - .fromString( - "{\"addressFamily\":\"ipv6\",\"conditions\":[{\"sequenceNumber\":1199777759,\"action\":\"deny\",\"destinationAddress\":\"m\",\"destinationPort\":\"hfpmrqobmtukknr\",\"sourceAddress\":\"rtihfxtijbpz\",\"sourcePort\":\"gnwzsymglzufc\",\"protocol\":504117688,\"annotation\":\"ohdbihanufh\"}],\"provisioningState\":\"Canceled\",\"annotation\":\"y\"}") - .toObject(AccessControlListProperties.class); - Assertions.assertEquals("y", model.annotation()); - Assertions.assertEquals(AddressFamily.IPV6, model.addressFamily()); - Assertions.assertEquals("ohdbihanufh", model.conditions().get(0).annotation()); - Assertions.assertEquals(1199777759, model.conditions().get(0).sequenceNumber()); - Assertions.assertEquals(ConditionActionType.DENY, model.conditions().get(0).action()); - Assertions.assertEquals("m", model.conditions().get(0).destinationAddress()); - Assertions.assertEquals("hfpmrqobmtukknr", model.conditions().get(0).destinationPort()); - Assertions.assertEquals("rtihfxtijbpz", model.conditions().get(0).sourceAddress()); - Assertions.assertEquals("gnwzsymglzufc", model.conditions().get(0).sourcePort()); - Assertions.assertEquals(504117688, model.conditions().get(0).protocol()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccessControlListProperties model = - new AccessControlListProperties() - .withAnnotation("y") - .withAddressFamily(AddressFamily.IPV6) - .withConditions( - Arrays - .asList( - new AccessControlListConditionProperties() - .withAnnotation("ohdbihanufh") - .withSequenceNumber(1199777759) - .withAction(ConditionActionType.DENY) - .withDestinationAddress("m") - .withDestinationPort("hfpmrqobmtukknr") - .withSourceAddress("rtihfxtijbpz") - .withSourcePort("gnwzsymglzufc") - .withProtocol(504117688))); - model = BinaryData.fromObject(model).toObject(AccessControlListProperties.class); - Assertions.assertEquals("y", model.annotation()); - Assertions.assertEquals(AddressFamily.IPV6, model.addressFamily()); - Assertions.assertEquals("ohdbihanufh", model.conditions().get(0).annotation()); - Assertions.assertEquals(1199777759, model.conditions().get(0).sequenceNumber()); - Assertions.assertEquals(ConditionActionType.DENY, model.conditions().get(0).action()); - Assertions.assertEquals("m", model.conditions().get(0).destinationAddress()); - Assertions.assertEquals("hfpmrqobmtukknr", model.conditions().get(0).destinationPort()); - Assertions.assertEquals("rtihfxtijbpz", model.conditions().get(0).sourceAddress()); - Assertions.assertEquals("gnwzsymglzufc", model.conditions().get(0).sourcePort()); - Assertions.assertEquals(504117688, model.conditions().get(0).protocol()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateWithResponseMockTests.java deleted file mode 100644 index 8fe42d888d344..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsCreateWithResponseMockTests.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AccessControlListsCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"addressFamily\":\"ipv4\",\"conditions\":[],\"provisioningState\":\"Canceled\",\"annotation\":\"pgoxgji\"},\"location\":\"hibtozipqwjedmur\",\"tags\":{\"wpktvqylkmqpzoyh\":\"g\"},\"id\":\"fbcgwgcloxoebqin\",\"name\":\"ipnwj\",\"type\":\"ujqlafcbahh\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AccessControlList response = - manager - .accessControlLists() - .define("fpgpicrmnzhrgm") - .withRegion("vriibakclacjfr") - .withExistingResourceGroup("wiwtglxxhl") - .withAddressFamily(AddressFamily.IPV4) - .withConditions(Arrays.asList()) - .withTags( - mapOf( - "uzlwvsgmw", - "usx", - "izvu", - "hqf", - "vmribiat", - "mmkjsvthnwpztek", - "zcugswvxwlmzqw", - "gplucfotangcfhny")) - .withAnnotation("pqcbfrmbodthsq") - .create(); - - Assertions.assertEquals("hibtozipqwjedmur", response.location()); - Assertions.assertEquals("g", response.tags().get("wpktvqylkmqpzoyh")); - Assertions.assertEquals(AddressFamily.IPV4, response.addressFamily()); - Assertions.assertEquals("pgoxgji", response.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsDeleteByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsDeleteByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 80518d7321771..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AccessControlListsDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .accessControlLists() - .deleteByResourceGroupWithResponse("uyilflqoiquvrehm", "njhvsujztc", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 3990438e12871..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AccessControlListsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"addressFamily\":\"ipv6\",\"conditions\":[],\"provisioningState\":\"Failed\",\"annotation\":\"xpxiwfcngjs\"},\"location\":\"sii\",\"tags\":{\"viirhgfgrws\":\"kzjv\",\"tctbrxkjzwrgxffm\":\"pgratzvzbglbyvi\",\"bydpizqaclnapxb\":\"hkwfbkgozxwop\"},\"id\":\"yg\",\"name\":\"ugjknf\",\"type\":\"mfcttux\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AccessControlList response = - manager - .accessControlLists() - .getByResourceGroupWithResponse("hlisngw", "lqqmpiz", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("sii", response.location()); - Assertions.assertEquals("kzjv", response.tags().get("viirhgfgrws")); - Assertions.assertEquals(AddressFamily.IPV6, response.addressFamily()); - Assertions.assertEquals("xpxiwfcngjs", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListByResourceGroupMockTests.java deleted file mode 100644 index 990c66f16d0e4..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListByResourceGroupMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AccessControlListsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"addressFamily\":\"ipv4\",\"conditions\":[],\"provisioningState\":\"Updating\",\"annotation\":\"nfprnjletlxs\"},\"location\":\"pddouifamowaziyn\",\"tags\":{\"zdtmaajquhuxylrj\":\"qwzdvpiwhxq\",\"ygjbmzyospspsh\":\"m\",\"sp\":\"kfkyjp\",\"ujtv\":\"pssdfppyogtie\"},\"id\":\"zkc\",\"name\":\"yxrxmunj\",\"type\":\"xvglnkvxlxp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.accessControlLists().listByResourceGroup("ytqj", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pddouifamowaziyn", response.iterator().next().location()); - Assertions.assertEquals("qwzdvpiwhxq", response.iterator().next().tags().get("zdtmaajquhuxylrj")); - Assertions.assertEquals(AddressFamily.IPV4, response.iterator().next().addressFamily()); - Assertions.assertEquals("nfprnjletlxs", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListMockTests.java deleted file mode 100644 index a6167ef6f7bb9..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlList; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AccessControlListsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"addressFamily\":\"ipv6\",\"conditions\":[],\"provisioningState\":\"Succeeded\",\"annotation\":\"bgkc\"},\"location\":\"hpzvuqdflvoniyp\",\"tags\":{\"knidib\":\"bcpzgpxtivh\",\"kqmhhaowjr\":\"qjxgpnrhgovfgp\",\"kfvxcnq\":\"zvuporqzdfuydz\"},\"id\":\"xqpswok\",\"name\":\"vkhlggdhbemz\",\"type\":\"kzsz\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.accessControlLists().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hpzvuqdflvoniyp", response.iterator().next().location()); - Assertions.assertEquals("bcpzgpxtivh", response.iterator().next().tags().get("knidib")); - Assertions.assertEquals(AddressFamily.IPV6, response.iterator().next().addressFamily()); - Assertions.assertEquals("bgkc", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListResultTests.java deleted file mode 100644 index 468c9c5ff552f..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AccessControlListsListResultTests.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.AccessControlListInner; -import com.azure.resourcemanager.managednetworkfabric.models.AccessControlListsListResult; -import com.azure.resourcemanager.managednetworkfabric.models.AddressFamily; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AccessControlListsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccessControlListsListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"addressFamily\":\"ipv4\",\"conditions\":[],\"provisioningState\":\"Updating\",\"annotation\":\"ybb\"},\"location\":\"odepoogin\",\"tags\":{\"gnarxzxtheo\":\"mihe\",\"cciqihnhungbwjz\":\"usivye\",\"kufubljo\":\"nfygxgispemvtz\"},\"id\":\"xqeofjaeqjhqjba\",\"name\":\"v\",\"type\":\"smjqulngsntnbyb\"},{\"properties\":{\"addressFamily\":\"ipv4\",\"conditions\":[],\"provisioningState\":\"Failed\",\"annotation\":\"rwclxxwrljdo\"},\"location\":\"kcqvkocrc\",\"tags\":{\"lssai\":\"wtnhxbnjbiksqr\"},\"id\":\"qpjwnzlljfm\",\"name\":\"pee\",\"type\":\"vmgxsab\"},{\"properties\":{\"addressFamily\":\"ipv4\",\"conditions\":[],\"provisioningState\":\"Canceled\",\"annotation\":\"ujitcjcz\"},\"location\":\"evndh\",\"tags\":{\"dkvwrwjfe\":\"pdappds\",\"je\":\"snhu\",\"hocdgeab\":\"tmrldhugjzzdatq\"},\"id\":\"gphuticndvka\",\"name\":\"zwyiftyhxhur\",\"type\":\"k\"},{\"properties\":{\"addressFamily\":\"ipv6\",\"conditions\":[],\"provisioningState\":\"Failed\",\"annotation\":\"lniwpwcukjfkgiaw\"},\"location\":\"lryplwckbasyy\",\"tags\":{\"phejkotynqgoulz\":\"dhsgcba\",\"gakeqsr\":\"dlikwyqkgfgibma\",\"qqedqytbciqfou\":\"yb\"},\"id\":\"lmmnkzsmodmglo\",\"name\":\"gpbkwtmut\",\"type\":\"uqktap\"}],\"nextLink\":\"wgcu\"}") - .toObject(AccessControlListsListResult.class); - Assertions.assertEquals("odepoogin", model.value().get(0).location()); - Assertions.assertEquals("mihe", model.value().get(0).tags().get("gnarxzxtheo")); - Assertions.assertEquals(AddressFamily.IPV4, model.value().get(0).addressFamily()); - Assertions.assertEquals("ybb", model.value().get(0).annotation()); - Assertions.assertEquals("wgcu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccessControlListsListResult model = - new AccessControlListsListResult() - .withValue( - Arrays - .asList( - new AccessControlListInner() - .withLocation("odepoogin") - .withTags( - mapOf( - "gnarxzxtheo", - "mihe", - "cciqihnhungbwjz", - "usivye", - "kufubljo", - "nfygxgispemvtz")) - .withAddressFamily(AddressFamily.IPV4) - .withConditions(Arrays.asList()) - .withAnnotation("ybb"), - new AccessControlListInner() - .withLocation("kcqvkocrc") - .withTags(mapOf("lssai", "wtnhxbnjbiksqr")) - .withAddressFamily(AddressFamily.IPV4) - .withConditions(Arrays.asList()) - .withAnnotation("rwclxxwrljdo"), - new AccessControlListInner() - .withLocation("evndh") - .withTags(mapOf("dkvwrwjfe", "pdappds", "je", "snhu", "hocdgeab", "tmrldhugjzzdatq")) - .withAddressFamily(AddressFamily.IPV4) - .withConditions(Arrays.asList()) - .withAnnotation("ujitcjcz"), - new AccessControlListInner() - .withLocation("lryplwckbasyy") - .withTags( - mapOf( - "phejkotynqgoulz", - "dhsgcba", - "gakeqsr", - "dlikwyqkgfgibma", - "qqedqytbciqfou", - "yb")) - .withAddressFamily(AddressFamily.IPV6) - .withConditions(Arrays.asList()) - .withAnnotation("lniwpwcukjfkgiaw"))) - .withNextLink("wgcu"); - model = BinaryData.fromObject(model).toObject(AccessControlListsListResult.class); - Assertions.assertEquals("odepoogin", model.value().get(0).location()); - Assertions.assertEquals("mihe", model.value().get(0).tags().get("gnarxzxtheo")); - Assertions.assertEquals(AddressFamily.IPV4, model.value().get(0).addressFamily()); - Assertions.assertEquals("ybb", model.value().get(0).annotation()); - Assertions.assertEquals("wgcu", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpCommunityPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpCommunityPropertiesTests.java deleted file mode 100644 index 94734d729bde3..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpCommunityPropertiesTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ActionIpCommunityPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ActionIpCommunityProperties model = - BinaryData - .fromString( - "{\"delete\":{\"ipCommunityIds\":[\"qxeiiqbimhtmwwi\",\"h\",\"hfqpofv\"]},\"set\":{\"ipCommunityIds\":[\"lembnkbwvqvxkdi\",\"qihebw\",\"swbzuwfmdurage\",\"izvcjfe\"]},\"add\":{\"ipCommunityIds\":[\"jubggbqigkxkb\"]}}") - .toObject(ActionIpCommunityProperties.class); - Assertions.assertEquals("jubggbqigkxkb", model.add().ipCommunityIds().get(0)); - Assertions.assertEquals("qxeiiqbimhtmwwi", model.delete().ipCommunityIds().get(0)); - Assertions.assertEquals("lembnkbwvqvxkdi", model.set().ipCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ActionIpCommunityProperties model = - new ActionIpCommunityProperties() - .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("jubggbqigkxkb"))) - .withDelete( - new IpCommunityIdList().withIpCommunityIds(Arrays.asList("qxeiiqbimhtmwwi", "h", "hfqpofv"))) - .withSet( - new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("lembnkbwvqvxkdi", "qihebw", "swbzuwfmdurage", "izvcjfe"))); - model = BinaryData.fromObject(model).toObject(ActionIpCommunityProperties.class); - Assertions.assertEquals("jubggbqigkxkb", model.add().ipCommunityIds().get(0)); - Assertions.assertEquals("qxeiiqbimhtmwwi", model.delete().ipCommunityIds().get(0)); - Assertions.assertEquals("lembnkbwvqvxkdi", model.set().ipCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpExtendedCommunityPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpExtendedCommunityPropertiesTests.java deleted file mode 100644 index b7493d48d5dda..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ActionIpExtendedCommunityPropertiesTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ActionIpExtendedCommunityPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ActionIpExtendedCommunityProperties model = - BinaryData - .fromString( - "{\"delete\":{\"ipExtendedCommunityIds\":[\"iwbuqny\",\"phzfylsgcrp\",\"bcunezzceze\"]},\"set\":{\"ipExtendedCommunityIds\":[\"fwlwxjwetnps\",\"hclafzvaylptrs\",\"qwztcmwqkc\"]},\"add\":{\"ipExtendedCommunityIds\":[\"axfe\",\"zjkjexfdeqv\",\"psylkkshkbffmbmx\"]}}") - .toObject(ActionIpExtendedCommunityProperties.class); - Assertions.assertEquals("axfe", model.add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("iwbuqny", model.delete().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("fwlwxjwetnps", model.set().ipExtendedCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ActionIpExtendedCommunityProperties model = - new ActionIpExtendedCommunityProperties() - .withAdd( - new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("axfe", "zjkjexfdeqv", "psylkkshkbffmbmx"))) - .withDelete( - new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("iwbuqny", "phzfylsgcrp", "bcunezzceze"))) - .withSet( - new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("fwlwxjwetnps", "hclafzvaylptrs", "qwztcmwqkc"))); - model = BinaryData.fromObject(model).toObject(ActionIpExtendedCommunityProperties.class); - Assertions.assertEquals("axfe", model.add().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("iwbuqny", model.delete().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals("fwlwxjwetnps", model.set().ipExtendedCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRouteConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRouteConfigurationTests.java deleted file mode 100644 index 3c49ef0369859..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRouteConfigurationTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AggregateRouteConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AggregateRouteConfiguration model = - BinaryData - .fromString( - "{\"ipv4Routes\":[{\"prefix\":\"pnvjtoqnermclf\"},{\"prefix\":\"phoxus\"}],\"ipv6Routes\":[{\"prefix\":\"bgyepsbj\"},{\"prefix\":\"zq\"}]}") - .toObject(AggregateRouteConfiguration.class); - Assertions.assertEquals("pnvjtoqnermclf", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("bgyepsbj", model.ipv6Routes().get(0).prefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AggregateRouteConfiguration model = - new AggregateRouteConfiguration() - .withIpv4Routes( - Arrays - .asList( - new AggregateRoute().withPrefix("pnvjtoqnermclf"), - new AggregateRoute().withPrefix("phoxus"))) - .withIpv6Routes( - Arrays.asList(new AggregateRoute().withPrefix("bgyepsbj"), new AggregateRoute().withPrefix("zq"))); - model = BinaryData.fromObject(model).toObject(AggregateRouteConfiguration.class); - Assertions.assertEquals("pnvjtoqnermclf", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("bgyepsbj", model.ipv6Routes().get(0).prefix()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRouteTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRouteTests.java deleted file mode 100644 index 609068e90a685..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AggregateRouteTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; -import org.junit.jupiter.api.Assertions; - -public final class AggregateRouteTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AggregateRoute model = - BinaryData.fromString("{\"prefix\":\"xywpmueefjzwfqkq\"}").toObject(AggregateRoute.class); - Assertions.assertEquals("xywpmueefjzwfqkq", model.prefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AggregateRoute model = new AggregateRoute().withPrefix("xywpmueefjzwfqkq"); - model = BinaryData.fromObject(model).toObject(AggregateRoute.class); - Assertions.assertEquals("xywpmueefjzwfqkq", model.prefix()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AnnotationResourceTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AnnotationResourceTests.java deleted file mode 100644 index db6fab2a58d8a..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/AnnotationResourceTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.AnnotationResource; -import org.junit.jupiter.api.Assertions; - -public final class AnnotationResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AnnotationResource model = - BinaryData.fromString("{\"annotation\":\"fwvuk\"}").toObject(AnnotationResource.class); - Assertions.assertEquals("fwvuk", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AnnotationResource model = new AnnotationResource().withAnnotation("fwvuk"); - model = BinaryData.fromObject(model).toObject(AnnotationResource.class); - Assertions.assertEquals("fwvuk", model.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ArpPropertiesInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ArpPropertiesInnerTests.java deleted file mode 100644 index 7c952513c1b1d..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ArpPropertiesInnerTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.ArpPropertiesInner; -import org.junit.jupiter.api.Assertions; - -public final class ArpPropertiesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ArpPropertiesInner model = - BinaryData - .fromString( - "{\"address\":\"tvfcivfsn\",\"age\":\"ymuctqhjfbebrj\",\"macAddress\":\"xerf\",\"interface\":\"wutttxfvjrbi\",\"state\":\"hxepcyvahfnlj\"}") - .toObject(ArpPropertiesInner.class); - Assertions.assertEquals("tvfcivfsn", model.address()); - Assertions.assertEquals("ymuctqhjfbebrj", model.age()); - Assertions.assertEquals("xerf", model.macAddress()); - Assertions.assertEquals("wutttxfvjrbi", model.interfaceProperty()); - Assertions.assertEquals("hxepcyvahfnlj", model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ArpPropertiesInner model = - new ArpPropertiesInner() - .withAddress("tvfcivfsn") - .withAge("ymuctqhjfbebrj") - .withMacAddress("xerf") - .withInterfaceProperty("wutttxfvjrbi") - .withState("hxepcyvahfnlj"); - model = BinaryData.fromObject(model).toObject(ArpPropertiesInner.class); - Assertions.assertEquals("tvfcivfsn", model.address()); - Assertions.assertEquals("ymuctqhjfbebrj", model.age()); - Assertions.assertEquals("xerf", model.macAddress()); - Assertions.assertEquals("wutttxfvjrbi", model.interfaceProperty()); - Assertions.assertEquals("hxepcyvahfnlj", model.state()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BfdConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BfdConfigurationTests.java deleted file mode 100644 index 76c144e64c020..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BfdConfigurationTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; - -public final class BfdConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BfdConfiguration model = - BinaryData - .fromString("{\"administrativeState\":\"Disabled\",\"interval\":1262943142,\"multiplier\":823230249}") - .toObject(BfdConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BfdConfiguration model = new BfdConfiguration(); - model = BinaryData.fromObject(model).toObject(BfdConfiguration.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BgpConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BgpConfigurationTests.java deleted file mode 100644 index de855081011ab..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/BgpConfigurationTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BgpConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BgpConfiguration model = - BinaryData - .fromString( - "{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"interval\":38368134,\"multiplier\":749326216},\"defaultRouteOriginate\":\"False\",\"allowAS\":1114834303,\"allowASOverride\":\"Disable\",\"fabricASN\":884783389,\"peerASN\":90280554,\"ipv4ListenRangePrefixes\":[\"zar\"],\"ipv6ListenRangePrefixes\":[\"q\",\"uijfqk\",\"cewiipfpub\",\"ibwwiftohqkv\"],\"ipv4NeighborAddress\":[{\"address\":\"sgplsakn\",\"operationalState\":\"fsynljphuop\"},{\"address\":\"dlqiyntorzih\",\"operationalState\":\"osjswsr\"},{\"address\":\"lyzrpzbchckqqzqi\",\"operationalState\":\"iysui\"},{\"address\":\"ynkedyatrwyhqmib\",\"operationalState\":\"hwit\"}],\"ipv6NeighborAddress\":[{\"address\":\"yynpcdpumnzgmwz\",\"operationalState\":\"abikns\"},{\"address\":\"gj\",\"operationalState\":\"bldtlww\"},{\"address\":\"kdmtncvokotll\",\"operationalState\":\"yhgsy\"},{\"address\":\"ogjltdtbnnhad\",\"operationalState\":\"crkvcikhnv\"}],\"annotation\":\"mqg\"}") - .toObject(BgpConfiguration.class); - Assertions.assertEquals("mqg", model.annotation()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.defaultRouteOriginate()); - Assertions.assertEquals(1114834303, model.allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.allowASOverride()); - Assertions.assertEquals(90280554, model.peerAsn()); - Assertions.assertEquals("zar", model.ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("q", model.ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("sgplsakn", model.ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("yynpcdpumnzgmwz", model.ipv6NeighborAddress().get(0).address()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BgpConfiguration model = - new BgpConfiguration() - .withAnnotation("mqg") - .withBfdConfiguration(new BfdConfiguration()) - .withDefaultRouteOriginate(BooleanEnumProperty.FALSE) - .withAllowAS(1114834303) - .withAllowASOverride(AllowASOverride.DISABLE) - .withPeerAsn(90280554) - .withIpv4ListenRangePrefixes(Arrays.asList("zar")) - .withIpv6ListenRangePrefixes(Arrays.asList("q", "uijfqk", "cewiipfpub", "ibwwiftohqkv")) - .withIpv4NeighborAddress( - Arrays - .asList( - new NeighborAddress().withAddress("sgplsakn"), - new NeighborAddress().withAddress("dlqiyntorzih"), - new NeighborAddress().withAddress("lyzrpzbchckqqzqi"), - new NeighborAddress().withAddress("ynkedyatrwyhqmib"))) - .withIpv6NeighborAddress( - Arrays - .asList( - new NeighborAddress().withAddress("yynpcdpumnzgmwz"), - new NeighborAddress().withAddress("gj"), - new NeighborAddress().withAddress("kdmtncvokotll"), - new NeighborAddress().withAddress("ogjltdtbnnhad"))); - model = BinaryData.fromObject(model).toObject(BgpConfiguration.class); - Assertions.assertEquals("mqg", model.annotation()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.defaultRouteOriginate()); - Assertions.assertEquals(1114834303, model.allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.allowASOverride()); - Assertions.assertEquals(90280554, model.peerAsn()); - Assertions.assertEquals("zar", model.ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("q", model.ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("sgplsakn", model.ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("yynpcdpumnzgmwz", model.ipv6NeighborAddress().get(0).address()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetTests.java deleted file mode 100644 index 7a44fd814363d..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ConnectedSubnetTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; -import org.junit.jupiter.api.Assertions; - -public final class ConnectedSubnetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConnectedSubnet model = - BinaryData - .fromString("{\"prefix\":\"vypomgkopkwho\",\"annotation\":\"pajqgxysm\"}") - .toObject(ConnectedSubnet.class); - Assertions.assertEquals("pajqgxysm", model.annotation()); - Assertions.assertEquals("vypomgkopkwho", model.prefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConnectedSubnet model = new ConnectedSubnet().withAnnotation("pajqgxysm").withPrefix("vypomgkopkwho"); - model = BinaryData.fromObject(model).toObject(ConnectedSubnet.class); - Assertions.assertEquals("pajqgxysm", model.annotation()); - Assertions.assertEquals("vypomgkopkwho", model.prefix()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceInterfacePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceInterfacePropertiesTests.java deleted file mode 100644 index 331eae0f30718..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceInterfacePropertiesTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedConnectorProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DeviceInterfacePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeviceInterfaceProperties model = - BinaryData - .fromString( - "{\"identifier\":\"ywvtylbfpnc\",\"interfaceType\":\"doiwi\",\"supportedConnectorTypes\":[{\"connectorType\":\"ywub\",\"maxSpeedInMbps\":709721668},{\"connectorType\":\"h\",\"maxSpeedInMbps\":1060824316},{\"connectorType\":\"fdntwjchrdgoih\",\"maxSpeedInMbps\":1654736009},{\"connectorType\":\"ctondz\",\"maxSpeedInMbps\":518244659}]}") - .toObject(DeviceInterfaceProperties.class); - Assertions.assertEquals("ywvtylbfpnc", model.identifier()); - Assertions.assertEquals("doiwi", model.interfaceType()); - Assertions.assertEquals("ywub", model.supportedConnectorTypes().get(0).connectorType()); - Assertions.assertEquals(709721668, model.supportedConnectorTypes().get(0).maxSpeedInMbps()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceInterfaceProperties model = - new DeviceInterfaceProperties() - .withIdentifier("ywvtylbfpnc") - .withInterfaceType("doiwi") - .withSupportedConnectorTypes( - Arrays - .asList( - new SupportedConnectorProperties().withConnectorType("ywub").withMaxSpeedInMbps(709721668), - new SupportedConnectorProperties().withConnectorType("h").withMaxSpeedInMbps(1060824316), - new SupportedConnectorProperties() - .withConnectorType("fdntwjchrdgoih") - .withMaxSpeedInMbps(1654736009), - new SupportedConnectorProperties() - .withConnectorType("ctondz") - .withMaxSpeedInMbps(518244659))); - model = BinaryData.fromObject(model).toObject(DeviceInterfaceProperties.class); - Assertions.assertEquals("ywvtylbfpnc", model.identifier()); - Assertions.assertEquals("doiwi", model.interfaceType()); - Assertions.assertEquals("ywub", model.supportedConnectorTypes().get(0).connectorType()); - Assertions.assertEquals(709721668, model.supportedConnectorTypes().get(0).maxSpeedInMbps()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceLimitsTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceLimitsTests.java deleted file mode 100644 index d6ba154d972f9..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/DeviceLimitsTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceLimits; -import org.junit.jupiter.api.Assertions; - -public final class DeviceLimitsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeviceLimits model = - BinaryData - .fromString( - "{\"physicalInterfaceCount\":1240689127,\"maxSubInterfaces\":320221155,\"maxTunnelInterfaces\":156092628,\"maxVirtualRouterFunctions\":1511616464,\"maxBorderGatewayProtocolPeers\":287041746,\"maxBidirectionalForwardingDetectionPeers\":1202424668}") - .toObject(DeviceLimits.class); - Assertions.assertEquals(1240689127, model.physicalInterfaceCount()); - Assertions.assertEquals(320221155, model.maxSubInterfaces()); - Assertions.assertEquals(156092628, model.maxTunnelInterfaces()); - Assertions.assertEquals(1511616464, model.maxVirtualRouterFunctions()); - Assertions.assertEquals(287041746, model.maxBorderGatewayProtocolPeers()); - Assertions.assertEquals(1202424668, model.maxBidirectionalForwardingDetectionPeers()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceLimits model = - new DeviceLimits() - .withPhysicalInterfaceCount(1240689127) - .withMaxSubInterfaces(320221155) - .withMaxTunnelInterfaces(156092628) - .withMaxVirtualRouterFunctions(1511616464) - .withMaxBorderGatewayProtocolPeers(287041746) - .withMaxBidirectionalForwardingDetectionPeers(1202424668); - model = BinaryData.fromObject(model).toObject(DeviceLimits.class); - Assertions.assertEquals(1240689127, model.physicalInterfaceCount()); - Assertions.assertEquals(320221155, model.maxSubInterfaces()); - Assertions.assertEquals(156092628, model.maxTunnelInterfaces()); - Assertions.assertEquals(1511616464, model.maxVirtualRouterFunctions()); - Assertions.assertEquals(287041746, model.maxBorderGatewayProtocolPeers()); - Assertions.assertEquals(1202424668, model.maxBidirectionalForwardingDetectionPeers()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/EnableDisableOnResourcesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/EnableDisableOnResourcesTests.java deleted file mode 100644 index 408d1a7905f2e..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/EnableDisableOnResourcesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.EnableDisableOnResources; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EnableDisableOnResourcesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnableDisableOnResources model = - BinaryData - .fromString("{\"resourceIds\":[\"nhwlrsffrzpwvl\",\"dqgbiqylihkaetc\"]}") - .toObject(EnableDisableOnResources.class); - Assertions.assertEquals("nhwlrsffrzpwvl", model.resourceIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnableDisableOnResources model = - new EnableDisableOnResources().withResourceIds(Arrays.asList("nhwlrsffrzpwvl", "dqgbiqylihkaetc")); - model = BinaryData.fromObject(model).toObject(EnableDisableOnResources.class); - Assertions.assertEquals("nhwlrsffrzpwvl", model.resourceIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkInnerTests.java deleted file mode 100644 index 86ea5f9c63df9..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkInnerTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; -import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExternalNetworkInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExternalNetworkInner model = - BinaryData - .fromString( - "{\"properties\":{\"networkToNetworkInterconnectId\":\"ztvbtqgsfr\",\"disabledOnResources\":[\"zkoowtlmnguxawqa\",\"dsyuuximerqfob\",\"yznkby\"],\"administrativeState\":\"Enabled\",\"provisioningState\":\"Updating\",\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"gmhrskdsnfdsdoak\"],\"exportRouteTargets\":[\"lmkk\",\"evdlh\",\"wpusdsttwvogv\"]},\"optionAProperties\":{\"mtu\":2086607804,\"vlanId\":1690092543,\"fabricASN\":764265895,\"peerASN\":963593520,\"primaryIpv4Prefix\":\"akufgmjz\",\"primaryIpv6Prefix\":\"rdgrtw\",\"secondaryIpv4Prefix\":\"nuuzkopbm\",\"secondaryIpv6Prefix\":\"rfdwoyu\"},\"importRoutePolicyId\":\"ziuiefozbhdm\",\"exportRoutePolicyId\":\"l\",\"annotation\":\"qhoftrmaequiah\"},\"id\":\"cslfaoqzpiyylha\",\"name\":\"nswhcc\",\"type\":\"ph\"}") - .toObject(ExternalNetworkInner.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("gmhrskdsnfdsdoak", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("lmkk", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("akufgmjz", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("rdgrtw", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("nuuzkopbm", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("rfdwoyu", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(2086607804, model.optionAProperties().mtu()); - Assertions.assertEquals(1690092543, model.optionAProperties().vlanId()); - Assertions.assertEquals(963593520, model.optionAProperties().peerAsn()); - Assertions.assertEquals("ziuiefozbhdm", model.importRoutePolicyId()); - Assertions.assertEquals("l", model.exportRoutePolicyId()); - Assertions.assertEquals("qhoftrmaequiah", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalNetworkInner model = - new ExternalNetworkInner() - .withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties( - new OptionBProperties() - .withImportRouteTargets(Arrays.asList("gmhrskdsnfdsdoak")) - .withExportRouteTargets(Arrays.asList("lmkk", "evdlh", "wpusdsttwvogv"))) - .withOptionAProperties( - new ExternalNetworkPropertiesOptionAProperties() - .withPrimaryIpv4Prefix("akufgmjz") - .withPrimaryIpv6Prefix("rdgrtw") - .withSecondaryIpv4Prefix("nuuzkopbm") - .withSecondaryIpv6Prefix("rfdwoyu") - .withMtu(2086607804) - .withVlanId(1690092543) - .withPeerAsn(963593520)) - .withImportRoutePolicyId("ziuiefozbhdm") - .withExportRoutePolicyId("l") - .withAnnotation("qhoftrmaequiah"); - model = BinaryData.fromObject(model).toObject(ExternalNetworkInner.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("gmhrskdsnfdsdoak", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("lmkk", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("akufgmjz", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("rdgrtw", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("nuuzkopbm", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("rfdwoyu", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(2086607804, model.optionAProperties().mtu()); - Assertions.assertEquals(1690092543, model.optionAProperties().vlanId()); - Assertions.assertEquals(963593520, model.optionAProperties().peerAsn()); - Assertions.assertEquals("ziuiefozbhdm", model.importRoutePolicyId()); - Assertions.assertEquals("l", model.exportRoutePolicyId()); - Assertions.assertEquals("qhoftrmaequiah", model.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchPropertiesTests.java deleted file mode 100644 index c423281af4217..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchPropertiesTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkPatchProperties; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3OptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; -import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExternalNetworkPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExternalNetworkPatchProperties model = - BinaryData - .fromString( - "{\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"h\",\"lsj\",\"dhszfjv\",\"bgofeljag\"],\"exportRouteTargets\":[\"qhl\",\"vriiio\",\"nalghfkvtvsexso\"]},\"optionAProperties\":{\"mtu\":404189900,\"vlanId\":2013630700,\"fabricASN\":1425531110,\"peerASN\":953928640,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"interval\":1049422590,\"multiplier\":695933392},\"primaryIpv4Prefix\":\"wpjgwws\",\"primaryIpv6Prefix\":\"ghftqsxhqxujxuk\",\"secondaryIpv4Prefix\":\"xdigrjg\",\"secondaryIpv6Prefix\":\"fzdm\"},\"importRoutePolicyId\":\"qtfihwhbotzinga\",\"exportRoutePolicyId\":\"pph\",\"annotation\":\"zqzudph\"}") - .toObject(ExternalNetworkPatchProperties.class); - Assertions.assertEquals("zqzudph", model.annotation()); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("h", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("qhl", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("wpjgwws", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("ghftqsxhqxujxuk", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("xdigrjg", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("fzdm", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(404189900, model.optionAProperties().mtu()); - Assertions.assertEquals(2013630700, model.optionAProperties().vlanId()); - Assertions.assertEquals(953928640, model.optionAProperties().peerAsn()); - Assertions.assertEquals("qtfihwhbotzinga", model.importRoutePolicyId()); - Assertions.assertEquals("pph", model.exportRoutePolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalNetworkPatchProperties model = - new ExternalNetworkPatchProperties() - .withAnnotation("zqzudph") - .withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties( - new OptionBProperties() - .withImportRouteTargets(Arrays.asList("h", "lsj", "dhszfjv", "bgofeljag")) - .withExportRouteTargets(Arrays.asList("qhl", "vriiio", "nalghfkvtvsexso"))) - .withOptionAProperties( - new Layer3OptionAProperties() - .withPrimaryIpv4Prefix("wpjgwws") - .withPrimaryIpv6Prefix("ghftqsxhqxujxuk") - .withSecondaryIpv4Prefix("xdigrjg") - .withSecondaryIpv6Prefix("fzdm") - .withMtu(404189900) - .withVlanId(2013630700) - .withPeerAsn(953928640) - .withBfdConfiguration(new BfdConfiguration())) - .withImportRoutePolicyId("qtfihwhbotzinga") - .withExportRoutePolicyId("pph"); - model = BinaryData.fromObject(model).toObject(ExternalNetworkPatchProperties.class); - Assertions.assertEquals("zqzudph", model.annotation()); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("h", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("qhl", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("wpjgwws", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("ghftqsxhqxujxuk", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("xdigrjg", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("fzdm", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(404189900, model.optionAProperties().mtu()); - Assertions.assertEquals(2013630700, model.optionAProperties().vlanId()); - Assertions.assertEquals(953928640, model.optionAProperties().peerAsn()); - Assertions.assertEquals("qtfihwhbotzinga", model.importRoutePolicyId()); - Assertions.assertEquals("pph", model.exportRoutePolicyId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchTests.java deleted file mode 100644 index 31ce45793f6dc..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatch; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3OptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; -import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExternalNetworkPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExternalNetworkPatch model = - BinaryData - .fromString( - "{\"properties\":{\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"fxssm\",\"u\",\"wbdsr\"],\"exportRouteTargets\":[\"drhneuyow\",\"kdw\"]},\"optionAProperties\":{\"mtu\":174588693,\"vlanId\":431891008,\"fabricASN\":909535969,\"peerASN\":1043585640,\"primaryIpv4Prefix\":\"kpzi\",\"primaryIpv6Prefix\":\"j\",\"secondaryIpv4Prefix\":\"nlfzxiavrmbz\",\"secondaryIpv6Prefix\":\"okixrjqcir\"},\"importRoutePolicyId\":\"pfrlazsz\",\"exportRoutePolicyId\":\"woiindf\",\"annotation\":\"pj\"}}") - .toObject(ExternalNetworkPatch.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("fxssm", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("drhneuyow", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("kpzi", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("j", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("nlfzxiavrmbz", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("okixrjqcir", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(174588693, model.optionAProperties().mtu()); - Assertions.assertEquals(431891008, model.optionAProperties().vlanId()); - Assertions.assertEquals(1043585640, model.optionAProperties().peerAsn()); - Assertions.assertEquals("pfrlazsz", model.importRoutePolicyId()); - Assertions.assertEquals("woiindf", model.exportRoutePolicyId()); - Assertions.assertEquals("pj", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalNetworkPatch model = - new ExternalNetworkPatch() - .withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties( - new OptionBProperties() - .withImportRouteTargets(Arrays.asList("fxssm", "u", "wbdsr")) - .withExportRouteTargets(Arrays.asList("drhneuyow", "kdw"))) - .withOptionAProperties( - new Layer3OptionAProperties() - .withPrimaryIpv4Prefix("kpzi") - .withPrimaryIpv6Prefix("j") - .withSecondaryIpv4Prefix("nlfzxiavrmbz") - .withSecondaryIpv6Prefix("okixrjqcir") - .withMtu(174588693) - .withVlanId(431891008) - .withPeerAsn(1043585640)) - .withImportRoutePolicyId("pfrlazsz") - .withExportRoutePolicyId("woiindf") - .withAnnotation("pj"); - model = BinaryData.fromObject(model).toObject(ExternalNetworkPatch.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("fxssm", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("drhneuyow", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("kpzi", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("j", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("nlfzxiavrmbz", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("okixrjqcir", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(174588693, model.optionAProperties().mtu()); - Assertions.assertEquals(431891008, model.optionAProperties().vlanId()); - Assertions.assertEquals(1043585640, model.optionAProperties().peerAsn()); - Assertions.assertEquals("pfrlazsz", model.importRoutePolicyId()); - Assertions.assertEquals("woiindf", model.exportRoutePolicyId()); - Assertions.assertEquals("pj", model.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchablePropertiesTests.java deleted file mode 100644 index 3bcbbbdbf99de..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPatchablePropertiesTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3OptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; -import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExternalNetworkPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExternalNetworkPatchableProperties model = - BinaryData - .fromString( - "{\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"fwynwcvtbvkay\",\"mtnvyq\"],\"exportRouteTargets\":[\"kzwpcnpw\",\"cjaesgvvs\",\"cyajguqf\"]},\"optionAProperties\":{\"mtu\":288302688,\"vlanId\":1810005859,\"fabricASN\":1249464934,\"peerASN\":826622083,\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"interval\":1231029448,\"multiplier\":1736640593},\"primaryIpv4Prefix\":\"zrmuhapfcqdps\",\"primaryIpv6Prefix\":\"qvpsvuoymg\",\"secondaryIpv4Prefix\":\"elvezrypq\",\"secondaryIpv6Prefix\":\"feo\"},\"importRoutePolicyId\":\"rqwky\",\"exportRoutePolicyId\":\"ob\"}") - .toObject(ExternalNetworkPatchableProperties.class); - Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); - Assertions.assertEquals("fwynwcvtbvkay", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("kzwpcnpw", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("zrmuhapfcqdps", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("qvpsvuoymg", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("elvezrypq", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("feo", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(288302688, model.optionAProperties().mtu()); - Assertions.assertEquals(1810005859, model.optionAProperties().vlanId()); - Assertions.assertEquals(826622083, model.optionAProperties().peerAsn()); - Assertions.assertEquals("rqwky", model.importRoutePolicyId()); - Assertions.assertEquals("ob", model.exportRoutePolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalNetworkPatchableProperties model = - new ExternalNetworkPatchableProperties() - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties( - new OptionBProperties() - .withImportRouteTargets(Arrays.asList("fwynwcvtbvkay", "mtnvyq")) - .withExportRouteTargets(Arrays.asList("kzwpcnpw", "cjaesgvvs", "cyajguqf"))) - .withOptionAProperties( - new Layer3OptionAProperties() - .withPrimaryIpv4Prefix("zrmuhapfcqdps") - .withPrimaryIpv6Prefix("qvpsvuoymg") - .withSecondaryIpv4Prefix("elvezrypq") - .withSecondaryIpv6Prefix("feo") - .withMtu(288302688) - .withVlanId(1810005859) - .withPeerAsn(826622083) - .withBfdConfiguration(new BfdConfiguration())) - .withImportRoutePolicyId("rqwky") - .withExportRoutePolicyId("ob"); - model = BinaryData.fromObject(model).toObject(ExternalNetworkPatchableProperties.class); - Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); - Assertions.assertEquals("fwynwcvtbvkay", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("kzwpcnpw", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("zrmuhapfcqdps", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("qvpsvuoymg", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("elvezrypq", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("feo", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(288302688, model.optionAProperties().mtu()); - Assertions.assertEquals(1810005859, model.optionAProperties().vlanId()); - Assertions.assertEquals(826622083, model.optionAProperties().peerAsn()); - Assertions.assertEquals("rqwky", model.importRoutePolicyId()); - Assertions.assertEquals("ob", model.exportRoutePolicyId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPropertiesOptionAPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPropertiesOptionAPropertiesTests.java deleted file mode 100644 index c6b510bda7870..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPropertiesOptionAPropertiesTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; -import org.junit.jupiter.api.Assertions; - -public final class ExternalNetworkPropertiesOptionAPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExternalNetworkPropertiesOptionAProperties model = - BinaryData - .fromString( - "{\"mtu\":1234217414,\"vlanId\":370586550,\"fabricASN\":939289474,\"peerASN\":1561704632,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"interval\":1155749150,\"multiplier\":754811246},\"primaryIpv4Prefix\":\"orwkqnyh\",\"primaryIpv6Prefix\":\"ij\",\"secondaryIpv4Prefix\":\"ivfxzsjabibsyst\",\"secondaryIpv6Prefix\":\"fsdjpvkvp\"}") - .toObject(ExternalNetworkPropertiesOptionAProperties.class); - Assertions.assertEquals("orwkqnyh", model.primaryIpv4Prefix()); - Assertions.assertEquals("ij", model.primaryIpv6Prefix()); - Assertions.assertEquals("ivfxzsjabibsyst", model.secondaryIpv4Prefix()); - Assertions.assertEquals("fsdjpvkvp", model.secondaryIpv6Prefix()); - Assertions.assertEquals(1234217414, model.mtu()); - Assertions.assertEquals(370586550, model.vlanId()); - Assertions.assertEquals(1561704632, model.peerAsn()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalNetworkPropertiesOptionAProperties model = - new ExternalNetworkPropertiesOptionAProperties() - .withPrimaryIpv4Prefix("orwkqnyh") - .withPrimaryIpv6Prefix("ij") - .withSecondaryIpv4Prefix("ivfxzsjabibsyst") - .withSecondaryIpv6Prefix("fsdjpvkvp") - .withMtu(1234217414) - .withVlanId(370586550) - .withPeerAsn(1561704632) - .withBfdConfiguration(new BfdConfiguration()); - model = BinaryData.fromObject(model).toObject(ExternalNetworkPropertiesOptionAProperties.class); - Assertions.assertEquals("orwkqnyh", model.primaryIpv4Prefix()); - Assertions.assertEquals("ij", model.primaryIpv6Prefix()); - Assertions.assertEquals("ivfxzsjabibsyst", model.secondaryIpv4Prefix()); - Assertions.assertEquals("fsdjpvkvp", model.secondaryIpv6Prefix()); - Assertions.assertEquals(1234217414, model.mtu()); - Assertions.assertEquals(370586550, model.vlanId()); - Assertions.assertEquals(1561704632, model.peerAsn()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPropertiesTests.java deleted file mode 100644 index d36ca8df313bd..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworkPropertiesTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkProperties; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; -import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExternalNetworkPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExternalNetworkProperties model = - BinaryData - .fromString( - "{\"networkToNetworkInterconnectId\":\"ivwitqscywugg\",\"disabledOnResources\":[\"uhczbwemh\",\"i\"],\"administrativeState\":\"Enabled\",\"provisioningState\":\"Deleting\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"swe\",\"pqwd\",\"ggicccnxqhue\",\"mkttlstvlzywem\"],\"exportRouteTargets\":[\"ncsdtclusiyp\",\"sfgytguslfead\",\"ygqukyhejh\"]},\"optionAProperties\":{\"mtu\":581237500,\"vlanId\":883712921,\"fabricASN\":1767346003,\"peerASN\":1351567723,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"interval\":1515177914,\"multiplier\":43527729},\"primaryIpv4Prefix\":\"qvujzraehtwdwrf\",\"primaryIpv6Prefix\":\"wib\",\"secondaryIpv4Prefix\":\"cdl\",\"secondaryIpv6Prefix\":\"shfwpracstwity\"},\"importRoutePolicyId\":\"evxccedcp\",\"exportRoutePolicyId\":\"dyodnwzxltj\",\"annotation\":\"nhltiugcxn\"}") - .toObject(ExternalNetworkProperties.class); - Assertions.assertEquals("nhltiugcxn", model.annotation()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); - Assertions.assertEquals("swe", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("ncsdtclusiyp", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("qvujzraehtwdwrf", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("wib", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("cdl", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("shfwpracstwity", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(581237500, model.optionAProperties().mtu()); - Assertions.assertEquals(883712921, model.optionAProperties().vlanId()); - Assertions.assertEquals(1351567723, model.optionAProperties().peerAsn()); - Assertions.assertEquals("evxccedcp", model.importRoutePolicyId()); - Assertions.assertEquals("dyodnwzxltj", model.exportRoutePolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalNetworkProperties model = - new ExternalNetworkProperties() - .withAnnotation("nhltiugcxn") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties( - new OptionBProperties() - .withImportRouteTargets(Arrays.asList("swe", "pqwd", "ggicccnxqhue", "mkttlstvlzywem")) - .withExportRouteTargets(Arrays.asList("ncsdtclusiyp", "sfgytguslfead", "ygqukyhejh"))) - .withOptionAProperties( - new ExternalNetworkPropertiesOptionAProperties() - .withPrimaryIpv4Prefix("qvujzraehtwdwrf") - .withPrimaryIpv6Prefix("wib") - .withSecondaryIpv4Prefix("cdl") - .withSecondaryIpv6Prefix("shfwpracstwity") - .withMtu(581237500) - .withVlanId(883712921) - .withPeerAsn(1351567723) - .withBfdConfiguration(new BfdConfiguration())) - .withImportRoutePolicyId("evxccedcp") - .withExportRoutePolicyId("dyodnwzxltj"); - model = BinaryData.fromObject(model).toObject(ExternalNetworkProperties.class); - Assertions.assertEquals("nhltiugcxn", model.annotation()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.peeringOption()); - Assertions.assertEquals("swe", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("ncsdtclusiyp", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("qvujzraehtwdwrf", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("wib", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("cdl", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("shfwpracstwity", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(581237500, model.optionAProperties().mtu()); - Assertions.assertEquals(883712921, model.optionAProperties().vlanId()); - Assertions.assertEquals(1351567723, model.optionAProperties().peerAsn()); - Assertions.assertEquals("evxccedcp", model.importRoutePolicyId()); - Assertions.assertEquals("dyodnwzxltj", model.exportRoutePolicyId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateMockTests.java deleted file mode 100644 index 830ade19a8d3f..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksCreateMockTests.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworkPropertiesOptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; -import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ExternalNetworksCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"networkToNetworkInterconnectId\":\"klxesl\",\"disabledOnResources\":[\"ustcpoq\",\"avnwqj\",\"g\",\"knlejjjkxybwfd\"],\"administrativeState\":\"Enabled\",\"provisioningState\":\"Succeeded\",\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[],\"exportRouteTargets\":[]},\"optionAProperties\":{\"mtu\":880729716,\"vlanId\":1891353200,\"fabricASN\":1541050102,\"peerASN\":605317874,\"primaryIpv4Prefix\":\"xfwush\",\"primaryIpv6Prefix\":\"pkupnq\",\"secondaryIpv4Prefix\":\"gjfbpkuwxeoi\",\"secondaryIpv6Prefix\":\"fiz\"},\"importRoutePolicyId\":\"vkjzwfbcyaykm\",\"exportRoutePolicyId\":\"zs\",\"annotation\":\"wxrzxmdewsrsxkrp\"},\"id\":\"jazejwwviyoyp\",\"name\":\"uhbrnnhjxsq\",\"type\":\"jhqkbiwetpozy\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ExternalNetwork response = - manager - .externalNetworks() - .define("qyv") - .withExistingL3IsolationDomain("kva", "blhtjq") - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties( - new OptionBProperties() - .withImportRouteTargets(Arrays.asList()) - .withExportRouteTargets(Arrays.asList())) - .withOptionAProperties( - new ExternalNetworkPropertiesOptionAProperties() - .withPrimaryIpv4Prefix("wigsyeipqdsm") - .withPrimaryIpv6Prefix("grq") - .withSecondaryIpv4Prefix("gkkileplkcsmkn") - .withSecondaryIpv6Prefix("tbbaedorvvmqf") - .withMtu(1536025500) - .withVlanId(861452083) - .withPeerAsn(296202390)) - .withImportRoutePolicyId("ygbdgwumgxdgdhpa") - .withExportRoutePolicyId("dexjddvjs") - .withAnnotation("wotmmwllcolsrsxa") - .create(); - - Assertions.assertEquals(PeeringOption.OPTIONB, response.peeringOption()); - Assertions.assertEquals("xfwush", response.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("pkupnq", response.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("gjfbpkuwxeoi", response.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("fiz", response.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(880729716, response.optionAProperties().mtu()); - Assertions.assertEquals(1891353200, response.optionAProperties().vlanId()); - Assertions.assertEquals(605317874, response.optionAProperties().peerAsn()); - Assertions.assertEquals("vkjzwfbcyaykm", response.importRoutePolicyId()); - Assertions.assertEquals("zs", response.exportRoutePolicyId()); - Assertions.assertEquals("wxrzxmdewsrsxkrp", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksDeleteMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksDeleteMockTests.java deleted file mode 100644 index d13790f637bb3..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ExternalNetworksDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .externalNetworks() - .delete("kwiswskukjtas", "vwisp", "xkdtxfkndlqvtwkn", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksGetWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksGetWithResponseMockTests.java deleted file mode 100644 index 719561caaee32..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksGetWithResponseMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; -import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ExternalNetworksGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"networkToNetworkInterconnectId\":\"brxmrgch\",\"disabledOnResources\":[\"xk\",\"y\"],\"administrativeState\":\"Enabled\",\"provisioningState\":\"Updating\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[],\"exportRouteTargets\":[]},\"optionAProperties\":{\"mtu\":403702784,\"vlanId\":755763875,\"fabricASN\":1181540168,\"peerASN\":413827432,\"primaryIpv4Prefix\":\"blevpmcluj\",\"primaryIpv6Prefix\":\"kyxl\",\"secondaryIpv4Prefix\":\"sjgkzzltafh\",\"secondaryIpv6Prefix\":\"ffovwmbjlzqsczp\"},\"importRoutePolicyId\":\"dwnapf\",\"exportRoutePolicyId\":\"wow\",\"annotation\":\"ptnuwjtkschgc\"},\"id\":\"y\",\"name\":\"leseyqrhvyeldo\",\"type\":\"jv\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ExternalNetwork response = - manager - .externalNetworks() - .getWithResponse("hychocokuleh", "rqlrqffawe", "urkphyjdxravju", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(PeeringOption.OPTIONA, response.peeringOption()); - Assertions.assertEquals("blevpmcluj", response.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("kyxl", response.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("sjgkzzltafh", response.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("ffovwmbjlzqsczp", response.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(403702784, response.optionAProperties().mtu()); - Assertions.assertEquals(755763875, response.optionAProperties().vlanId()); - Assertions.assertEquals(413827432, response.optionAProperties().peerAsn()); - Assertions.assertEquals("dwnapf", response.importRoutePolicyId()); - Assertions.assertEquals("wow", response.exportRoutePolicyId()); - Assertions.assertEquals("ptnuwjtkschgc", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListMockTests.java deleted file mode 100644 index 1b133e248d318..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetwork; -import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ExternalNetworksListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"networkToNetworkInterconnectId\":\"eatgroeshoy\",\"disabledOnResources\":[\"byfqxkfaoy\",\"ehqpuvjmvqmt\"],\"administrativeState\":\"Disabled\",\"provisioningState\":\"Canceled\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[],\"exportRouteTargets\":[]},\"optionAProperties\":{\"mtu\":790671339,\"vlanId\":1138069123,\"fabricASN\":995715779,\"peerASN\":1946464383,\"primaryIpv4Prefix\":\"br\",\"primaryIpv6Prefix\":\"qyn\",\"secondaryIpv4Prefix\":\"eysfaqegplw\",\"secondaryIpv6Prefix\":\"shwddkvbxgk\"},\"importRoutePolicyId\":\"sybwptdaca\",\"exportRoutePolicyId\":\"vlf\",\"annotation\":\"ymtpo\"},\"id\":\"enazerohzrsqals\",\"name\":\"kdnwqapfgsdpcve\",\"type\":\"smzhhkuuipldqqct\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.externalNetworks().list("gmmbu", "tywatmqaq", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(PeeringOption.OPTIONA, response.iterator().next().peeringOption()); - Assertions.assertEquals("br", response.iterator().next().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("qyn", response.iterator().next().optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("eysfaqegplw", response.iterator().next().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("shwddkvbxgk", response.iterator().next().optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(790671339, response.iterator().next().optionAProperties().mtu()); - Assertions.assertEquals(1138069123, response.iterator().next().optionAProperties().vlanId()); - Assertions.assertEquals(1946464383, response.iterator().next().optionAProperties().peerAsn()); - Assertions.assertEquals("sybwptdaca", response.iterator().next().importRoutePolicyId()); - Assertions.assertEquals("vlf", response.iterator().next().exportRoutePolicyId()); - Assertions.assertEquals("ymtpo", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListTests.java deleted file mode 100644 index 1abc1563f4fc7..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ExternalNetworksListTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.ExternalNetworkInner; -import com.azure.resourcemanager.managednetworkfabric.models.ExternalNetworksList; -import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExternalNetworksListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExternalNetworksList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"networkToNetworkInterconnectId\":\"edkowepbqpcrfk\",\"disabledOnResources\":[],\"administrativeState\":\"Disabled\",\"provisioningState\":\"Succeeded\",\"peeringOption\":\"OptionB\",\"importRoutePolicyId\":\"wxlp\",\"exportRoutePolicyId\":\"kftnkhtjsyin\",\"annotation\":\"fq\"},\"id\":\"mtdh\",\"name\":\"mdvy\",\"type\":\"gikdgsz\"},{\"properties\":{\"networkToNetworkInterconnectId\":\"kbir\",\"disabledOnResources\":[],\"administrativeState\":\"Enabled\",\"provisioningState\":\"Failed\",\"peeringOption\":\"OptionA\",\"importRoutePolicyId\":\"qrvqq\",\"exportRoutePolicyId\":\"t\",\"annotation\":\"nrvgoupmfiibfgg\"},\"id\":\"ool\",\"name\":\"rwxkvtkkgl\",\"type\":\"qwjygvja\"}],\"nextLink\":\"blmhvkzuhb\"}") - .toObject(ExternalNetworksList.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.value().get(0).peeringOption()); - Assertions.assertEquals("wxlp", model.value().get(0).importRoutePolicyId()); - Assertions.assertEquals("kftnkhtjsyin", model.value().get(0).exportRoutePolicyId()); - Assertions.assertEquals("fq", model.value().get(0).annotation()); - Assertions.assertEquals("blmhvkzuhb", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalNetworksList model = - new ExternalNetworksList() - .withValue( - Arrays - .asList( - new ExternalNetworkInner() - .withPeeringOption(PeeringOption.OPTIONB) - .withImportRoutePolicyId("wxlp") - .withExportRoutePolicyId("kftnkhtjsyin") - .withAnnotation("fq"), - new ExternalNetworkInner() - .withPeeringOption(PeeringOption.OPTIONA) - .withImportRoutePolicyId("qrvqq") - .withExportRoutePolicyId("t") - .withAnnotation("nrvgoupmfiibfgg"))) - .withNextLink("blmhvkzuhb"); - model = BinaryData.fromObject(model).toObject(ExternalNetworksList.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.value().get(0).peeringOption()); - Assertions.assertEquals("wxlp", model.value().get(0).importRoutePolicyId()); - Assertions.assertEquals("kftnkhtjsyin", model.value().get(0).exportRoutePolicyId()); - Assertions.assertEquals("fq", model.value().get(0).annotation()); - Assertions.assertEquals("blmhvkzuhb", model.nextLink()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FabricBfdConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FabricBfdConfigurationTests.java deleted file mode 100644 index 976580ebab85b..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/FabricBfdConfigurationTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.FabricBfdConfiguration; - -public final class FabricBfdConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FabricBfdConfiguration model = - BinaryData - .fromString("{\"interval\":617486740,\"multiplier\":593802124}") - .toObject(FabricBfdConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FabricBfdConfiguration model = new FabricBfdConfiguration(); - model = BinaryData.fromObject(model).toObject(FabricBfdConfiguration.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GetDeviceStatusPropertiesInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GetDeviceStatusPropertiesInnerTests.java deleted file mode 100644 index d30cdbb4c6d9f..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GetDeviceStatusPropertiesInnerTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetDeviceStatusPropertiesInner; -import com.azure.resourcemanager.managednetworkfabric.models.OperationalStatus; -import com.azure.resourcemanager.managednetworkfabric.models.PowerCycleState; -import org.junit.jupiter.api.Assertions; - -public final class GetDeviceStatusPropertiesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GetDeviceStatusPropertiesInner model = - BinaryData - .fromString("{\"operationalStatus\":\"Booted\",\"powerCycleState\":\"On\",\"serialNumber\":\"pevf\"}") - .toObject(GetDeviceStatusPropertiesInner.class); - Assertions.assertEquals(OperationalStatus.BOOTED, model.operationalStatus()); - Assertions.assertEquals(PowerCycleState.ON, model.powerCycleState()); - Assertions.assertEquals("pevf", model.serialNumber()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GetDeviceStatusPropertiesInner model = - new GetDeviceStatusPropertiesInner() - .withOperationalStatus(OperationalStatus.BOOTED) - .withPowerCycleState(PowerCycleState.ON) - .withSerialNumber("pevf"); - model = BinaryData.fromObject(model).toObject(GetDeviceStatusPropertiesInner.class); - Assertions.assertEquals(OperationalStatus.BOOTED, model.operationalStatus()); - Assertions.assertEquals(PowerCycleState.ON, model.powerCycleState()); - Assertions.assertEquals("pevf", model.serialNumber()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GetDynamicInterfaceMapsPropertiesItemInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GetDynamicInterfaceMapsPropertiesItemInnerTests.java deleted file mode 100644 index 3c70992f4f020..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GetDynamicInterfaceMapsPropertiesItemInnerTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetDynamicInterfaceMapsPropertiesItemInner; -import org.junit.jupiter.api.Assertions; - -public final class GetDynamicInterfaceMapsPropertiesItemInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GetDynamicInterfaceMapsPropertiesItemInner model = - BinaryData - .fromString( - "{\"name\":\"ismsksbpimlqolj\",\"administrativeState\":\"Enabled\",\"operationalStatus\":\"xxlxsffgcvizq\",\"phyStatus\":\"wlvwlyoupf\",\"transceiverStatus\":\"bkjubdyhgkfmins\",\"connectedTo\":\"wzf\"}") - .toObject(GetDynamicInterfaceMapsPropertiesItemInner.class); - Assertions.assertEquals("xxlxsffgcvizq", model.operationalStatus()); - Assertions.assertEquals("wlvwlyoupf", model.phyStatus()); - Assertions.assertEquals("bkjubdyhgkfmins", model.transceiverStatus()); - Assertions.assertEquals("wzf", model.connectedTo()); - Assertions.assertEquals("ismsksbpimlqolj", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GetDynamicInterfaceMapsPropertiesItemInner model = - new GetDynamicInterfaceMapsPropertiesItemInner() - .withOperationalStatus("xxlxsffgcvizq") - .withPhyStatus("wlvwlyoupf") - .withTransceiverStatus("bkjubdyhgkfmins") - .withConnectedTo("wzf") - .withName("ismsksbpimlqolj"); - model = BinaryData.fromObject(model).toObject(GetDynamicInterfaceMapsPropertiesItemInner.class); - Assertions.assertEquals("xxlxsffgcvizq", model.operationalStatus()); - Assertions.assertEquals("wlvwlyoupf", model.phyStatus()); - Assertions.assertEquals("bkjubdyhgkfmins", model.transceiverStatus()); - Assertions.assertEquals("wzf", model.connectedTo()); - Assertions.assertEquals("ismsksbpimlqolj", model.name()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GetStaticInterfaceMapsPropertiesItemInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GetStaticInterfaceMapsPropertiesItemInnerTests.java deleted file mode 100644 index e1748cfcb8060..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/GetStaticInterfaceMapsPropertiesItemInnerTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.GetStaticInterfaceMapsPropertiesItemInner; -import org.junit.jupiter.api.Assertions; - -public final class GetStaticInterfaceMapsPropertiesItemInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GetStaticInterfaceMapsPropertiesItemInner model = - BinaryData - .fromString( - "{\"name\":\"b\",\"description\":\"rilbywdx\",\"identifier\":\"icc\",\"interfaceType\":\"wfscjfn\",\"connectorType\":\"szqujizdvoq\",\"connectedTo\":\"ibyowbblgyavutp\",\"speed\":38.259933,\"channelGroupId\":12.625467}") - .toObject(GetStaticInterfaceMapsPropertiesItemInner.class); - Assertions.assertEquals("b", model.name()); - Assertions.assertEquals("rilbywdx", model.description()); - Assertions.assertEquals("icc", model.identifier()); - Assertions.assertEquals("wfscjfn", model.interfaceType()); - Assertions.assertEquals("szqujizdvoq", model.connectorType()); - Assertions.assertEquals("ibyowbblgyavutp", model.connectedTo()); - Assertions.assertEquals(38.259933F, model.speed()); - Assertions.assertEquals(12.625467F, model.channelGroupId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GetStaticInterfaceMapsPropertiesItemInner model = - new GetStaticInterfaceMapsPropertiesItemInner() - .withName("b") - .withDescription("rilbywdx") - .withIdentifier("icc") - .withInterfaceType("wfscjfn") - .withConnectorType("szqujizdvoq") - .withConnectedTo("ibyowbblgyavutp") - .withSpeed(38.259933F) - .withChannelGroupId(12.625467F); - model = BinaryData.fromObject(model).toObject(GetStaticInterfaceMapsPropertiesItemInner.class); - Assertions.assertEquals("b", model.name()); - Assertions.assertEquals("rilbywdx", model.description()); - Assertions.assertEquals("icc", model.identifier()); - Assertions.assertEquals("wfscjfn", model.interfaceType()); - Assertions.assertEquals("szqujizdvoq", model.connectorType()); - Assertions.assertEquals("ibyowbblgyavutp", model.connectedTo()); - Assertions.assertEquals(38.259933F, model.speed()); - Assertions.assertEquals(12.625467F, model.channelGroupId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InfrastructureServicesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InfrastructureServicesTests.java deleted file mode 100644 index a19486c6a7492..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InfrastructureServicesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.InfrastructureServices; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InfrastructureServicesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InfrastructureServices model = - BinaryData - .fromString( - "{\"ipv4AddressSpaces\":[\"pgogtqxepny\",\"b\",\"uajlyj\"],\"ipv6AddressSpaces\":[\"of\",\"zhvfcibyfmowuxr\",\"jpvd\"]}") - .toObject(InfrastructureServices.class); - Assertions.assertEquals("pgogtqxepny", model.ipv4AddressSpaces().get(0)); - Assertions.assertEquals("of", model.ipv6AddressSpaces().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InfrastructureServices model = - new InfrastructureServices() - .withIpv4AddressSpaces(Arrays.asList("pgogtqxepny", "b", "uajlyj")) - .withIpv6AddressSpaces(Arrays.asList("of", "zhvfcibyfmowuxr", "jpvd")); - model = BinaryData.fromObject(model).toObject(InfrastructureServices.class); - Assertions.assertEquals("pgogtqxepny", model.ipv4AddressSpaces().get(0)); - Assertions.assertEquals("of", model.ipv6AddressSpaces().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InterfaceStatusInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InterfaceStatusInnerTests.java deleted file mode 100644 index c3aba923a3d21..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InterfaceStatusInnerTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InterfaceStatusInner; -import org.junit.jupiter.api.Assertions; - -public final class InterfaceStatusInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InterfaceStatusInner model = - BinaryData - .fromString( - "{\"administrativeState\":\"Disabled\",\"operationalStatus\":\"t\",\"phyStatus\":\"lahb\",\"transceiverStatus\":\"ctxtgzukxi\",\"connectedTo\":\"m\"}") - .toObject(InterfaceStatusInner.class); - Assertions.assertEquals("t", model.operationalStatus()); - Assertions.assertEquals("lahb", model.phyStatus()); - Assertions.assertEquals("ctxtgzukxi", model.transceiverStatus()); - Assertions.assertEquals("m", model.connectedTo()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InterfaceStatusInner model = - new InterfaceStatusInner() - .withOperationalStatus("t") - .withPhyStatus("lahb") - .withTransceiverStatus("ctxtgzukxi") - .withConnectedTo("m"); - model = BinaryData.fromObject(model).toObject(InterfaceStatusInner.class); - Assertions.assertEquals("t", model.operationalStatus()); - Assertions.assertEquals("lahb", model.phyStatus()); - Assertions.assertEquals("ctxtgzukxi", model.transceiverStatus()); - Assertions.assertEquals("m", model.connectedTo()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkInnerTests.java deleted file mode 100644 index e66e39549b203..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkInnerTests.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; -import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; -import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InternalNetworkInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InternalNetworkInner model = - BinaryData - .fromString( - "{\"properties\":{\"disabledOnResources\":[\"xobbcswsrt\",\"riplrbpbewtg\",\"fgb\"],\"administrativeState\":\"Enabled\",\"bgpDisabledOnResources\":[\"zvlvqhjkbegib\",\"nmxiebwwaloayqc\",\"wrtz\",\"uzgwyzmhtx\"],\"bfdDisabledOnResources\":[\"mtsavjcbpwxqp\",\"rknftguvriuhprwm\",\"yvxqtayriwwroy\",\"bexrmcq\"],\"bfdForStaticRoutesDisabledOnResources\":[\"cnojvknmefqsg\",\"vah\",\"pjyzhpv\",\"qzcjrvxdj\"],\"provisioningState\":\"Deleting\",\"vlanId\":1413734297,\"mtu\":391686670,\"connectedIPv4Subnets\":[{\"prefix\":\"gfhzovawjvzunlut\",\"annotation\":\"n\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"i\",\"annotation\":\"ilpjzuaejxdult\"},{\"prefix\":\"zbbtdzumveek\",\"annotation\":\"wozuhkf\"}],\"staticRouteConfiguration\":{\"ipv4Routes\":[],\"ipv6Routes\":[]},\"bgpConfiguration\":{\"defaultRouteOriginate\":\"False\",\"allowAS\":522774709,\"allowASOverride\":\"Disable\",\"fabricASN\":1422945070,\"peerASN\":648396636,\"ipv4ListenRangePrefixes\":[\"boekqvkel\",\"smv\"],\"ipv6ListenRangePrefixes\":[\"yjsflhhcaalnji\",\"isxyawjoyaqcslyj\",\"kiidzyex\",\"nelixhnrztfo\"],\"ipv4NeighborAddress\":[],\"ipv6NeighborAddress\":[],\"annotation\":\"nalaulppg\"},\"importRoutePolicyId\":\"tpnapnyiropuhpig\",\"exportRoutePolicyId\":\"gylgqgitxmedjvcs\",\"annotation\":\"n\"},\"id\":\"wncwzzhxgktrmg\",\"name\":\"cnapkteoell\",\"type\":\"pt\"}") - .toObject(InternalNetworkInner.class); - Assertions.assertEquals(1413734297, model.vlanId()); - Assertions.assertEquals(391686670, model.mtu()); - Assertions.assertEquals("n", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("gfhzovawjvzunlut", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("ilpjzuaejxdult", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("i", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("nalaulppg", model.bgpConfiguration().annotation()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(522774709, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(648396636, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("boekqvkel", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("yjsflhhcaalnji", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("tpnapnyiropuhpig", model.importRoutePolicyId()); - Assertions.assertEquals("gylgqgitxmedjvcs", model.exportRoutePolicyId()); - Assertions.assertEquals("n", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternalNetworkInner model = - new InternalNetworkInner() - .withVlanId(1413734297) - .withMtu(391686670) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("n").withPrefix("gfhzovawjvzunlut"))) - .withConnectedIPv6Subnets( - Arrays - .asList( - new ConnectedSubnet().withAnnotation("ilpjzuaejxdult").withPrefix("i"), - new ConnectedSubnet().withAnnotation("wozuhkf").withPrefix("zbbtdzumveek"))) - .withStaticRouteConfiguration( - new StaticRouteConfiguration().withIpv4Routes(Arrays.asList()).withIpv6Routes(Arrays.asList())) - .withBgpConfiguration( - new BgpConfiguration() - .withAnnotation("nalaulppg") - .withDefaultRouteOriginate(BooleanEnumProperty.FALSE) - .withAllowAS(522774709) - .withAllowASOverride(AllowASOverride.DISABLE) - .withPeerAsn(648396636) - .withIpv4ListenRangePrefixes(Arrays.asList("boekqvkel", "smv")) - .withIpv6ListenRangePrefixes( - Arrays.asList("yjsflhhcaalnji", "isxyawjoyaqcslyj", "kiidzyex", "nelixhnrztfo")) - .withIpv4NeighborAddress(Arrays.asList()) - .withIpv6NeighborAddress(Arrays.asList())) - .withImportRoutePolicyId("tpnapnyiropuhpig") - .withExportRoutePolicyId("gylgqgitxmedjvcs") - .withAnnotation("n"); - model = BinaryData.fromObject(model).toObject(InternalNetworkInner.class); - Assertions.assertEquals(1413734297, model.vlanId()); - Assertions.assertEquals(391686670, model.mtu()); - Assertions.assertEquals("n", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("gfhzovawjvzunlut", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("ilpjzuaejxdult", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("i", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("nalaulppg", model.bgpConfiguration().annotation()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(522774709, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(648396636, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("boekqvkel", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("yjsflhhcaalnji", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("tpnapnyiropuhpig", model.importRoutePolicyId()); - Assertions.assertEquals("gylgqgitxmedjvcs", model.exportRoutePolicyId()); - Assertions.assertEquals("n", model.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchPropertiesTests.java deleted file mode 100644 index fa69fe9a42659..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchPropertiesTests.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkPatchProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InternalNetworkPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InternalNetworkPatchProperties model = - BinaryData - .fromString( - "{\"mtu\":1307171109,\"connectedIPv4Subnets\":[{\"prefix\":\"gqggebdunygae\",\"annotation\":\"db\"},{\"prefix\":\"atpxl\",\"annotation\":\"xcyjmoadsuvarmy\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"sjqbjhhyxxrw\",\"annotation\":\"co\"},{\"prefix\":\"hp\",\"annotation\":\"kgymareqnajxqug\"}],\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"interval\":314169873,\"multiplier\":642347272},\"ipv4Routes\":[{\"prefix\":\"ssofwqmzqa\",\"nextHop\":[]},{\"prefix\":\"krmnjijpxacqqud\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"yxbaaabjyvayf\",\"nextHop\":[]},{\"prefix\":\"imrzrtuzqog\",\"nextHop\":[]},{\"prefix\":\"exn\",\"nextHop\":[]}]},\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"interval\":512160368,\"multiplier\":2059840008},\"defaultRouteOriginate\":\"False\",\"allowAS\":1440499034,\"allowASOverride\":\"Disable\",\"fabricASN\":1475196585,\"peerASN\":1091496648,\"ipv4ListenRangePrefixes\":[\"oibjudpfrxtrthz\",\"aytdwkqbrq\",\"bpaxhexiilivpdt\"],\"ipv6ListenRangePrefixes\":[\"q\"],\"ipv4NeighborAddress\":[{\"address\":\"axoruzfgsquy\",\"operationalState\":\"rxxle\"},{\"address\":\"ramxjezwlwnw\",\"operationalState\":\"qlcvydy\"},{\"address\":\"tdooaoj\",\"operationalState\":\"iodkooebwnujhem\"}],\"ipv6NeighborAddress\":[{\"address\":\"dkcrodt\",\"operationalState\":\"nfwjlfltkacjvefk\"},{\"address\":\"foakgg\",\"operationalState\":\"pagao\"},{\"address\":\"ulpqblylsyxkqjn\",\"operationalState\":\"ervtiagxs\"}],\"annotation\":\"zuempsbzkf\"},\"importRoutePolicyId\":\"eyvpnqicvinvkj\",\"exportRoutePolicyId\":\"dxrbuukzcle\",\"annotation\":\"hmlwpaztzpo\"}") - .toObject(InternalNetworkPatchProperties.class); - Assertions.assertEquals("hmlwpaztzpo", model.annotation()); - Assertions.assertEquals(1307171109, model.mtu()); - Assertions.assertEquals("db", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("gqggebdunygae", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("co", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("sjqbjhhyxxrw", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("ssofwqmzqa", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("yxbaaabjyvayf", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("zuempsbzkf", model.bgpConfiguration().annotation()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1440499034, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(1091496648, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("oibjudpfrxtrthz", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("q", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("axoruzfgsquy", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("dkcrodt", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals("eyvpnqicvinvkj", model.importRoutePolicyId()); - Assertions.assertEquals("dxrbuukzcle", model.exportRoutePolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternalNetworkPatchProperties model = - new InternalNetworkPatchProperties() - .withAnnotation("hmlwpaztzpo") - .withMtu(1307171109) - .withConnectedIPv4Subnets( - Arrays - .asList( - new ConnectedSubnet().withAnnotation("db").withPrefix("gqggebdunygae"), - new ConnectedSubnet().withAnnotation("xcyjmoadsuvarmy").withPrefix("atpxl"))) - .withConnectedIPv6Subnets( - Arrays - .asList( - new ConnectedSubnet().withAnnotation("co").withPrefix("sjqbjhhyxxrw"), - new ConnectedSubnet().withAnnotation("kgymareqnajxqug").withPrefix("hp"))) - .withStaticRouteConfiguration( - new StaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration()) - .withIpv4Routes( - Arrays - .asList( - new StaticRouteProperties().withPrefix("ssofwqmzqa").withNextHop(Arrays.asList()), - new StaticRouteProperties() - .withPrefix("krmnjijpxacqqud") - .withNextHop(Arrays.asList()))) - .withIpv6Routes( - Arrays - .asList( - new StaticRouteProperties() - .withPrefix("yxbaaabjyvayf") - .withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("imrzrtuzqog").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("exn").withNextHop(Arrays.asList())))) - .withBgpConfiguration( - new BgpConfiguration() - .withAnnotation("zuempsbzkf") - .withBfdConfiguration(new BfdConfiguration()) - .withDefaultRouteOriginate(BooleanEnumProperty.FALSE) - .withAllowAS(1440499034) - .withAllowASOverride(AllowASOverride.DISABLE) - .withPeerAsn(1091496648) - .withIpv4ListenRangePrefixes(Arrays.asList("oibjudpfrxtrthz", "aytdwkqbrq", "bpaxhexiilivpdt")) - .withIpv6ListenRangePrefixes(Arrays.asList("q")) - .withIpv4NeighborAddress( - Arrays - .asList( - new NeighborAddress().withAddress("axoruzfgsquy"), - new NeighborAddress().withAddress("ramxjezwlwnw"), - new NeighborAddress().withAddress("tdooaoj"))) - .withIpv6NeighborAddress( - Arrays - .asList( - new NeighborAddress().withAddress("dkcrodt"), - new NeighborAddress().withAddress("foakgg"), - new NeighborAddress().withAddress("ulpqblylsyxkqjn")))) - .withImportRoutePolicyId("eyvpnqicvinvkj") - .withExportRoutePolicyId("dxrbuukzcle"); - model = BinaryData.fromObject(model).toObject(InternalNetworkPatchProperties.class); - Assertions.assertEquals("hmlwpaztzpo", model.annotation()); - Assertions.assertEquals(1307171109, model.mtu()); - Assertions.assertEquals("db", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("gqggebdunygae", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("co", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("sjqbjhhyxxrw", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("ssofwqmzqa", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("yxbaaabjyvayf", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("zuempsbzkf", model.bgpConfiguration().annotation()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1440499034, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(1091496648, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("oibjudpfrxtrthz", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("q", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("axoruzfgsquy", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("dkcrodt", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals("eyvpnqicvinvkj", model.importRoutePolicyId()); - Assertions.assertEquals("dxrbuukzcle", model.exportRoutePolicyId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchTests.java deleted file mode 100644 index 19c4a64494728..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; -import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatch; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InternalNetworkPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InternalNetworkPatch model = - BinaryData - .fromString( - "{\"properties\":{\"mtu\":1927044883,\"connectedIPv4Subnets\":[{\"prefix\":\"lwuip\",\"annotation\":\"cjzkzivgvvcna\"},{\"prefix\":\"hyrnxxmu\",\"annotation\":\"dndrdvstkwqqtche\"},{\"prefix\":\"mfmtdaaygdvw\",\"annotation\":\"piohgwxrtfu\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"xg\",\"annotation\":\"agvrvmnpkuk\"},{\"prefix\":\"i\",\"annotation\":\"blxgwimf\"},{\"prefix\":\"hfjx\",\"annotation\":\"szkkfoqre\"}],\"staticRouteConfiguration\":{\"ipv4Routes\":[],\"ipv6Routes\":[]},\"bgpConfiguration\":{\"defaultRouteOriginate\":\"True\",\"allowAS\":113630721,\"allowASOverride\":\"Enable\",\"fabricASN\":2107457398,\"peerASN\":322973840,\"ipv4ListenRangePrefixes\":[\"lpcirelsf\",\"aenwabf\",\"tkl\",\"dxbjhwuaanozj\"],\"ipv6ListenRangePrefixes\":[\"hyoulpjr\"],\"ipv4NeighborAddress\":[],\"ipv6NeighborAddress\":[],\"annotation\":\"vimjwos\"},\"importRoutePolicyId\":\"xitc\",\"exportRoutePolicyId\":\"fcktqumiekke\",\"annotation\":\"ikh\"}}") - .toObject(InternalNetworkPatch.class); - Assertions.assertEquals(1927044883, model.mtu()); - Assertions.assertEquals("cjzkzivgvvcna", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("lwuip", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("agvrvmnpkuk", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("xg", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("vimjwos", model.bgpConfiguration().annotation()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(113630721, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(322973840, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("lpcirelsf", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("hyoulpjr", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("xitc", model.importRoutePolicyId()); - Assertions.assertEquals("fcktqumiekke", model.exportRoutePolicyId()); - Assertions.assertEquals("ikh", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternalNetworkPatch model = - new InternalNetworkPatch() - .withMtu(1927044883) - .withConnectedIPv4Subnets( - Arrays - .asList( - new ConnectedSubnet().withAnnotation("cjzkzivgvvcna").withPrefix("lwuip"), - new ConnectedSubnet().withAnnotation("dndrdvstkwqqtche").withPrefix("hyrnxxmu"), - new ConnectedSubnet().withAnnotation("piohgwxrtfu").withPrefix("mfmtdaaygdvw"))) - .withConnectedIPv6Subnets( - Arrays - .asList( - new ConnectedSubnet().withAnnotation("agvrvmnpkuk").withPrefix("xg"), - new ConnectedSubnet().withAnnotation("blxgwimf").withPrefix("i"), - new ConnectedSubnet().withAnnotation("szkkfoqre").withPrefix("hfjx"))) - .withStaticRouteConfiguration( - new StaticRouteConfiguration().withIpv4Routes(Arrays.asList()).withIpv6Routes(Arrays.asList())) - .withBgpConfiguration( - new BgpConfiguration() - .withAnnotation("vimjwos") - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(113630721) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(322973840) - .withIpv4ListenRangePrefixes(Arrays.asList("lpcirelsf", "aenwabf", "tkl", "dxbjhwuaanozj")) - .withIpv6ListenRangePrefixes(Arrays.asList("hyoulpjr")) - .withIpv4NeighborAddress(Arrays.asList()) - .withIpv6NeighborAddress(Arrays.asList())) - .withImportRoutePolicyId("xitc") - .withExportRoutePolicyId("fcktqumiekke") - .withAnnotation("ikh"); - model = BinaryData.fromObject(model).toObject(InternalNetworkPatch.class); - Assertions.assertEquals(1927044883, model.mtu()); - Assertions.assertEquals("cjzkzivgvvcna", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("lwuip", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("agvrvmnpkuk", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("xg", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("vimjwos", model.bgpConfiguration().annotation()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(113630721, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(322973840, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("lpcirelsf", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("hyoulpjr", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("xitc", model.importRoutePolicyId()); - Assertions.assertEquals("fcktqumiekke", model.exportRoutePolicyId()); - Assertions.assertEquals("ikh", model.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchablePropertiesTests.java deleted file mode 100644 index 5b66200fcf65c..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPatchablePropertiesTests.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworkPatchableProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InternalNetworkPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InternalNetworkPatchableProperties model = - BinaryData - .fromString( - "{\"mtu\":1583051460,\"connectedIPv4Subnets\":[{\"prefix\":\"bxwakbog\",\"annotation\":\"ndlkzgxhurip\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"dxunkbebxmubyyn\",\"annotation\":\"lrb\"},{\"prefix\":\"koievseo\",\"annotation\":\"q\"}],\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"interval\":1136277704,\"multiplier\":883294723},\"ipv4Routes\":[{\"prefix\":\"zizxbmpgcj\",\"nextHop\":[]},{\"prefix\":\"fuzmuvpbtt\",\"nextHop\":[]},{\"prefix\":\"um\",\"nextHop\":[]},{\"prefix\":\"rp\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"bmnzbtbhjpgl\",\"nextHop\":[]},{\"prefix\":\"fgohdneuelfphs\",\"nextHop\":[]},{\"prefix\":\"yhtozfikdowwqu\",\"nextHop\":[]},{\"prefix\":\"v\",\"nextHop\":[]}]},\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"interval\":2116821034,\"multiplier\":476158243},\"defaultRouteOriginate\":\"False\",\"allowAS\":176578322,\"allowASOverride\":\"Enable\",\"fabricASN\":587852733,\"peerASN\":576344277,\"ipv4ListenRangePrefixes\":[\"c\",\"hfwdsjnkaljutiis\",\"acffgdkzzewkfvhq\"],\"ipv6ListenRangePrefixes\":[\"ilvpnppfuflrwd\"],\"ipv4NeighborAddress\":[{\"address\":\"xyjrxsagafcnih\",\"operationalState\":\"qapnedgfbcv\"},{\"address\":\"vq\",\"operationalState\":\"keqdcvdrhvoods\"}],\"ipv6NeighborAddress\":[{\"address\":\"bzdopcj\",\"operationalState\":\"nhdldwmgxcx\"},{\"address\":\"lpmutwuoegrpkhj\",\"operationalState\":\"iyq\"},{\"address\":\"uicpd\",\"operationalState\":\"kzzlvmbmpaxmodf\"},{\"address\":\"efyw\",\"operationalState\":\"pfvmwyhrfou\"}],\"annotation\":\"taakc\"},\"importRoutePolicyId\":\"iyzvqtmnub\",\"exportRoutePolicyId\":\"kpzksmondjmq\"}") - .toObject(InternalNetworkPatchableProperties.class); - Assertions.assertEquals(1583051460, model.mtu()); - Assertions.assertEquals("ndlkzgxhurip", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("bxwakbog", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("lrb", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("dxunkbebxmubyyn", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("zizxbmpgcj", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("bmnzbtbhjpgl", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("taakc", model.bgpConfiguration().annotation()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(176578322, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(576344277, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("c", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("ilvpnppfuflrwd", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("xyjrxsagafcnih", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("bzdopcj", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals("iyzvqtmnub", model.importRoutePolicyId()); - Assertions.assertEquals("kpzksmondjmq", model.exportRoutePolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternalNetworkPatchableProperties model = - new InternalNetworkPatchableProperties() - .withMtu(1583051460) - .withConnectedIPv4Subnets( - Arrays.asList(new ConnectedSubnet().withAnnotation("ndlkzgxhurip").withPrefix("bxwakbog"))) - .withConnectedIPv6Subnets( - Arrays - .asList( - new ConnectedSubnet().withAnnotation("lrb").withPrefix("dxunkbebxmubyyn"), - new ConnectedSubnet().withAnnotation("q").withPrefix("koievseo"))) - .withStaticRouteConfiguration( - new StaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration()) - .withIpv4Routes( - Arrays - .asList( - new StaticRouteProperties().withPrefix("zizxbmpgcj").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("fuzmuvpbtt").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("um").withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("rp").withNextHop(Arrays.asList()))) - .withIpv6Routes( - Arrays - .asList( - new StaticRouteProperties().withPrefix("bmnzbtbhjpgl").withNextHop(Arrays.asList()), - new StaticRouteProperties() - .withPrefix("fgohdneuelfphs") - .withNextHop(Arrays.asList()), - new StaticRouteProperties() - .withPrefix("yhtozfikdowwqu") - .withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("v").withNextHop(Arrays.asList())))) - .withBgpConfiguration( - new BgpConfiguration() - .withAnnotation("taakc") - .withBfdConfiguration(new BfdConfiguration()) - .withDefaultRouteOriginate(BooleanEnumProperty.FALSE) - .withAllowAS(176578322) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(576344277) - .withIpv4ListenRangePrefixes(Arrays.asList("c", "hfwdsjnkaljutiis", "acffgdkzzewkfvhq")) - .withIpv6ListenRangePrefixes(Arrays.asList("ilvpnppfuflrwd")) - .withIpv4NeighborAddress( - Arrays - .asList( - new NeighborAddress().withAddress("xyjrxsagafcnih"), - new NeighborAddress().withAddress("vq"))) - .withIpv6NeighborAddress( - Arrays - .asList( - new NeighborAddress().withAddress("bzdopcj"), - new NeighborAddress().withAddress("lpmutwuoegrpkhj"), - new NeighborAddress().withAddress("uicpd"), - new NeighborAddress().withAddress("efyw")))) - .withImportRoutePolicyId("iyzvqtmnub") - .withExportRoutePolicyId("kpzksmondjmq"); - model = BinaryData.fromObject(model).toObject(InternalNetworkPatchableProperties.class); - Assertions.assertEquals(1583051460, model.mtu()); - Assertions.assertEquals("ndlkzgxhurip", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("bxwakbog", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("lrb", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("dxunkbebxmubyyn", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("zizxbmpgcj", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("bmnzbtbhjpgl", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("taakc", model.bgpConfiguration().annotation()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(176578322, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(576344277, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("c", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("ilvpnppfuflrwd", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("xyjrxsagafcnih", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("bzdopcj", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals("iyzvqtmnub", model.importRoutePolicyId()); - Assertions.assertEquals("kpzksmondjmq", model.exportRoutePolicyId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesTests.java deleted file mode 100644 index d432e9a031ec0..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworkPropertiesTests.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.ConnectedSubnet; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InternalNetworkPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InternalNetworkProperties model = - BinaryData - .fromString( - "{\"disabledOnResources\":[\"gpfqbuace\",\"pzfqrhhuaoppp\"],\"administrativeState\":\"Enabled\",\"bgpDisabledOnResources\":[\"ol\",\"dahzxctobg\",\"kdmoi\"],\"bfdDisabledOnResources\":[\"stmgrcfbunrmfqjh\",\"kxbpvj\"],\"bfdForStaticRoutesDisabledOnResources\":[\"hx\",\"j\"],\"provisioningState\":\"Canceled\",\"vlanId\":8533369,\"mtu\":1804869047,\"connectedIPv4Subnets\":[{\"prefix\":\"tswb\",\"annotation\":\"zvszj\"},{\"prefix\":\"uvjfdxxive\",\"annotation\":\"t\"},{\"prefix\":\"aqtdoqmcbx\",\"annotation\":\"vxysl\"}],\"connectedIPv6Subnets\":[{\"prefix\":\"fxoblytkb\",\"annotation\":\"pe\"},{\"prefix\":\"wfbkrvrns\",\"annotation\":\"hqjohxcrsbfova\"},{\"prefix\":\"ruvw\",\"annotation\":\"sqfsubcgjbirxb\"}],\"staticRouteConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"interval\":716024879,\"multiplier\":520672043},\"ipv4Routes\":[{\"prefix\":\"w\",\"nextHop\":[]}],\"ipv6Routes\":[{\"prefix\":\"t\",\"nextHop\":[]},{\"prefix\":\"tpvjzbexilzznfqq\",\"nextHop\":[]},{\"prefix\":\"vwpm\",\"nextHop\":[]},{\"prefix\":\"taruoujmkcj\",\"nextHop\":[]}]},\"bgpConfiguration\":{\"bfdConfiguration\":{\"administrativeState\":\"Disabled\",\"interval\":75465955,\"multiplier\":778428037},\"defaultRouteOriginate\":\"True\",\"allowAS\":524895743,\"allowASOverride\":\"Disable\",\"fabricASN\":1130044611,\"peerASN\":1074784162,\"ipv4ListenRangePrefixes\":[\"vnaenqpehindoyg\",\"ifthnz\",\"ndslgnayqigynduh\"],\"ipv6ListenRangePrefixes\":[\"qlkth\",\"maqolbgycduie\",\"tgccymvaolpss\"],\"ipv4NeighborAddress\":[{\"address\":\"mmdnbbglzps\",\"operationalState\":\"ydmcwyhzdxssa\"},{\"address\":\"zmnvdfznudaod\",\"operationalState\":\"zbn\"},{\"address\":\"lylpstdb\",\"operationalState\":\"xsrz\"},{\"address\":\"ucerscdntnevfi\",\"operationalState\":\"mygtdssls\"}],\"ipv6NeighborAddress\":[{\"address\":\"eriofzpyqs\",\"operationalState\":\"wab\"},{\"address\":\"tshhszhedp\",\"operationalState\":\"wiwubm\"},{\"address\":\"besldnkwwtppjflc\",\"operationalState\":\"gaokonzmnsikv\"}],\"annotation\":\"qzeqqkdltfzxm\"},\"importRoutePolicyId\":\"v\",\"exportRoutePolicyId\":\"ur\",\"annotation\":\"dkwobdagx\"}") - .toObject(InternalNetworkProperties.class); - Assertions.assertEquals("dkwobdagx", model.annotation()); - Assertions.assertEquals(8533369, model.vlanId()); - Assertions.assertEquals(1804869047, model.mtu()); - Assertions.assertEquals("zvszj", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("tswb", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("pe", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("fxoblytkb", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("w", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("t", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("qzeqqkdltfzxm", model.bgpConfiguration().annotation()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(524895743, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(1074784162, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("vnaenqpehindoyg", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("qlkth", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("mmdnbbglzps", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("eriofzpyqs", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals("v", model.importRoutePolicyId()); - Assertions.assertEquals("ur", model.exportRoutePolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternalNetworkProperties model = - new InternalNetworkProperties() - .withAnnotation("dkwobdagx") - .withVlanId(8533369) - .withMtu(1804869047) - .withConnectedIPv4Subnets( - Arrays - .asList( - new ConnectedSubnet().withAnnotation("zvszj").withPrefix("tswb"), - new ConnectedSubnet().withAnnotation("t").withPrefix("uvjfdxxive"), - new ConnectedSubnet().withAnnotation("vxysl").withPrefix("aqtdoqmcbx"))) - .withConnectedIPv6Subnets( - Arrays - .asList( - new ConnectedSubnet().withAnnotation("pe").withPrefix("fxoblytkb"), - new ConnectedSubnet().withAnnotation("hqjohxcrsbfova").withPrefix("wfbkrvrns"), - new ConnectedSubnet().withAnnotation("sqfsubcgjbirxb").withPrefix("ruvw"))) - .withStaticRouteConfiguration( - new StaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration()) - .withIpv4Routes( - Arrays.asList(new StaticRouteProperties().withPrefix("w").withNextHop(Arrays.asList()))) - .withIpv6Routes( - Arrays - .asList( - new StaticRouteProperties().withPrefix("t").withNextHop(Arrays.asList()), - new StaticRouteProperties() - .withPrefix("tpvjzbexilzznfqq") - .withNextHop(Arrays.asList()), - new StaticRouteProperties().withPrefix("vwpm").withNextHop(Arrays.asList()), - new StaticRouteProperties() - .withPrefix("taruoujmkcj") - .withNextHop(Arrays.asList())))) - .withBgpConfiguration( - new BgpConfiguration() - .withAnnotation("qzeqqkdltfzxm") - .withBfdConfiguration(new BfdConfiguration()) - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(524895743) - .withAllowASOverride(AllowASOverride.DISABLE) - .withPeerAsn(1074784162) - .withIpv4ListenRangePrefixes(Arrays.asList("vnaenqpehindoyg", "ifthnz", "ndslgnayqigynduh")) - .withIpv6ListenRangePrefixes(Arrays.asList("qlkth", "maqolbgycduie", "tgccymvaolpss")) - .withIpv4NeighborAddress( - Arrays - .asList( - new NeighborAddress().withAddress("mmdnbbglzps"), - new NeighborAddress().withAddress("zmnvdfznudaod"), - new NeighborAddress().withAddress("lylpstdb"), - new NeighborAddress().withAddress("ucerscdntnevfi"))) - .withIpv6NeighborAddress( - Arrays - .asList( - new NeighborAddress().withAddress("eriofzpyqs"), - new NeighborAddress().withAddress("tshhszhedp"), - new NeighborAddress().withAddress("besldnkwwtppjflc")))) - .withImportRoutePolicyId("v") - .withExportRoutePolicyId("ur"); - model = BinaryData.fromObject(model).toObject(InternalNetworkProperties.class); - Assertions.assertEquals("dkwobdagx", model.annotation()); - Assertions.assertEquals(8533369, model.vlanId()); - Assertions.assertEquals(1804869047, model.mtu()); - Assertions.assertEquals("zvszj", model.connectedIPv4Subnets().get(0).annotation()); - Assertions.assertEquals("tswb", model.connectedIPv4Subnets().get(0).prefix()); - Assertions.assertEquals("pe", model.connectedIPv6Subnets().get(0).annotation()); - Assertions.assertEquals("fxoblytkb", model.connectedIPv6Subnets().get(0).prefix()); - Assertions.assertEquals("w", model.staticRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("t", model.staticRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("qzeqqkdltfzxm", model.bgpConfiguration().annotation()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(524895743, model.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, model.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(1074784162, model.bgpConfiguration().peerAsn()); - Assertions.assertEquals("vnaenqpehindoyg", model.bgpConfiguration().ipv4ListenRangePrefixes().get(0)); - Assertions.assertEquals("qlkth", model.bgpConfiguration().ipv6ListenRangePrefixes().get(0)); - Assertions.assertEquals("mmdnbbglzps", model.bgpConfiguration().ipv4NeighborAddress().get(0).address()); - Assertions.assertEquals("eriofzpyqs", model.bgpConfiguration().ipv6NeighborAddress().get(0).address()); - Assertions.assertEquals("v", model.importRoutePolicyId()); - Assertions.assertEquals("ur", model.exportRoutePolicyId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateMockTests.java deleted file mode 100644 index 98688069609ca..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksCreateMockTests.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; -import com.azure.resourcemanager.managednetworkfabric.models.BgpConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class InternalNetworksCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"disabledOnResources\":[\"ijiufehgmvfln\",\"yvqkxr\",\"rlniyl\"],\"administrativeState\":\"Enabled\",\"bgpDisabledOnResources\":[\"xzutgqztwhghmupg\",\"yjtcdxabbujftab\"],\"bfdDisabledOnResources\":[\"bklqpxz\",\"cafeddw\",\"nlzafwxudgnh\"],\"bfdForStaticRoutesDisabledOnResources\":[\"krtalvn\",\"wgpbemeluclv\",\"jjukyrdnqodxah\"],\"provisioningState\":\"Succeeded\",\"vlanId\":318386162,\"mtu\":1931668946,\"connectedIPv4Subnets\":[],\"connectedIPv6Subnets\":[],\"staticRouteConfiguration\":{\"ipv4Routes\":[],\"ipv6Routes\":[]},\"bgpConfiguration\":{\"defaultRouteOriginate\":\"False\",\"allowAS\":885497604,\"allowASOverride\":\"Disable\",\"fabricASN\":2088110978,\"peerASN\":794448473,\"ipv4ListenRangePrefixes\":[],\"ipv6ListenRangePrefixes\":[],\"ipv4NeighborAddress\":[],\"ipv6NeighborAddress\":[],\"annotation\":\"txptlghw\"},\"importRoutePolicyId\":\"omew\",\"exportRoutePolicyId\":\"s\",\"annotation\":\"iuh\"},\"id\":\"wmoaiancznvodrrs\",\"name\":\"blxydkxr\",\"type\":\"vvbxiwkgfbqljnq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - InternalNetwork response = - manager - .internalNetworks() - .define("xwbjs") - .withExistingL3IsolationDomain("ka", "mrrqmbzmqkratb") - .withVlanId(1420258043) - .withMtu(1992477161) - .withConnectedIPv4Subnets(Arrays.asList()) - .withConnectedIPv6Subnets(Arrays.asList()) - .withStaticRouteConfiguration( - new StaticRouteConfiguration().withIpv4Routes(Arrays.asList()).withIpv6Routes(Arrays.asList())) - .withBgpConfiguration( - new BgpConfiguration() - .withAnnotation("fq") - .withDefaultRouteOriginate(BooleanEnumProperty.TRUE) - .withAllowAS(1905073411) - .withAllowASOverride(AllowASOverride.ENABLE) - .withPeerAsn(1435760253) - .withIpv4ListenRangePrefixes(Arrays.asList()) - .withIpv6ListenRangePrefixes(Arrays.asList()) - .withIpv4NeighborAddress(Arrays.asList()) - .withIpv6NeighborAddress(Arrays.asList())) - .withImportRoutePolicyId("sqxfxjelgcmpz") - .withExportRoutePolicyId("hhhqxuwyv") - .withAnnotation("co") - .create(); - - Assertions.assertEquals(318386162, response.vlanId()); - Assertions.assertEquals(1931668946, response.mtu()); - Assertions.assertEquals("txptlghw", response.bgpConfiguration().annotation()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, response.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(885497604, response.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.DISABLE, response.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(794448473, response.bgpConfiguration().peerAsn()); - Assertions.assertEquals("omew", response.importRoutePolicyId()); - Assertions.assertEquals("s", response.exportRoutePolicyId()); - Assertions.assertEquals("iuh", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksDeleteMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksDeleteMockTests.java deleted file mode 100644 index 0aeb545eb9bda..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class InternalNetworksDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.internalNetworks().delete("jxcjrmmuabwib", "jogjonmc", "e", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksGetWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksGetWithResponseMockTests.java deleted file mode 100644 index 6c9bb9c851932..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksGetWithResponseMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class InternalNetworksGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"disabledOnResources\":[\"ztgeqmgqzgwld\",\"ychillcecfe\",\"uwaoaguhicqlli\",\"stacsjvhrweftkwq\"],\"administrativeState\":\"Disabled\",\"bgpDisabledOnResources\":[\"sse\",\"aepwamcxtcz\",\"upeuknijduyye\"],\"bfdDisabledOnResources\":[\"djfbocyv\",\"hulrtywikdmhla\"],\"bfdForStaticRoutesDisabledOnResources\":[\"lgbhgauacdi\",\"mxu\"],\"provisioningState\":\"Succeeded\",\"vlanId\":2084049172,\"mtu\":950653208,\"connectedIPv4Subnets\":[],\"connectedIPv6Subnets\":[],\"staticRouteConfiguration\":{\"ipv4Routes\":[],\"ipv6Routes\":[]},\"bgpConfiguration\":{\"defaultRouteOriginate\":\"True\",\"allowAS\":275538982,\"allowASOverride\":\"Enable\",\"fabricASN\":264605971,\"peerASN\":207616404,\"ipv4ListenRangePrefixes\":[],\"ipv6ListenRangePrefixes\":[],\"ipv4NeighborAddress\":[],\"ipv6NeighborAddress\":[],\"annotation\":\"jchnta\"},\"importRoutePolicyId\":\"ay\",\"exportRoutePolicyId\":\"b\",\"annotation\":\"pzealbmqkyojw\"},\"id\":\"fkmbtsuahxsgxj\",\"name\":\"mmzrrscub\",\"type\":\"wsdrnpxqwodif\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - InternalNetwork response = - manager - .internalNetworks() - .getWithResponse("bsjuscvsfx", "gctmgxuupbezq", "cydrtceukdqkk", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(2084049172, response.vlanId()); - Assertions.assertEquals(950653208, response.mtu()); - Assertions.assertEquals("jchnta", response.bgpConfiguration().annotation()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, response.bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(275538982, response.bgpConfiguration().allowAS()); - Assertions.assertEquals(AllowASOverride.ENABLE, response.bgpConfiguration().allowASOverride()); - Assertions.assertEquals(207616404, response.bgpConfiguration().peerAsn()); - Assertions.assertEquals("ay", response.importRoutePolicyId()); - Assertions.assertEquals("b", response.exportRoutePolicyId()); - Assertions.assertEquals("pzealbmqkyojw", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListMockTests.java deleted file mode 100644 index bec72d34f9237..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.AllowASOverride; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetwork; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class InternalNetworksListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"disabledOnResources\":[\"hzjkn\",\"uxgvttxpnr\",\"pzaamrdixtreki\"],\"administrativeState\":\"Disabled\",\"bgpDisabledOnResources\":[\"kbr\",\"ffg\",\"lukkutvlxhrpqhvm\",\"lcouqehbhbcdszir\"],\"bfdDisabledOnResources\":[\"ndo\"],\"bfdForStaticRoutesDisabledOnResources\":[\"blto\",\"rmkfqlwxldykals\"],\"provisioningState\":\"Canceled\",\"vlanId\":1647812585,\"mtu\":2031976151,\"connectedIPv4Subnets\":[],\"connectedIPv6Subnets\":[],\"staticRouteConfiguration\":{\"ipv4Routes\":[],\"ipv6Routes\":[]},\"bgpConfiguration\":{\"defaultRouteOriginate\":\"False\",\"allowAS\":1069835533,\"allowASOverride\":\"Disable\",\"fabricASN\":1737997635,\"peerASN\":1655865038,\"ipv4ListenRangePrefixes\":[],\"ipv6ListenRangePrefixes\":[],\"ipv4NeighborAddress\":[],\"ipv6NeighborAddress\":[],\"annotation\":\"dzyqe\"},\"importRoutePolicyId\":\"yi\",\"exportRoutePolicyId\":\"inbmh\",\"annotation\":\"jijkgqxnhmbke\"},\"id\":\"jauj\",\"name\":\"aan\",\"type\":\"ggiycwkdtaawxwf\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.internalNetworks().list("oyzbamwineofvf", "akpoldtvevbo", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(1647812585, response.iterator().next().vlanId()); - Assertions.assertEquals(2031976151, response.iterator().next().mtu()); - Assertions.assertEquals("dzyqe", response.iterator().next().bgpConfiguration().annotation()); - Assertions - .assertEquals( - BooleanEnumProperty.FALSE, response.iterator().next().bgpConfiguration().defaultRouteOriginate()); - Assertions.assertEquals(1069835533, response.iterator().next().bgpConfiguration().allowAS()); - Assertions - .assertEquals(AllowASOverride.DISABLE, response.iterator().next().bgpConfiguration().allowASOverride()); - Assertions.assertEquals(1655865038, response.iterator().next().bgpConfiguration().peerAsn()); - Assertions.assertEquals("yi", response.iterator().next().importRoutePolicyId()); - Assertions.assertEquals("inbmh", response.iterator().next().exportRoutePolicyId()); - Assertions.assertEquals("jijkgqxnhmbke", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListTests.java deleted file mode 100644 index c47a0be9a1d0a..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/InternalNetworksListTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.InternalNetworkInner; -import com.azure.resourcemanager.managednetworkfabric.models.InternalNetworksList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InternalNetworksListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InternalNetworksList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"disabledOnResources\":[],\"administrativeState\":\"Disabled\",\"bgpDisabledOnResources\":[],\"bfdDisabledOnResources\":[],\"bfdForStaticRoutesDisabledOnResources\":[],\"provisioningState\":\"Failed\",\"vlanId\":708392093,\"mtu\":1032331086,\"connectedIPv4Subnets\":[],\"connectedIPv6Subnets\":[],\"importRoutePolicyId\":\"xzfe\",\"exportRoutePolicyId\":\"tpp\",\"annotation\":\"o\"},\"id\":\"or\",\"name\":\"altol\",\"type\":\"ncwsob\"},{\"properties\":{\"disabledOnResources\":[],\"administrativeState\":\"Disabled\",\"bgpDisabledOnResources\":[],\"bfdDisabledOnResources\":[],\"bfdForStaticRoutesDisabledOnResources\":[],\"provisioningState\":\"Deleting\",\"vlanId\":297328779,\"mtu\":425472203,\"connectedIPv4Subnets\":[],\"connectedIPv6Subnets\":[],\"importRoutePolicyId\":\"fuvglsbjjca\",\"exportRoutePolicyId\":\"xbvtvudu\",\"annotation\":\"cormr\"},\"id\":\"qtvcofudflvkgj\",\"name\":\"bgdknnqv\",\"type\":\"aznqntoru\"},{\"properties\":{\"disabledOnResources\":[],\"administrativeState\":\"Enabled\",\"bgpDisabledOnResources\":[],\"bfdDisabledOnResources\":[],\"bfdForStaticRoutesDisabledOnResources\":[],\"provisioningState\":\"Canceled\",\"vlanId\":103703544,\"mtu\":830439521,\"connectedIPv4Subnets\":[],\"connectedIPv6Subnets\":[],\"importRoutePolicyId\":\"etaebu\",\"exportRoutePolicyId\":\"vdmovsmzlxwabm\",\"annotation\":\"efkifr\"},\"id\":\"puqujmqlgkfbtn\",\"name\":\"oaongbjc\",\"type\":\"tujitcjedft\"},{\"properties\":{\"disabledOnResources\":[],\"administrativeState\":\"Disabled\",\"bgpDisabledOnResources\":[],\"bfdDisabledOnResources\":[],\"bfdForStaticRoutesDisabledOnResources\":[],\"provisioningState\":\"Failed\",\"vlanId\":1994175863,\"mtu\":2090841381,\"connectedIPv4Subnets\":[],\"connectedIPv6Subnets\":[],\"importRoutePolicyId\":\"uicybxarzgszuf\",\"exportRoutePolicyId\":\"ciqopidoa\",\"annotation\":\"iodhkhazxkhnz\"},\"id\":\"nlwntoe\",\"name\":\"okdwb\",\"type\":\"hksz\"}],\"nextLink\":\"mrv\"}") - .toObject(InternalNetworksList.class); - Assertions.assertEquals(708392093, model.value().get(0).vlanId()); - Assertions.assertEquals(1032331086, model.value().get(0).mtu()); - Assertions.assertEquals("xzfe", model.value().get(0).importRoutePolicyId()); - Assertions.assertEquals("tpp", model.value().get(0).exportRoutePolicyId()); - Assertions.assertEquals("o", model.value().get(0).annotation()); - Assertions.assertEquals("mrv", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InternalNetworksList model = - new InternalNetworksList() - .withValue( - Arrays - .asList( - new InternalNetworkInner() - .withVlanId(708392093) - .withMtu(1032331086) - .withConnectedIPv4Subnets(Arrays.asList()) - .withConnectedIPv6Subnets(Arrays.asList()) - .withImportRoutePolicyId("xzfe") - .withExportRoutePolicyId("tpp") - .withAnnotation("o"), - new InternalNetworkInner() - .withVlanId(297328779) - .withMtu(425472203) - .withConnectedIPv4Subnets(Arrays.asList()) - .withConnectedIPv6Subnets(Arrays.asList()) - .withImportRoutePolicyId("fuvglsbjjca") - .withExportRoutePolicyId("xbvtvudu") - .withAnnotation("cormr"), - new InternalNetworkInner() - .withVlanId(103703544) - .withMtu(830439521) - .withConnectedIPv4Subnets(Arrays.asList()) - .withConnectedIPv6Subnets(Arrays.asList()) - .withImportRoutePolicyId("etaebu") - .withExportRoutePolicyId("vdmovsmzlxwabm") - .withAnnotation("efkifr"), - new InternalNetworkInner() - .withVlanId(1994175863) - .withMtu(2090841381) - .withConnectedIPv4Subnets(Arrays.asList()) - .withConnectedIPv6Subnets(Arrays.asList()) - .withImportRoutePolicyId("uicybxarzgszuf") - .withExportRoutePolicyId("ciqopidoa") - .withAnnotation("iodhkhazxkhnz"))) - .withNextLink("mrv"); - model = BinaryData.fromObject(model).toObject(InternalNetworksList.class); - Assertions.assertEquals(708392093, model.value().get(0).vlanId()); - Assertions.assertEquals(1032331086, model.value().get(0).mtu()); - Assertions.assertEquals("xzfe", model.value().get(0).importRoutePolicyId()); - Assertions.assertEquals("tpp", model.value().get(0).exportRoutePolicyId()); - Assertions.assertEquals("o", model.value().get(0).annotation()); - Assertions.assertEquals("mrv", model.nextLink()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateMockTests.java deleted file mode 100644 index 9dcf52a1b629b..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesCreateMockTests.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunity; -import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpCommunitiesCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"action\":\"Deny\",\"wellKnownCommunities\":[\"NoAdvertise\",\"LocalAS\"],\"communityMembers\":[\"qogsfikayian\"],\"provisioningState\":\"Succeeded\",\"annotation\":\"ujtjiqxfz\"},\"location\":\"qttv\",\"tags\":{\"qekewvnqvcd\":\"qhjpenuygbqe\",\"punj\":\"guaucmfdjwnla\",\"sserxhtvsoxhlwn\":\"ikczvvitacgxmf\",\"uuuybnchrsziz\":\"sjgqrsxyp\"},\"id\":\"yuel\",\"name\":\"etndnbfqyggagf\",\"type\":\"nlgmtrwahzjmu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IpCommunity response = - manager - .ipCommunities() - .define("ueio") - .withRegion("op") - .withExistingResourceGroup("uooqjagmdit") - .withTags(mapOf("urbuhhlkyqltq", "m")) - .withAction(CommunityActionTypes.DENY) - .withWellKnownCommunities( - Arrays - .asList( - WellKnownCommunities.NO_ADVERTISE, - WellKnownCommunities.INTERNET, - WellKnownCommunities.NO_EXPORT)) - .withCommunityMembers(Arrays.asList("dt", "delqacslmoto", "bnfxofvc", "k")) - .withAnnotation("azftxejwabmdujtm") - .create(); - - Assertions.assertEquals("qttv", response.location()); - Assertions.assertEquals("qhjpenuygbqe", response.tags().get("qekewvnqvcd")); - Assertions.assertEquals(CommunityActionTypes.DENY, response.action()); - Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, response.wellKnownCommunities().get(0)); - Assertions.assertEquals("qogsfikayian", response.communityMembers().get(0)); - Assertions.assertEquals("ujtjiqxfz", response.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesDeleteMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesDeleteMockTests.java deleted file mode 100644 index 2829e341935c1..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpCommunitiesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.ipCommunities().delete("rpqaf", "fugsnnfhyetefy", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index a79330038a626..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunity; -import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpCommunitiesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"action\":\"Deny\",\"wellKnownCommunities\":[\"NoAdvertise\",\"NoExport\"],\"communityMembers\":[\"tvt\",\"ukyefchnmnahmnxh\",\"xjqirwrweoox\"],\"provisioningState\":\"Canceled\",\"annotation\":\"hx\"},\"location\":\"snewmozqvbub\",\"tags\":{\"sycxhxzgaz\":\"m\",\"hppubowsepdfgkmt\":\"taboidvmf\",\"c\":\"herngb\",\"obkauxofsh\":\"uahokq\"},\"id\":\"phwpnulaiywzej\",\"name\":\"whslwkoj\",\"type\":\"llndnpd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IpCommunity response = - manager - .ipCommunities() - .getByResourceGroupWithResponse("zpofoiyjwpfilk", "kkholvdndvia", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("snewmozqvbub", response.location()); - Assertions.assertEquals("m", response.tags().get("sycxhxzgaz")); - Assertions.assertEquals(CommunityActionTypes.DENY, response.action()); - Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, response.wellKnownCommunities().get(0)); - Assertions.assertEquals("tvt", response.communityMembers().get(0)); - Assertions.assertEquals("hx", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListByResourceGroupMockTests.java deleted file mode 100644 index e2dc498adafdd..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListByResourceGroupMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunity; -import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpCommunitiesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"action\":\"Permit\",\"wellKnownCommunities\":[\"GShut\",\"Internet\"],\"communityMembers\":[\"xrjvzuyturmlm\"],\"provisioningState\":\"Canceled\",\"annotation\":\"lbau\"},\"location\":\"opionszon\",\"tags\":{\"jmyccxlzhcoxov\":\"gajinnixjawrtmj\",\"sfnrdtjxt\":\"ekhenl\",\"cq\":\"r\",\"uslvyjtcvuwkasi\":\"jvidttge\"},\"id\":\"iesfuug\",\"name\":\"tuqfecjxeygtu\",\"type\":\"xu\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.ipCommunities().listByResourceGroup("oc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("opionszon", response.iterator().next().location()); - Assertions.assertEquals("gajinnixjawrtmj", response.iterator().next().tags().get("jmyccxlzhcoxov")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, response.iterator().next().action()); - Assertions.assertEquals(WellKnownCommunities.GSHUT, response.iterator().next().wellKnownCommunities().get(0)); - Assertions.assertEquals("xrjvzuyturmlm", response.iterator().next().communityMembers().get(0)); - Assertions.assertEquals("lbau", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListMockTests.java deleted file mode 100644 index b55c013e017a8..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunity; -import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpCommunitiesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"action\":\"Permit\",\"wellKnownCommunities\":[\"NoExport\",\"NoExport\",\"NoAdvertise\"],\"communityMembers\":[\"wnjlxu\"],\"provisioningState\":\"Canceled\",\"annotation\":\"pusxjb\"},\"location\":\"ehgpdohzjqatu\",\"tags\":{\"cnwfepbnwgfmxjg\":\"gebx\",\"jbgdlfgtdysnaquf\":\"g\",\"zjrwdkqze\":\"qbctqha\",\"fza\":\"yjleziunjx\"},\"id\":\"tkw\",\"name\":\"eg\",\"type\":\"amlbnseqacjjvpil\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.ipCommunities().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ehgpdohzjqatu", response.iterator().next().location()); - Assertions.assertEquals("gebx", response.iterator().next().tags().get("cnwfepbnwgfmxjg")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, response.iterator().next().action()); - Assertions - .assertEquals(WellKnownCommunities.NO_EXPORT, response.iterator().next().wellKnownCommunities().get(0)); - Assertions.assertEquals("wnjlxu", response.iterator().next().communityMembers().get(0)); - Assertions.assertEquals("pusxjb", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListResultTests.java deleted file mode 100644 index 3e8c855a499d5..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitiesListResultTests.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunitiesListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IpCommunitiesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpCommunitiesListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"action\":\"Deny\",\"wellKnownCommunities\":[],\"communityMembers\":[],\"provisioningState\":\"Deleting\",\"annotation\":\"cxtbzsg\"},\"location\":\"c\",\"tags\":{\"jeiachboosfl\":\"ewmdw\",\"fqpte\":\"ro\",\"i\":\"hzzvypyq\",\"npvswjdkirso\":\"z\"},\"id\":\"dqxhcrmnohjtckwh\",\"name\":\"soifiyipjxsqw\",\"type\":\"gr\"},{\"properties\":{\"action\":\"Permit\",\"wellKnownCommunities\":[],\"communityMembers\":[],\"provisioningState\":\"Deleting\",\"annotation\":\"jxvsnbyxqabn\"},\"location\":\"cpc\",\"tags\":{\"jjgpb\":\"urzafb\",\"jmkljavbqidtqajz\":\"oq\",\"hbzhfepg\":\"ulpkudjkrl\"},\"id\":\"gqexzlocxs\",\"name\":\"paierh\",\"type\":\"bcsglumma\"},{\"properties\":{\"action\":\"Permit\",\"wellKnownCommunities\":[],\"communityMembers\":[],\"provisioningState\":\"Deleting\",\"annotation\":\"obnbdxkqpxokaj\"},\"location\":\"npime\",\"tags\":{\"vdjwzrlovm\":\"txgcpodgmaajr\",\"qsycbkbfkgu\":\"lwhijcoejctbzaq\"},\"id\":\"dkexxppofm\",\"name\":\"axcfjpgddtocjjx\",\"type\":\"vpmouexhdzxib\"},{\"properties\":{\"action\":\"Deny\",\"wellKnownCommunities\":[],\"communityMembers\":[],\"provisioningState\":\"Succeeded\",\"annotation\":\"bzv\"},\"location\":\"ntwndeicbtwnpzao\",\"tags\":{\"qkwpyeicxmqc\":\"hrhcffcyddglmjth\",\"pbobjo\":\"wqvhkhixuigdt\",\"w\":\"hm\",\"a\":\"a\"},\"id\":\"hrzayvvtpgvdf\",\"name\":\"iotkftutqxl\",\"type\":\"gxlefgugnxkrxd\"}],\"nextLink\":\"i\"}") - .toObject(IpCommunitiesListResult.class); - Assertions.assertEquals("c", model.value().get(0).location()); - Assertions.assertEquals("ewmdw", model.value().get(0).tags().get("jeiachboosfl")); - Assertions.assertEquals(CommunityActionTypes.DENY, model.value().get(0).action()); - Assertions.assertEquals("cxtbzsg", model.value().get(0).annotation()); - Assertions.assertEquals("i", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpCommunitiesListResult model = - new IpCommunitiesListResult() - .withValue( - Arrays - .asList( - new IpCommunityInner() - .withLocation("c") - .withTags( - mapOf("jeiachboosfl", "ewmdw", "fqpte", "ro", "i", "hzzvypyq", "npvswjdkirso", "z")) - .withAction(CommunityActionTypes.DENY) - .withWellKnownCommunities(Arrays.asList()) - .withCommunityMembers(Arrays.asList()) - .withAnnotation("cxtbzsg"), - new IpCommunityInner() - .withLocation("cpc") - .withTags(mapOf("jjgpb", "urzafb", "jmkljavbqidtqajz", "oq", "hbzhfepg", "ulpkudjkrl")) - .withAction(CommunityActionTypes.PERMIT) - .withWellKnownCommunities(Arrays.asList()) - .withCommunityMembers(Arrays.asList()) - .withAnnotation("jxvsnbyxqabn"), - new IpCommunityInner() - .withLocation("npime") - .withTags(mapOf("vdjwzrlovm", "txgcpodgmaajr", "qsycbkbfkgu", "lwhijcoejctbzaq")) - .withAction(CommunityActionTypes.PERMIT) - .withWellKnownCommunities(Arrays.asList()) - .withCommunityMembers(Arrays.asList()) - .withAnnotation("obnbdxkqpxokaj"), - new IpCommunityInner() - .withLocation("ntwndeicbtwnpzao") - .withTags( - mapOf( - "qkwpyeicxmqc", - "hrhcffcyddglmjth", - "pbobjo", - "wqvhkhixuigdt", - "w", - "hm", - "a", - "a")) - .withAction(CommunityActionTypes.DENY) - .withWellKnownCommunities(Arrays.asList()) - .withCommunityMembers(Arrays.asList()) - .withAnnotation("bzv"))) - .withNextLink("i"); - model = BinaryData.fromObject(model).toObject(IpCommunitiesListResult.class); - Assertions.assertEquals("c", model.value().get(0).location()); - Assertions.assertEquals("ewmdw", model.value().get(0).tags().get("jeiachboosfl")); - Assertions.assertEquals(CommunityActionTypes.DENY, model.value().get(0).action()); - Assertions.assertEquals("cxtbzsg", model.value().get(0).annotation()); - Assertions.assertEquals("i", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityAddOperationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityAddOperationPropertiesTests.java deleted file mode 100644 index 07f0ffe6398e2..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityAddOperationPropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityAddOperationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpCommunityAddOperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpCommunityAddOperationProperties model = - BinaryData - .fromString("{\"add\":{\"ipCommunityIds\":[\"akgacyrcmjdm\"]}}") - .toObject(IpCommunityAddOperationProperties.class); - Assertions.assertEquals("akgacyrcmjdm", model.add().ipCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpCommunityAddOperationProperties model = - new IpCommunityAddOperationProperties() - .withAdd(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("akgacyrcmjdm"))); - model = BinaryData.fromObject(model).toObject(IpCommunityAddOperationProperties.class); - Assertions.assertEquals("akgacyrcmjdm", model.add().ipCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityDeleteOperationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityDeleteOperationPropertiesTests.java deleted file mode 100644 index faf74d2b97dd9..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityDeleteOperationPropertiesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityDeleteOperationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpCommunityDeleteOperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpCommunityDeleteOperationProperties model = - BinaryData - .fromString("{\"delete\":{\"ipCommunityIds\":[\"apvu\",\"rylniofrzg\",\"zjedmstkvnlv\",\"bcuiiz\"]}}") - .toObject(IpCommunityDeleteOperationProperties.class); - Assertions.assertEquals("apvu", model.delete().ipCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpCommunityDeleteOperationProperties model = - new IpCommunityDeleteOperationProperties() - .withDelete( - new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("apvu", "rylniofrzg", "zjedmstkvnlv", "bcuiiz"))); - model = BinaryData.fromObject(model).toObject(IpCommunityDeleteOperationProperties.class); - Assertions.assertEquals("apvu", model.delete().ipCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityIdListTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityIdListTests.java deleted file mode 100644 index 6dd0c7ae4f00d..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityIdListTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpCommunityIdListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpCommunityIdList model = - BinaryData.fromString("{\"ipCommunityIds\":[\"slnelx\"]}").toObject(IpCommunityIdList.class); - Assertions.assertEquals("slnelx", model.ipCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpCommunityIdList model = new IpCommunityIdList().withIpCommunityIds(Arrays.asList("slnelx")); - model = BinaryData.fromObject(model).toObject(IpCommunityIdList.class); - Assertions.assertEquals("slnelx", model.ipCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityInnerTests.java deleted file mode 100644 index 8002c53953053..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityInnerTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IpCommunityInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpCommunityInner model = - BinaryData - .fromString( - "{\"properties\":{\"action\":\"Deny\",\"wellKnownCommunities\":[\"NoAdvertise\"],\"communityMembers\":[\"o\",\"vqwhbmdgbbjfd\",\"gmbmbexppbh\",\"q\"],\"provisioningState\":\"Canceled\",\"annotation\":\"fpfpsalgbquxigj\"},\"location\":\"gzjaoyfhrtxilne\",\"tags\":{\"juvf\":\"jysvl\",\"jkcpr\":\"awrlyx\"},\"id\":\"nwbxgjvtbvpyssz\",\"name\":\"nruj\",\"type\":\"guhmuouqfpr\"}") - .toObject(IpCommunityInner.class); - Assertions.assertEquals("gzjaoyfhrtxilne", model.location()); - Assertions.assertEquals("jysvl", model.tags().get("juvf")); - Assertions.assertEquals(CommunityActionTypes.DENY, model.action()); - Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, model.wellKnownCommunities().get(0)); - Assertions.assertEquals("o", model.communityMembers().get(0)); - Assertions.assertEquals("fpfpsalgbquxigj", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpCommunityInner model = - new IpCommunityInner() - .withLocation("gzjaoyfhrtxilne") - .withTags(mapOf("juvf", "jysvl", "jkcpr", "awrlyx")) - .withAction(CommunityActionTypes.DENY) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.NO_ADVERTISE)) - .withCommunityMembers(Arrays.asList("o", "vqwhbmdgbbjfd", "gmbmbexppbh", "q")) - .withAnnotation("fpfpsalgbquxigj"); - model = BinaryData.fromObject(model).toObject(IpCommunityInner.class); - Assertions.assertEquals("gzjaoyfhrtxilne", model.location()); - Assertions.assertEquals("jysvl", model.tags().get("juvf")); - Assertions.assertEquals(CommunityActionTypes.DENY, model.action()); - Assertions.assertEquals(WellKnownCommunities.NO_ADVERTISE, model.wellKnownCommunities().get(0)); - Assertions.assertEquals("o", model.communityMembers().get(0)); - Assertions.assertEquals("fpfpsalgbquxigj", model.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPatchTests.java deleted file mode 100644 index 93f922e3afd93..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPatchTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IpCommunityPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpCommunityPatch model = - BinaryData - .fromString("{\"tags\":{\"dkfthwxmnt\":\"dzuhtymwi\",\"aop\":\"i\",\"jcmmxdcufufsrp\":\"km\"}}") - .toObject(IpCommunityPatch.class); - Assertions.assertEquals("dzuhtymwi", model.tags().get("dkfthwxmnt")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpCommunityPatch model = - new IpCommunityPatch().withTags(mapOf("dkfthwxmnt", "dzuhtymwi", "aop", "i", "jcmmxdcufufsrp", "km")); - model = BinaryData.fromObject(model).toObject(IpCommunityPatch.class); - Assertions.assertEquals("dzuhtymwi", model.tags().get("dkfthwxmnt")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPropertiesTests.java deleted file mode 100644 index cbea3e86088fd..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunityPropertiesTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpCommunityProperties; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.WellKnownCommunities; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpCommunityPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpCommunityProperties model = - BinaryData - .fromString( - "{\"action\":\"Permit\",\"wellKnownCommunities\":[\"LocalAS\",\"GShut\"],\"communityMembers\":[\"itnwuizgazxufi\",\"uckyf\"],\"provisioningState\":\"Updating\",\"annotation\":\"idf\"}") - .toObject(IpCommunityProperties.class); - Assertions.assertEquals("idf", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action()); - Assertions.assertEquals(WellKnownCommunities.LOCAL_AS, model.wellKnownCommunities().get(0)); - Assertions.assertEquals("itnwuizgazxufi", model.communityMembers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpCommunityProperties model = - new IpCommunityProperties() - .withAnnotation("idf") - .withAction(CommunityActionTypes.PERMIT) - .withWellKnownCommunities(Arrays.asList(WellKnownCommunities.LOCAL_AS, WellKnownCommunities.GSHUT)) - .withCommunityMembers(Arrays.asList("itnwuizgazxufi", "uckyf")); - model = BinaryData.fromObject(model).toObject(IpCommunityProperties.class); - Assertions.assertEquals("idf", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action()); - Assertions.assertEquals(WellKnownCommunities.LOCAL_AS, model.wellKnownCommunities().get(0)); - Assertions.assertEquals("itnwuizgazxufi", model.communityMembers().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitySetOperationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitySetOperationPropertiesTests.java deleted file mode 100644 index f08af497bc8d8..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpCommunitySetOperationPropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunitySetOperationProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpCommunitySetOperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpCommunitySetOperationProperties model = - BinaryData - .fromString("{\"set\":{\"ipCommunityIds\":[\"f\",\"nsnvpd\",\"bmikost\"]}}") - .toObject(IpCommunitySetOperationProperties.class); - Assertions.assertEquals("f", model.set().ipCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpCommunitySetOperationProperties model = - new IpCommunitySetOperationProperties() - .withSet(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("f", "nsnvpd", "bmikost"))); - model = BinaryData.fromObject(model).toObject(IpCommunitySetOperationProperties.class); - Assertions.assertEquals("f", model.set().ipCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateMockTests.java deleted file mode 100644 index 39434696743d9..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesCreateMockTests.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunity; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpExtendedCommunitiesCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"action\":\"Permit\",\"routeTargets\":[\"wlkjxn\",\"pvwgfstmhqykizmd\",\"saoafcluqvox\"],\"provisioningState\":\"Succeeded\",\"annotation\":\"im\"},\"location\":\"vwg\",\"tags\":{\"w\":\"pbmz\",\"bvopwndyqle\":\"sydsxwefohe\",\"lowkxxpvb\":\"llklmtk\",\"k\":\"dfjmzsyzfhotlh\"},\"id\":\"yych\",\"name\":\"nsjlpjrtws\",\"type\":\"hv\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IpExtendedCommunity response = - manager - .ipExtendedCommunities() - .define("kuma") - .withRegion("aclgschorimk") - .withExistingResourceGroup("opfppdbwnupgah") - .withTags(mapOf("puviyfcaabe", "rmoucsofl")) - .withAction(CommunityActionTypes.PERMIT) - .withRouteTargets(Arrays.asList("acfdmmcpugme", "qepvufhbzeh")) - .withAnnotation("qhnlbqnbld") - .create(); - - Assertions.assertEquals("vwg", response.location()); - Assertions.assertEquals("pbmz", response.tags().get("w")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, response.action()); - Assertions.assertEquals("wlkjxn", response.routeTargets().get(0)); - Assertions.assertEquals("im", response.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesDeleteMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesDeleteMockTests.java deleted file mode 100644 index d1331d6b6d4cc..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpExtendedCommunitiesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.ipExtendedCommunities().delete("vkyfedevjbosl", "qxypokkhminq", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 8b9cba807da97..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunity; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpExtendedCommunitiesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"action\":\"Permit\",\"routeTargets\":[\"kwklsnoxaxmq\",\"qalhhjnh\"],\"provisioningState\":\"Succeeded\",\"annotation\":\"yynfsvkhgbv\"},\"location\":\"anarfdlpukhpyrne\",\"tags\":{\"ddbhf\":\"cpeogkhnmgbrou\",\"ontacnpq\":\"pfpazjzoywjxhpdu\",\"xh\":\"tehtuevrhrljyoog\"},\"id\":\"sd\",\"name\":\"ugwbsreurfqkf\",\"type\":\"arenlvhhtklnvnaf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IpExtendedCommunity response = - manager - .ipExtendedCommunities() - .getByResourceGroupWithResponse("ftbyrplro", "kpigqfusu", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("anarfdlpukhpyrne", response.location()); - Assertions.assertEquals("cpeogkhnmgbrou", response.tags().get("ddbhf")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, response.action()); - Assertions.assertEquals("kwklsnoxaxmq", response.routeTargets().get(0)); - Assertions.assertEquals("yynfsvkhgbv", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListByResourceGroupMockTests.java deleted file mode 100644 index a27a0ea0fd228..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListByResourceGroupMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunity; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpExtendedCommunitiesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"action\":\"Permit\",\"routeTargets\":[\"bdxxe\",\"unin\",\"udbchaqdtv\"],\"provisioningState\":\"Failed\",\"annotation\":\"qct\"},\"location\":\"xdtddmflhuytxzv\",\"tags\":{\"prwnwvroevytlyo\":\"apxbannovvoxczy\",\"bcrymodizrx\":\"rrrouuxvnsa\",\"pmkmlmvevfx\":\"lobdxna\"},\"id\":\"op\",\"name\":\"hbzxli\",\"type\":\"hrdd\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.ipExtendedCommunities().listByResourceGroup("ymc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xdtddmflhuytxzv", response.iterator().next().location()); - Assertions.assertEquals("apxbannovvoxczy", response.iterator().next().tags().get("prwnwvroevytlyo")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, response.iterator().next().action()); - Assertions.assertEquals("bdxxe", response.iterator().next().routeTargets().get(0)); - Assertions.assertEquals("qct", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListMockTests.java deleted file mode 100644 index faddef994658b..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitiesListMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunity; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpExtendedCommunitiesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"action\":\"Permit\",\"routeTargets\":[\"xqbawpc\",\"bnzqcyknapq\",\"fyuicdh\"],\"provisioningState\":\"Failed\",\"annotation\":\"bwwg\"},\"location\":\"vibidmhmwffpl\",\"tags\":{\"xoy\":\"vapckccrrvwey\"},\"id\":\"ukphaimmoiroq\",\"name\":\"oshbragapyy\",\"type\":\"mfsvbpav\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.ipExtendedCommunities().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vibidmhmwffpl", response.iterator().next().location()); - Assertions.assertEquals("vapckccrrvwey", response.iterator().next().tags().get("xoy")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, response.iterator().next().action()); - Assertions.assertEquals("xqbawpc", response.iterator().next().routeTargets().get(0)); - Assertions.assertEquals("bwwg", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityAddOperationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityAddOperationPropertiesTests.java deleted file mode 100644 index 97e504b19e48c..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityAddOperationPropertiesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityAddOperationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpExtendedCommunityAddOperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpExtendedCommunityAddOperationProperties model = - BinaryData - .fromString("{\"add\":{\"ipExtendedCommunityIds\":[\"ywwpgjxsnptfuj\",\"icgaao\",\"pttaqutd\"]}}") - .toObject(IpExtendedCommunityAddOperationProperties.class); - Assertions.assertEquals("ywwpgjxsnptfuj", model.add().ipExtendedCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpExtendedCommunityAddOperationProperties model = - new IpExtendedCommunityAddOperationProperties() - .withAdd( - new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("ywwpgjxsnptfuj", "icgaao", "pttaqutd"))); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunityAddOperationProperties.class); - Assertions.assertEquals("ywwpgjxsnptfuj", model.add().ipExtendedCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityDeleteOperationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityDeleteOperationPropertiesTests.java deleted file mode 100644 index 7ad675d80aed4..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityDeleteOperationPropertiesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityDeleteOperationProperties; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpExtendedCommunityDeleteOperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpExtendedCommunityDeleteOperationProperties model = - BinaryData - .fromString("{\"delete\":{\"ipExtendedCommunityIds\":[\"xswvru\",\"nz\",\"jgehkf\"]}}") - .toObject(IpExtendedCommunityDeleteOperationProperties.class); - Assertions.assertEquals("xswvru", model.delete().ipExtendedCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpExtendedCommunityDeleteOperationProperties model = - new IpExtendedCommunityDeleteOperationProperties() - .withDelete( - new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("xswvru", "nz", "jgehkf"))); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunityDeleteOperationProperties.class); - Assertions.assertEquals("xswvru", model.delete().ipExtendedCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityIdListTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityIdListTests.java deleted file mode 100644 index 7e8011bf77edb..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityIdListTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpExtendedCommunityIdListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpExtendedCommunityIdList model = - BinaryData - .fromString("{\"ipExtendedCommunityIds\":[\"xynl\",\"xecwcro\",\"phslhcawjutifdw\",\"mvi\"]}") - .toObject(IpExtendedCommunityIdList.class); - Assertions.assertEquals("xynl", model.ipExtendedCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpExtendedCommunityIdList model = - new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("xynl", "xecwcro", "phslhcawjutifdw", "mvi")); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunityIdList.class); - Assertions.assertEquals("xynl", model.ipExtendedCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityInnerTests.java deleted file mode 100644 index ff446cedd0829..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityInnerTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpExtendedCommunityInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IpExtendedCommunityInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpExtendedCommunityInner model = - BinaryData - .fromString( - "{\"properties\":{\"action\":\"Permit\",\"routeTargets\":[\"zrvqdr\",\"bhj\"],\"provisioningState\":\"Failed\",\"annotation\":\"ehoqfbowskan\"},\"location\":\"tzlcuiywgqywgn\",\"tags\":{\"pphrcgynco\":\"ynhz\",\"vmmcoofs\":\"pec\",\"y\":\"lzevgbmqjqab\"},\"id\":\"mivkwlzuvcc\",\"name\":\"wnfnbacf\",\"type\":\"onlebxetqgtzxdpn\"}") - .toObject(IpExtendedCommunityInner.class); - Assertions.assertEquals("tzlcuiywgqywgn", model.location()); - Assertions.assertEquals("ynhz", model.tags().get("pphrcgynco")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action()); - Assertions.assertEquals("zrvqdr", model.routeTargets().get(0)); - Assertions.assertEquals("ehoqfbowskan", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpExtendedCommunityInner model = - new IpExtendedCommunityInner() - .withLocation("tzlcuiywgqywgn") - .withTags(mapOf("pphrcgynco", "ynhz", "vmmcoofs", "pec", "y", "lzevgbmqjqab")) - .withAction(CommunityActionTypes.PERMIT) - .withRouteTargets(Arrays.asList("zrvqdr", "bhj")) - .withAnnotation("ehoqfbowskan"); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunityInner.class); - Assertions.assertEquals("tzlcuiywgqywgn", model.location()); - Assertions.assertEquals("ynhz", model.tags().get("pphrcgynco")); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action()); - Assertions.assertEquals("zrvqdr", model.routeTargets().get(0)); - Assertions.assertEquals("ehoqfbowskan", model.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityListResultTests.java deleted file mode 100644 index 8420b4a2aa6fa..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityListResultTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpExtendedCommunityInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IpExtendedCommunityListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpExtendedCommunityListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"action\":\"Deny\",\"routeTargets\":[],\"provisioningState\":\"Deleting\",\"annotation\":\"oflokey\"},\"location\":\"enjbdlwtgrhp\",\"tags\":{\"zj\":\"jumasx\"},\"id\":\"qyeg\",\"name\":\"alhbx\",\"type\":\"hejjz\"},{\"properties\":{\"action\":\"Deny\",\"routeTargets\":[],\"provisioningState\":\"Succeeded\",\"annotation\":\"wdslfhotwmcy\"},\"location\":\"wlbjnpgacftade\",\"tags\":{\"usue\":\"ltyfsop\",\"orxzdmohctbqvud\":\"nzwdejba\",\"nvowgujju\":\"xdn\",\"zj\":\"wdkcglhsl\"},\"id\":\"yggdtjixh\",\"name\":\"kuofqweykhme\",\"type\":\"evfyexfwhybcib\"}],\"nextLink\":\"vdcsitynn\"}") - .toObject(IpExtendedCommunityListResult.class); - Assertions.assertEquals("enjbdlwtgrhp", model.value().get(0).location()); - Assertions.assertEquals("jumasx", model.value().get(0).tags().get("zj")); - Assertions.assertEquals(CommunityActionTypes.DENY, model.value().get(0).action()); - Assertions.assertEquals("oflokey", model.value().get(0).annotation()); - Assertions.assertEquals("vdcsitynn", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpExtendedCommunityListResult model = - new IpExtendedCommunityListResult() - .withValue( - Arrays - .asList( - new IpExtendedCommunityInner() - .withLocation("enjbdlwtgrhp") - .withTags(mapOf("zj", "jumasx")) - .withAction(CommunityActionTypes.DENY) - .withRouteTargets(Arrays.asList()) - .withAnnotation("oflokey"), - new IpExtendedCommunityInner() - .withLocation("wlbjnpgacftade") - .withTags( - mapOf( - "usue", - "ltyfsop", - "orxzdmohctbqvud", - "nzwdejba", - "nvowgujju", - "xdn", - "zj", - "wdkcglhsl")) - .withAction(CommunityActionTypes.DENY) - .withRouteTargets(Arrays.asList()) - .withAnnotation("wdslfhotwmcy"))) - .withNextLink("vdcsitynn"); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunityListResult.class); - Assertions.assertEquals("enjbdlwtgrhp", model.value().get(0).location()); - Assertions.assertEquals("jumasx", model.value().get(0).tags().get("zj")); - Assertions.assertEquals(CommunityActionTypes.DENY, model.value().get(0).action()); - Assertions.assertEquals("oflokey", model.value().get(0).annotation()); - Assertions.assertEquals("vdcsitynn", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchTests.java deleted file mode 100644 index 4c130993bbd62..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPatchTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IpExtendedCommunityPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpExtendedCommunityPatch model = - BinaryData - .fromString("{\"tags\":{\"aqw\":\"c\",\"xnj\":\"ochcbonqvpkvl\"}}") - .toObject(IpExtendedCommunityPatch.class); - Assertions.assertEquals("c", model.tags().get("aqw")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpExtendedCommunityPatch model = - new IpExtendedCommunityPatch().withTags(mapOf("aqw", "c", "xnj", "ochcbonqvpkvl")); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunityPatch.class); - Assertions.assertEquals("c", model.tags().get("aqw")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPropertiesTests.java deleted file mode 100644 index 50b1898d63442..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunityPropertiesTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpExtendedCommunityProperties; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpExtendedCommunityPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpExtendedCommunityProperties model = - BinaryData - .fromString( - "{\"action\":\"Permit\",\"routeTargets\":[\"qwxrjfeallnw\"],\"provisioningState\":\"Updating\",\"annotation\":\"snjampmng\"}") - .toObject(IpExtendedCommunityProperties.class); - Assertions.assertEquals("snjampmng", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action()); - Assertions.assertEquals("qwxrjfeallnw", model.routeTargets().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpExtendedCommunityProperties model = - new IpExtendedCommunityProperties() - .withAnnotation("snjampmng") - .withAction(CommunityActionTypes.PERMIT) - .withRouteTargets(Arrays.asList("qwxrjfeallnw")); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunityProperties.class); - Assertions.assertEquals("snjampmng", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action()); - Assertions.assertEquals("qwxrjfeallnw", model.routeTargets().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitySetOperationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitySetOperationPropertiesTests.java deleted file mode 100644 index 383589801c328..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpExtendedCommunitySetOperationPropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunitySetOperationProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpExtendedCommunitySetOperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpExtendedCommunitySetOperationProperties model = - BinaryData - .fromString("{\"set\":{\"ipExtendedCommunityIds\":[\"tixo\",\"ffqyinlj\"]}}") - .toObject(IpExtendedCommunitySetOperationProperties.class); - Assertions.assertEquals("tixo", model.set().ipExtendedCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpExtendedCommunitySetOperationProperties model = - new IpExtendedCommunitySetOperationProperties() - .withSet(new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("tixo", "ffqyinlj"))); - model = BinaryData.fromObject(model).toObject(IpExtendedCommunitySetOperationProperties.class); - Assertions.assertEquals("tixo", model.set().ipExtendedCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixInnerTests.java deleted file mode 100644 index 9331fee6296be..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixInnerTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixInner; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.Condition; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPropertiesIpPrefixRulesItem; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IpPrefixInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpPrefixInner model = - BinaryData - .fromString( - "{\"properties\":{\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":2423895035915397618,\"networkPrefix\":\"ctehfiqscjey\",\"condition\":\"EqualTo\",\"subnetMaskLength\":1363658384},{\"action\":\"Deny\",\"sequenceNumber\":3874337962960415689,\"networkPrefix\":\"q\",\"condition\":\"EqualTo\",\"subnetMaskLength\":1874212634}],\"provisioningState\":\"Deleting\",\"annotation\":\"gm\"},\"location\":\"sle\",\"tags\":{\"k\":\"xyqj\",\"jh\":\"attpngjcrcczsq\",\"ysou\":\"mdajv\",\"canoaeupf\":\"q\"},\"id\":\"yhltrpmopjmcm\",\"name\":\"tuo\",\"type\":\"thfuiuaodsfcpkvx\"}") - .toObject(IpPrefixInner.class); - Assertions.assertEquals("sle", model.location()); - Assertions.assertEquals("xyqj", model.tags().get("k")); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(2423895035915397618L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("ctehfiqscjey", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals(1363658384, model.ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("gm", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpPrefixInner model = - new IpPrefixInner() - .withLocation("sle") - .withTags(mapOf("k", "xyqj", "jh", "attpngjcrcczsq", "ysou", "mdajv", "canoaeupf", "q")) - .withIpPrefixRules( - Arrays - .asList( - new IpPrefixPropertiesIpPrefixRulesItem() - .withAction(CommunityActionTypes.DENY) - .withSequenceNumber(2423895035915397618L) - .withNetworkPrefix("ctehfiqscjey") - .withCondition(Condition.EQUAL_TO) - .withSubnetMaskLength(1363658384), - new IpPrefixPropertiesIpPrefixRulesItem() - .withAction(CommunityActionTypes.DENY) - .withSequenceNumber(3874337962960415689L) - .withNetworkPrefix("q") - .withCondition(Condition.EQUAL_TO) - .withSubnetMaskLength(1874212634))) - .withAnnotation("gm"); - model = BinaryData.fromObject(model).toObject(IpPrefixInner.class); - Assertions.assertEquals("sle", model.location()); - Assertions.assertEquals("xyqj", model.tags().get("k")); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(2423895035915397618L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("ctehfiqscjey", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals(1363658384, model.ipPrefixRules().get(0).subnetMaskLength()); - Assertions.assertEquals("gm", model.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchTests.java deleted file mode 100644 index dc49688edc3c6..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPatchTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IpPrefixPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpPrefixPatch model = - BinaryData.fromString("{\"tags\":{\"dvjsllrmvvdf\":\"rrqnbpoczvyifqrv\"}}").toObject(IpPrefixPatch.class); - Assertions.assertEquals("rrqnbpoczvyifqrv", model.tags().get("dvjsllrmvvdf")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpPrefixPatch model = new IpPrefixPatch().withTags(mapOf("dvjsllrmvvdf", "rrqnbpoczvyifqrv")); - model = BinaryData.fromObject(model).toObject(IpPrefixPatch.class); - Assertions.assertEquals("rrqnbpoczvyifqrv", model.tags().get("dvjsllrmvvdf")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPropertiesIpPrefixRulesItemTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPropertiesIpPrefixRulesItemTests.java deleted file mode 100644 index 7ca71c2ffc962..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPropertiesIpPrefixRulesItemTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.Condition; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPropertiesIpPrefixRulesItem; -import org.junit.jupiter.api.Assertions; - -public final class IpPrefixPropertiesIpPrefixRulesItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpPrefixPropertiesIpPrefixRulesItem model = - BinaryData - .fromString( - "{\"action\":\"Permit\",\"sequenceNumber\":247152507284848729,\"networkPrefix\":\"mddystkiiux\",\"condition\":\"LesserThanOrEqualTo\",\"subnetMaskLength\":1167674004}") - .toObject(IpPrefixPropertiesIpPrefixRulesItem.class); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action()); - Assertions.assertEquals(247152507284848729L, model.sequenceNumber()); - Assertions.assertEquals("mddystkiiux", model.networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.condition()); - Assertions.assertEquals(1167674004, model.subnetMaskLength()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpPrefixPropertiesIpPrefixRulesItem model = - new IpPrefixPropertiesIpPrefixRulesItem() - .withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(247152507284848729L) - .withNetworkPrefix("mddystkiiux") - .withCondition(Condition.LESSER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength(1167674004); - model = BinaryData.fromObject(model).toObject(IpPrefixPropertiesIpPrefixRulesItem.class); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action()); - Assertions.assertEquals(247152507284848729L, model.sequenceNumber()); - Assertions.assertEquals("mddystkiiux", model.networkPrefix()); - Assertions.assertEquals(Condition.LESSER_THAN_OR_EQUAL_TO, model.condition()); - Assertions.assertEquals(1167674004, model.subnetMaskLength()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPropertiesTests.java deleted file mode 100644 index 539b0fb85df44..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixPropertiesTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixProperties; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.Condition; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixPropertiesIpPrefixRulesItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpPrefixPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpPrefixProperties model = - BinaryData - .fromString( - "{\"ipPrefixRules\":[{\"action\":\"Deny\",\"sequenceNumber\":5484313845577670913,\"networkPrefix\":\"zmyzydagf\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":1613770943},{\"action\":\"Permit\",\"sequenceNumber\":196758027124552916,\"networkPrefix\":\"uokktwhrdxwz\",\"condition\":\"GreaterThanOrEqualTo\",\"subnetMaskLength\":436585772}],\"provisioningState\":\"Updating\",\"annotation\":\"reximoryocfs\"}") - .toObject(IpPrefixProperties.class); - Assertions.assertEquals("reximoryocfs", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(5484313845577670913L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("zmyzydagf", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.GREATER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals(1613770943, model.ipPrefixRules().get(0).subnetMaskLength()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpPrefixProperties model = - new IpPrefixProperties() - .withAnnotation("reximoryocfs") - .withIpPrefixRules( - Arrays - .asList( - new IpPrefixPropertiesIpPrefixRulesItem() - .withAction(CommunityActionTypes.DENY) - .withSequenceNumber(5484313845577670913L) - .withNetworkPrefix("zmyzydagf") - .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength(1613770943), - new IpPrefixPropertiesIpPrefixRulesItem() - .withAction(CommunityActionTypes.PERMIT) - .withSequenceNumber(196758027124552916L) - .withNetworkPrefix("uokktwhrdxwz") - .withCondition(Condition.GREATER_THAN_OR_EQUAL_TO) - .withSubnetMaskLength(436585772))); - model = BinaryData.fromObject(model).toObject(IpPrefixProperties.class); - Assertions.assertEquals("reximoryocfs", model.annotation()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.ipPrefixRules().get(0).action()); - Assertions.assertEquals(5484313845577670913L, model.ipPrefixRules().get(0).sequenceNumber()); - Assertions.assertEquals("zmyzydagf", model.ipPrefixRules().get(0).networkPrefix()); - Assertions.assertEquals(Condition.GREATER_THAN_OR_EQUAL_TO, model.ipPrefixRules().get(0).condition()); - Assertions.assertEquals(1613770943, model.ipPrefixRules().get(0).subnetMaskLength()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesCreateMockTests.java deleted file mode 100644 index a26f1edba7b83..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesCreateMockTests.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefix; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpPrefixesCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"ipPrefixRules\":[],\"provisioningState\":\"Succeeded\",\"annotation\":\"xsmlz\"},\"location\":\"zdtxetlgyd\",\"tags\":{\"b\":\"vlnnpx\",\"gjekglklby\":\"fiqgeaar\",\"hj\":\"lidwcwvmzegjon\",\"zhzmtksjci\":\"rwgdnqzbrfks\"},\"id\":\"digsxcdgl\",\"name\":\"plkeuachtomflryt\",\"type\":\"wfpfmdgycx\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IpPrefix response = - manager - .ipPrefixes() - .define("zolxrzvhqjwtr") - .withRegion("smwr") - .withExistingResourceGroup("yjuzkdb") - .withIpPrefixRules(Arrays.asList()) - .withTags( - mapOf( - "tlhguynuchl", - "dxfzzzwyjaf", - "whmozusgzvlnsnnj", - "mltx", - "rag", - "fpafolpymwamxq", - "vl", - "gdphtvdula")) - .withAnnotation("zpcrrkolawj") - .create(); - - Assertions.assertEquals("zdtxetlgyd", response.location()); - Assertions.assertEquals("vlnnpx", response.tags().get("b")); - Assertions.assertEquals("xsmlz", response.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesDeleteMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesDeleteMockTests.java deleted file mode 100644 index 375b8eaecf59a..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpPrefixesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.ipPrefixes().delete("refqy", "qotoihiqakydiwfb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 8c473830f83bf..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefix; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpPrefixesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"ipPrefixRules\":[],\"provisioningState\":\"Canceled\",\"annotation\":\"jgl\"},\"location\":\"cuyzlwhhmemhoocl\",\"tags\":{\"zjkmmykyujxs\":\"pqmem\"},\"id\":\"lhsrrry\",\"name\":\"jylmbkzudnigr\",\"type\":\"ihotjewlpxuzzjg\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IpPrefix response = - manager - .ipPrefixes() - .getByResourceGroupWithResponse("uic", "hvtrrmhwrbfdpyf", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("cuyzlwhhmemhoocl", response.location()); - Assertions.assertEquals("pqmem", response.tags().get("zjkmmykyujxs")); - Assertions.assertEquals("jgl", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListByResourceGroupMockTests.java deleted file mode 100644 index fc70445f9876f..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListByResourceGroupMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefix; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpPrefixesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"ipPrefixRules\":[],\"provisioningState\":\"Updating\",\"annotation\":\"aqa\"},\"location\":\"ipietgbe\",\"tags\":{\"fpubntnbatz\":\"ulbmoichdlp\",\"ttcjuhplrvkmjc\":\"iqsowsaaelc\",\"vkyylizrzbjpsf\":\"mjvlgfgg\"},\"id\":\"sfuztlvtmv\",\"name\":\"gbwidqlvh\",\"type\":\"koveof\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.ipPrefixes().listByResourceGroup("kwpzdqtvh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ipietgbe", response.iterator().next().location()); - Assertions.assertEquals("ulbmoichdlp", response.iterator().next().tags().get("fpubntnbatz")); - Assertions.assertEquals("aqa", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListMockTests.java deleted file mode 100644 index 1960e4fac0042..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefix; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpPrefixesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"ipPrefixRules\":[],\"provisioningState\":\"Updating\",\"annotation\":\"f\"},\"location\":\"jmvl\",\"tags\":{\"juid\":\"giblkujrllf\"},\"id\":\"puuyjucejik\",\"name\":\"oeo\",\"type\":\"vtzejetjklnti\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.ipPrefixes().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jmvl", response.iterator().next().location()); - Assertions.assertEquals("giblkujrllf", response.iterator().next().tags().get("juid")); - Assertions.assertEquals("f", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListResultTests.java deleted file mode 100644 index bb5690e2d6ebe..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/IpPrefixesListResultTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.IpPrefixInner; -import com.azure.resourcemanager.managednetworkfabric.models.IpPrefixesListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IpPrefixesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpPrefixesListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"ipPrefixRules\":[],\"provisioningState\":\"Failed\",\"annotation\":\"pulexxbczw\"},\"location\":\"uwiqzb\",\"tags\":{\"zdobpxjmflbvvnch\":\"sovmyokacspkwl\",\"ajiwkuo\":\"kcciwwzjuqkhr\",\"sauuimj\":\"oskg\"},\"id\":\"vxieduugidyj\",\"name\":\"rfbyaosvexcso\",\"type\":\"pclhocohslk\"}],\"nextLink\":\"leggzfbu\"}") - .toObject(IpPrefixesListResult.class); - Assertions.assertEquals("uwiqzb", model.value().get(0).location()); - Assertions.assertEquals("sovmyokacspkwl", model.value().get(0).tags().get("zdobpxjmflbvvnch")); - Assertions.assertEquals("pulexxbczw", model.value().get(0).annotation()); - Assertions.assertEquals("leggzfbu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpPrefixesListResult model = - new IpPrefixesListResult() - .withValue( - Arrays - .asList( - new IpPrefixInner() - .withLocation("uwiqzb") - .withTags( - mapOf( - "zdobpxjmflbvvnch", - "sovmyokacspkwl", - "ajiwkuo", - "kcciwwzjuqkhr", - "sauuimj", - "oskg")) - .withIpPrefixRules(Arrays.asList()) - .withAnnotation("pulexxbczw"))) - .withNextLink("leggzfbu"); - model = BinaryData.fromObject(model).toObject(IpPrefixesListResult.class); - Assertions.assertEquals("uwiqzb", model.value().get(0).location()); - Assertions.assertEquals("sovmyokacspkwl", model.value().get(0).tags().get("zdobpxjmflbvvnch")); - Assertions.assertEquals("pulexxbczw", model.value().get(0).annotation()); - Assertions.assertEquals("leggzfbu", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainInnerTests.java deleted file mode 100644 index ec02f34b693f0..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainInnerTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class L2IsolationDomainInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - L2IsolationDomainInner model = - BinaryData - .fromString( - "{\"properties\":{\"networkFabricId\":\"mvfaxkffeiith\",\"vlanId\":1335902799,\"mtu\":504857780,\"disabledOnResources\":[\"v\",\"hxmzsbbzoggig\"],\"administrativeState\":\"Disabled\",\"provisioningState\":\"Deleting\",\"annotation\":\"vjxxjnsp\"},\"location\":\"ptkoenkoukn\",\"tags\":{\"kpoc\":\"wtiukbldn\",\"npiucgygevqznty\":\"pazyxoegukg\",\"dpydn\":\"mrbpizcdrqj\",\"sjttgzfbish\":\"yhxdeoejzicwi\"},\"id\":\"bkh\",\"name\":\"jdeyeamdpha\",\"type\":\"alpbuxwgipwhon\"}") - .toObject(L2IsolationDomainInner.class); - Assertions.assertEquals("ptkoenkoukn", model.location()); - Assertions.assertEquals("wtiukbldn", model.tags().get("kpoc")); - Assertions.assertEquals("mvfaxkffeiith", model.networkFabricId()); - Assertions.assertEquals(1335902799, model.vlanId()); - Assertions.assertEquals(504857780, model.mtu()); - Assertions.assertEquals("vjxxjnsp", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L2IsolationDomainInner model = - new L2IsolationDomainInner() - .withLocation("ptkoenkoukn") - .withTags( - mapOf( - "kpoc", - "wtiukbldn", - "npiucgygevqznty", - "pazyxoegukg", - "dpydn", - "mrbpizcdrqj", - "sjttgzfbish", - "yhxdeoejzicwi")) - .withNetworkFabricId("mvfaxkffeiith") - .withVlanId(1335902799) - .withMtu(504857780) - .withAnnotation("vjxxjnsp"); - model = BinaryData.fromObject(model).toObject(L2IsolationDomainInner.class); - Assertions.assertEquals("ptkoenkoukn", model.location()); - Assertions.assertEquals("wtiukbldn", model.tags().get("kpoc")); - Assertions.assertEquals("mvfaxkffeiith", model.networkFabricId()); - Assertions.assertEquals(1335902799, model.vlanId()); - Assertions.assertEquals(504857780, model.mtu()); - Assertions.assertEquals("vjxxjnsp", model.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPatchPropertiesTests.java deleted file mode 100644 index 3502966ade8da..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPatchPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainPatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class L2IsolationDomainPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - L2IsolationDomainPatchProperties model = - BinaryData - .fromString("{\"mtu\":521536914,\"annotation\":\"uko\"}") - .toObject(L2IsolationDomainPatchProperties.class); - Assertions.assertEquals("uko", model.annotation()); - Assertions.assertEquals(521536914, model.mtu()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L2IsolationDomainPatchProperties model = - new L2IsolationDomainPatchProperties().withAnnotation("uko").withMtu(521536914); - model = BinaryData.fromObject(model).toObject(L2IsolationDomainPatchProperties.class); - Assertions.assertEquals("uko", model.annotation()); - Assertions.assertEquals(521536914, model.mtu()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPatchTests.java deleted file mode 100644 index b1bc6652d4799..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPatchTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class L2IsolationDomainPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - L2IsolationDomainPatch model = - BinaryData - .fromString( - "{\"properties\":{\"mtu\":720121920,\"annotation\":\"whzlsicohoq\"},\"tags\":{\"gyxzk\":\"vlryavwhheunmmq\"}}") - .toObject(L2IsolationDomainPatch.class); - Assertions.assertEquals("vlryavwhheunmmq", model.tags().get("gyxzk")); - Assertions.assertEquals(720121920, model.mtu()); - Assertions.assertEquals("whzlsicohoq", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L2IsolationDomainPatch model = - new L2IsolationDomainPatch() - .withTags(mapOf("gyxzk", "vlryavwhheunmmq")) - .withMtu(720121920) - .withAnnotation("whzlsicohoq"); - model = BinaryData.fromObject(model).toObject(L2IsolationDomainPatch.class); - Assertions.assertEquals("vlryavwhheunmmq", model.tags().get("gyxzk")); - Assertions.assertEquals(720121920, model.mtu()); - Assertions.assertEquals("whzlsicohoq", model.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPropertiesTests.java deleted file mode 100644 index a8dfe55bebc2b..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainPropertiesTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainProperties; -import org.junit.jupiter.api.Assertions; - -public final class L2IsolationDomainPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - L2IsolationDomainProperties model = - BinaryData - .fromString( - "{\"networkFabricId\":\"wkgshwa\",\"vlanId\":595861111,\"mtu\":691407592,\"disabledOnResources\":[\"injep\"],\"administrativeState\":\"Enabled\",\"provisioningState\":\"Failed\",\"annotation\":\"wnuzoqftiyqzrnkc\"}") - .toObject(L2IsolationDomainProperties.class); - Assertions.assertEquals("wnuzoqftiyqzrnkc", model.annotation()); - Assertions.assertEquals("wkgshwa", model.networkFabricId()); - Assertions.assertEquals(595861111, model.vlanId()); - Assertions.assertEquals(691407592, model.mtu()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L2IsolationDomainProperties model = - new L2IsolationDomainProperties() - .withAnnotation("wnuzoqftiyqzrnkc") - .withNetworkFabricId("wkgshwa") - .withVlanId(595861111) - .withMtu(691407592); - model = BinaryData.fromObject(model).toObject(L2IsolationDomainProperties.class); - Assertions.assertEquals("wnuzoqftiyqzrnkc", model.annotation()); - Assertions.assertEquals("wkgshwa", model.networkFabricId()); - Assertions.assertEquals(595861111, model.vlanId()); - Assertions.assertEquals(691407592, model.mtu()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCreateMockTests.java deleted file mode 100644 index 721b5f6572f6b..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsCreateMockTests.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class L2IsolationDomainsCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"networkFabricId\":\"ey\",\"vlanId\":967163680,\"mtu\":2064428749,\"disabledOnResources\":[\"ugmrmf\",\"lrxw\",\"oauk\"],\"administrativeState\":\"Enabled\",\"provisioningState\":\"Succeeded\",\"annotation\":\"sizmoae\"},\"location\":\"xjw\",\"tags\":{\"xeiqbpsmg\":\"edwcgyee\",\"dlrgms\":\"mguaml\",\"nxkympqanxrjk\":\"lzgaufcshhvnew\"},\"id\":\"xtwbta\",\"name\":\"ypnyghshxc\",\"type\":\"lhkgmnsghp\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - L2IsolationDomain response = - manager - .l2IsolationDomains() - .define("lwgniiprglvawu") - .withRegion("zqedikdfrdbi") - .withExistingResourceGroup("hoi") - .withTags(mapOf("zcxmjpbyep", "jgeihfqlggwfi", "rc", "mgtvlj")) - .withNetworkFabricId("d") - .withVlanId(1177580445) - .withMtu(340326244) - .withAnnotation("pbbttefjoknss") - .create(); - - Assertions.assertEquals("xjw", response.location()); - Assertions.assertEquals("edwcgyee", response.tags().get("xeiqbpsmg")); - Assertions.assertEquals("ey", response.networkFabricId()); - Assertions.assertEquals(967163680, response.vlanId()); - Assertions.assertEquals(2064428749, response.mtu()); - Assertions.assertEquals("sizmoae", response.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsDeleteMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsDeleteMockTests.java deleted file mode 100644 index 4311a1d53e615..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class L2IsolationDomainsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.l2IsolationDomains().delete("gkkumuikjcj", "aztb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index b66e98e3cac27..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class L2IsolationDomainsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"networkFabricId\":\"dwqslsrhmpqvw\",\"vlanId\":809096880,\"mtu\":1630515349,\"disabledOnResources\":[\"cbrwi\",\"uvqejosovyrrle\",\"esi\"],\"administrativeState\":\"Disabled\",\"provisioningState\":\"Succeeded\",\"annotation\":\"qobbpihehcec\"},\"location\":\"mrqbrjbbmpxdlv\",\"tags\":{\"gzhxog\":\"rexcrseqwjksghu\",\"rkmdyom\":\"ggsvoujkxibdaf\",\"dy\":\"xfbvfb\"},\"id\":\"rhpw\",\"name\":\"gddeimaw\",\"type\":\"o\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - L2IsolationDomain response = - manager - .l2IsolationDomains() - .getByResourceGroupWithResponse("mskwhqjjysl", "rlpshhkv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("mrqbrjbbmpxdlv", response.location()); - Assertions.assertEquals("rexcrseqwjksghu", response.tags().get("gzhxog")); - Assertions.assertEquals("dwqslsrhmpqvw", response.networkFabricId()); - Assertions.assertEquals(809096880, response.vlanId()); - Assertions.assertEquals(1630515349, response.mtu()); - Assertions.assertEquals("qobbpihehcec", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListByResourceGroupMockTests.java deleted file mode 100644 index c4f5cb7955836..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListByResourceGroupMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class L2IsolationDomainsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"networkFabricId\":\"ytwvczcswkacve\",\"vlanId\":1992700575,\"mtu\":1873913067,\"disabledOnResources\":[\"vhb\",\"rnfxtgddp\"],\"administrativeState\":\"Disabled\",\"provisioningState\":\"Updating\",\"annotation\":\"mnaoy\"},\"location\":\"kcoeqswank\",\"tags\":{\"ktgj\":\"tmhdroznnhdr\",\"eml\":\"sggux\",\"ukklelss\":\"ywaeeczgf\",\"smdesqplpvmjcd\":\"blycsxzujksr\"},\"id\":\"ewbidyvteowxv\",\"name\":\"piudeugfsxzecpa\",\"type\":\"wkufykhvuhxepm\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.l2IsolationDomains().listByResourceGroup("snsqowxwcoml", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kcoeqswank", response.iterator().next().location()); - Assertions.assertEquals("tmhdroznnhdr", response.iterator().next().tags().get("ktgj")); - Assertions.assertEquals("ytwvczcswkacve", response.iterator().next().networkFabricId()); - Assertions.assertEquals(1992700575, response.iterator().next().vlanId()); - Assertions.assertEquals(1873913067, response.iterator().next().mtu()); - Assertions.assertEquals("mnaoy", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListMockTests.java deleted file mode 100644 index d587f51f9819d..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomain; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class L2IsolationDomainsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"networkFabricId\":\"tznabao\",\"vlanId\":1546365499,\"mtu\":1031830968,\"disabledOnResources\":[\"djltymkm\",\"guihywar\",\"spphk\",\"xkykxdssjp\"],\"administrativeState\":\"Disabled\",\"provisioningState\":\"Deleting\",\"annotation\":\"xhikkflrmymyin\"},\"location\":\"lhrisw\",\"tags\":{\"ctotiowlx\":\"iiiovgqcgxuugq\"},\"id\":\"e\",\"name\":\"dptjgwdtgukranb\",\"type\":\"wphqlkccuzgygqw\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.l2IsolationDomains().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lhrisw", response.iterator().next().location()); - Assertions.assertEquals("iiiovgqcgxuugq", response.iterator().next().tags().get("ctotiowlx")); - Assertions.assertEquals("tznabao", response.iterator().next().networkFabricId()); - Assertions.assertEquals(1546365499, response.iterator().next().vlanId()); - Assertions.assertEquals(1031830968, response.iterator().next().mtu()); - Assertions.assertEquals("xhikkflrmymyin", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListResultTests.java deleted file mode 100644 index 93e73153fe846..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L2IsolationDomainsListResultTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L2IsolationDomainInner; -import com.azure.resourcemanager.managednetworkfabric.models.L2IsolationDomainsListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class L2IsolationDomainsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - L2IsolationDomainsListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"networkFabricId\":\"j\",\"vlanId\":1640197955,\"mtu\":9347197,\"disabledOnResources\":[],\"administrativeState\":\"Enabled\",\"provisioningState\":\"Succeeded\",\"annotation\":\"gjljyoxgvc\"},\"location\":\"bgsncghkjeszzhb\",\"tags\":{\"fsm\":\"txfvgx\",\"odebfqkkrbmpu\":\"nehmpvecx\",\"wflzlfbxzpuzy\":\"gr\",\"y\":\"ispnqzahmgkbrp\"},\"id\":\"hibnuqqkpika\",\"name\":\"rgvtqag\",\"type\":\"buynhijggm\"}],\"nextLink\":\"fsiarbutr\"}") - .toObject(L2IsolationDomainsListResult.class); - Assertions.assertEquals("bgsncghkjeszzhb", model.value().get(0).location()); - Assertions.assertEquals("txfvgx", model.value().get(0).tags().get("fsm")); - Assertions.assertEquals("j", model.value().get(0).networkFabricId()); - Assertions.assertEquals(1640197955, model.value().get(0).vlanId()); - Assertions.assertEquals(9347197, model.value().get(0).mtu()); - Assertions.assertEquals("gjljyoxgvc", model.value().get(0).annotation()); - Assertions.assertEquals("fsiarbutr", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L2IsolationDomainsListResult model = - new L2IsolationDomainsListResult() - .withValue( - Arrays - .asList( - new L2IsolationDomainInner() - .withLocation("bgsncghkjeszzhb") - .withTags( - mapOf( - "fsm", - "txfvgx", - "odebfqkkrbmpu", - "nehmpvecx", - "wflzlfbxzpuzy", - "gr", - "y", - "ispnqzahmgkbrp")) - .withNetworkFabricId("j") - .withVlanId(1640197955) - .withMtu(9347197) - .withAnnotation("gjljyoxgvc"))) - .withNextLink("fsiarbutr"); - model = BinaryData.fromObject(model).toObject(L2IsolationDomainsListResult.class); - Assertions.assertEquals("bgsncghkjeszzhb", model.value().get(0).location()); - Assertions.assertEquals("txfvgx", model.value().get(0).tags().get("fsm")); - Assertions.assertEquals("j", model.value().get(0).networkFabricId()); - Assertions.assertEquals(1640197955, model.value().get(0).vlanId()); - Assertions.assertEquals(9347197, model.value().get(0).mtu()); - Assertions.assertEquals("gjljyoxgvc", model.value().get(0).annotation()); - Assertions.assertEquals("fsiarbutr", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainInnerTests.java deleted file mode 100644 index 861f0d0c5fbab..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainInnerTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class L3IsolationDomainInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - L3IsolationDomainInner model = - BinaryData - .fromString( - "{\"properties\":{\"networkFabricId\":\"pnazzm\",\"disabledOnResources\":[\"unmpxttd\",\"hrbnlankxmyskpbh\"],\"administrativeState\":\"Disabled\",\"optionBDisabledOnResources\":[\"cxy\",\"ny\"],\"provisioningState\":\"Deleting\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[],\"ipv6Routes\":[]},\"description\":\"xczfcl\",\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"xdbabphlwr\",\"administrativeState\":\"Enabled\"},\"annotation\":\"tsthsucocm\"},\"location\":\"yazttbtwwrqpue\",\"tags\":{\"fey\":\"zywbiex\",\"ujwb\":\"eaxib\"},\"id\":\"qwalmuzyoxaepd\",\"name\":\"zjancuxr\",\"type\":\"d\"}") - .toObject(L3IsolationDomainInner.class); - Assertions.assertEquals("yazttbtwwrqpue", model.location()); - Assertions.assertEquals("zywbiex", model.tags().get("fey")); - Assertions.assertEquals("pnazzm", model.networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.redistributeStaticRoutes()); - Assertions.assertEquals("xczfcl", model.description()); - Assertions.assertEquals("xdbabphlwr", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("tsthsucocm", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L3IsolationDomainInner model = - new L3IsolationDomainInner() - .withLocation("yazttbtwwrqpue") - .withTags(mapOf("fey", "zywbiex", "ujwb", "eaxib")) - .withNetworkFabricId("pnazzm") - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) - .withAggregateRouteConfiguration( - new AggregateRouteConfiguration().withIpv4Routes(Arrays.asList()).withIpv6Routes(Arrays.asList())) - .withDescription("xczfcl") - .withConnectedSubnetRoutePolicy( - new L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy() - .withExportRoutePolicyId("xdbabphlwr")) - .withAnnotation("tsthsucocm"); - model = BinaryData.fromObject(model).toObject(L3IsolationDomainInner.class); - Assertions.assertEquals("yazttbtwwrqpue", model.location()); - Assertions.assertEquals("zywbiex", model.tags().get("fey")); - Assertions.assertEquals("pnazzm", model.networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.redistributeStaticRoutes()); - Assertions.assertEquals("xczfcl", model.description()); - Assertions.assertEquals("xdbabphlwr", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("tsthsucocm", model.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicyTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicyTests.java deleted file mode 100644 index 19a851ad8d0a1..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicyTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; -import org.junit.jupiter.api.Assertions; - -public final class L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy model = - BinaryData - .fromString("{\"exportRoutePolicyId\":\"ids\",\"administrativeState\":\"Disabled\"}") - .toObject(L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy.class); - Assertions.assertEquals("ids", model.exportRoutePolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy model = - new L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy().withExportRoutePolicyId("ids"); - model = BinaryData.fromObject(model).toObject(L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy.class); - Assertions.assertEquals("ids", model.exportRoutePolicyId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchPropertiesTests.java deleted file mode 100644 index 09097814d5f89..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchPropertiesTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainPatchProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class L3IsolationDomainPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - L3IsolationDomainPatchProperties model = - BinaryData - .fromString( - "{\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"dhtldwkyz\"},{\"prefix\":\"utknc\"}],\"ipv6Routes\":[{\"prefix\":\"svlxotogtwrup\"},{\"prefix\":\"xvnmicykvceov\"},{\"prefix\":\"lo\"}]},\"description\":\"oty\",\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"cnjbkcnxdhbt\",\"administrativeState\":\"Enabled\"}}") - .toObject(L3IsolationDomainPatchProperties.class); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); - Assertions.assertEquals("dhtldwkyz", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("svlxotogtwrup", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("oty", model.description()); - Assertions.assertEquals("cnjbkcnxdhbt", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L3IsolationDomainPatchProperties model = - new L3IsolationDomainPatchProperties() - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.FALSE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) - .withAggregateRouteConfiguration( - new AggregateRouteConfiguration() - .withIpv4Routes( - Arrays - .asList( - new AggregateRoute().withPrefix("dhtldwkyz"), - new AggregateRoute().withPrefix("utknc"))) - .withIpv6Routes( - Arrays - .asList( - new AggregateRoute().withPrefix("svlxotogtwrup"), - new AggregateRoute().withPrefix("xvnmicykvceov"), - new AggregateRoute().withPrefix("lo")))) - .withDescription("oty") - .withConnectedSubnetRoutePolicy( - new L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy() - .withExportRoutePolicyId("cnjbkcnxdhbt")); - model = BinaryData.fromObject(model).toObject(L3IsolationDomainPatchProperties.class); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); - Assertions.assertEquals("dhtldwkyz", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("svlxotogtwrup", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("oty", model.description()); - Assertions.assertEquals("cnjbkcnxdhbt", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchTests.java deleted file mode 100644 index 22afb91d97005..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPatchTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatch; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class L3IsolationDomainPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - L3IsolationDomainPatch model = - BinaryData - .fromString( - "{\"properties\":{\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[],\"ipv6Routes\":[]},\"description\":\"ccm\",\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"dxyt\",\"administrativeState\":\"Disabled\"}},\"tags\":{\"fudwpznt\":\"xv\"}}") - .toObject(L3IsolationDomainPatch.class); - Assertions.assertEquals("xv", model.tags().get("fudwpznt")); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); - Assertions.assertEquals("ccm", model.description()); - Assertions.assertEquals("dxyt", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L3IsolationDomainPatch model = - new L3IsolationDomainPatch() - .withTags(mapOf("fudwpznt", "xv")) - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.FALSE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) - .withAggregateRouteConfiguration( - new AggregateRouteConfiguration().withIpv4Routes(Arrays.asList()).withIpv6Routes(Arrays.asList())) - .withDescription("ccm") - .withConnectedSubnetRoutePolicy( - new L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy().withExportRoutePolicyId("dxyt")); - model = BinaryData.fromObject(model).toObject(L3IsolationDomainPatch.class); - Assertions.assertEquals("xv", model.tags().get("fudwpznt")); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); - Assertions.assertEquals("ccm", model.description()); - Assertions.assertEquals("dxyt", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPropertiesTests.java deleted file mode 100644 index e791ceaa3ba88..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainPropertiesTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainProperties; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRoute; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class L3IsolationDomainPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - L3IsolationDomainProperties model = - BinaryData - .fromString( - "{\"networkFabricId\":\"bavxbniwdjswzt\",\"disabledOnResources\":[\"pgn\"],\"administrativeState\":\"Enabled\",\"optionBDisabledOnResources\":[\"pzxbz\",\"fzab\",\"lcuhxwtctyqiklb\"],\"provisioningState\":\"Updating\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[{\"prefix\":\"yuguosvmkfssx\"},{\"prefix\":\"kkfpl\"}],\"ipv6Routes\":[{\"prefix\":\"xnkjzkdesl\"},{\"prefix\":\"lopwiyig\"},{\"prefix\":\"pkdwzbai\"},{\"prefix\":\"bbaumnyquped\"}]},\"description\":\"jn\",\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"khsmtxpsiebt\",\"administrativeState\":\"Disabled\"},\"annotation\":\"esap\"}") - .toObject(L3IsolationDomainProperties.class); - Assertions.assertEquals("esap", model.annotation()); - Assertions.assertEquals("bavxbniwdjswzt", model.networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); - Assertions.assertEquals("yuguosvmkfssx", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("xnkjzkdesl", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("jn", model.description()); - Assertions.assertEquals("khsmtxpsiebt", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L3IsolationDomainProperties model = - new L3IsolationDomainProperties() - .withAnnotation("esap") - .withNetworkFabricId("bavxbniwdjswzt") - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.FALSE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.FALSE) - .withAggregateRouteConfiguration( - new AggregateRouteConfiguration() - .withIpv4Routes( - Arrays - .asList( - new AggregateRoute().withPrefix("yuguosvmkfssx"), - new AggregateRoute().withPrefix("kkfpl"))) - .withIpv6Routes( - Arrays - .asList( - new AggregateRoute().withPrefix("xnkjzkdesl"), - new AggregateRoute().withPrefix("lopwiyig"), - new AggregateRoute().withPrefix("pkdwzbai"), - new AggregateRoute().withPrefix("bbaumnyquped")))) - .withDescription("jn") - .withConnectedSubnetRoutePolicy( - new L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy() - .withExportRoutePolicyId("khsmtxpsiebt")); - model = BinaryData.fromObject(model).toObject(L3IsolationDomainProperties.class); - Assertions.assertEquals("esap", model.annotation()); - Assertions.assertEquals("bavxbniwdjswzt", model.networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, model.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, model.redistributeStaticRoutes()); - Assertions.assertEquals("yuguosvmkfssx", model.aggregateRouteConfiguration().ipv4Routes().get(0).prefix()); - Assertions.assertEquals("xnkjzkdesl", model.aggregateRouteConfiguration().ipv6Routes().get(0).prefix()); - Assertions.assertEquals("jn", model.description()); - Assertions.assertEquals("khsmtxpsiebt", model.connectedSubnetRoutePolicy().exportRoutePolicyId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCreateMockTests.java deleted file mode 100644 index 288fa44572477..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsCreateMockTests.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.AggregateRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class L3IsolationDomainsCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"networkFabricId\":\"k\",\"disabledOnResources\":[\"wwgzwxjlmecvog\",\"gzyvnee\"],\"administrativeState\":\"Enabled\",\"optionBDisabledOnResources\":[\"htmoqqtlffhzbkr\"],\"provisioningState\":\"Succeeded\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[],\"ipv6Routes\":[]},\"description\":\"nq\",\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"dogiyetesyp\",\"administrativeState\":\"Disabled\"},\"annotation\":\"ztjhqtfbovnynkbw\"},\"location\":\"njuhpsprkzya\",\"tags\":{\"vmaonurjt\":\"accxnafbwqroohtu\"},\"id\":\"mghihp\",\"name\":\"ecmslclbl\",\"type\":\"jxl\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - L3IsolationDomain response = - manager - .l3IsolationDomains() - .define("gaqi") - .withRegion("zlpdwwex") - .withExistingResourceGroup("eksgbuxantuygd") - .withTags( - mapOf( - "uuzivensrpmeyyvp", - "vlazipbhpwvqsgny", - "gsksrfhf", - "patlbijp", - "bnxwc", - "olmk", - "fgbrtt", - "ommpvfqaw")) - .withNetworkFabricId("rpiwrqofulo") - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) - .withAggregateRouteConfiguration( - new AggregateRouteConfiguration().withIpv4Routes(Arrays.asList()).withIpv6Routes(Arrays.asList())) - .withDescription("fsrucv") - .withConnectedSubnetRoutePolicy( - new L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy() - .withExportRoutePolicyId("pcjttbstvjeaqn")) - .withAnnotation("fkoxmlghktuidvr") - .create(); - - Assertions.assertEquals("njuhpsprkzya", response.location()); - Assertions.assertEquals("accxnafbwqroohtu", response.tags().get("vmaonurjt")); - Assertions.assertEquals("k", response.networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.FALSE, response.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, response.redistributeStaticRoutes()); - Assertions.assertEquals("nq", response.description()); - Assertions.assertEquals("dogiyetesyp", response.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("ztjhqtfbovnynkbw", response.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsDeleteMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsDeleteMockTests.java deleted file mode 100644 index a23dd72a12e48..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class L3IsolationDomainsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.l3IsolationDomains().delete("gdhxi", "d", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 55da77687e2ca..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class L3IsolationDomainsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"networkFabricId\":\"zvxnqmhrp\",\"disabledOnResources\":[\"fwmkoisqcssffxui\"],\"administrativeState\":\"Disabled\",\"optionBDisabledOnResources\":[\"p\",\"bkdq\",\"rdzsylollgtrczzy\"],\"provisioningState\":\"Updating\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[],\"ipv6Routes\":[]},\"description\":\"urkihci\",\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"efxrdcoxnbk\",\"administrativeState\":\"Enabled\"},\"annotation\":\"urnnqbnqbpiz\"},\"location\":\"ltgrdogypxrxv\",\"tags\":{\"rbxrblmliowxihsp\":\"hwuhvctaf\",\"klsbsbqqqagw\":\"xwqagnepzw\",\"k\":\"rxaomzisglrrcze\",\"yueayfbpcmsp\":\"hltnjadhqoawjq\"},\"id\":\"byrrueqth\",\"name\":\"mg\",\"type\":\"mbscbbx\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - L3IsolationDomain response = - manager - .l3IsolationDomains() - .getByResourceGroupWithResponse("ycphdrwjjkhvyo", "ac", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ltgrdogypxrxv", response.location()); - Assertions.assertEquals("hwuhvctaf", response.tags().get("rbxrblmliowxihsp")); - Assertions.assertEquals("zvxnqmhrp", response.networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, response.redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, response.redistributeStaticRoutes()); - Assertions.assertEquals("urkihci", response.description()); - Assertions.assertEquals("efxrdcoxnbk", response.connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("urnnqbnqbpiz", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListByResourceGroupMockTests.java deleted file mode 100644 index 2f56c5213a25a..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListByResourceGroupMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class L3IsolationDomainsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"networkFabricId\":\"nafcbq\",\"disabledOnResources\":[\"mjel\"],\"administrativeState\":\"Enabled\",\"optionBDisabledOnResources\":[\"geleohdbvq\",\"wzkjopwbeonrlkw\"],\"provisioningState\":\"Deleting\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"True\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[],\"ipv6Routes\":[]},\"description\":\"cptsoqfyiase\",\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"krtt\",\"administrativeState\":\"Enabled\"},\"annotation\":\"isgykiuemvanbwz\"},\"location\":\"mnrxxbsojkl\",\"tags\":{\"rqsgnzx\":\"mdptys\"},\"id\":\"jp\",\"name\":\"lsvjgpliu\",\"type\":\"iqwoyxqvapcoh\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.l3IsolationDomains().listByResourceGroup("opedbwdpyqyybxub", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mnrxxbsojkl", response.iterator().next().location()); - Assertions.assertEquals("mdptys", response.iterator().next().tags().get("rqsgnzx")); - Assertions.assertEquals("nafcbq", response.iterator().next().networkFabricId()); - Assertions - .assertEquals(RedistributeConnectedSubnets.TRUE, response.iterator().next().redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, response.iterator().next().redistributeStaticRoutes()); - Assertions.assertEquals("cptsoqfyiase", response.iterator().next().description()); - Assertions.assertEquals("krtt", response.iterator().next().connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("isgykiuemvanbwz", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListMockTests.java deleted file mode 100644 index 77c82ba5139df..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomain; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class L3IsolationDomainsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"networkFabricId\":\"ucqpqojxcxzrz\",\"disabledOnResources\":[\"dzbenri\",\"cawetzqddt\"],\"administrativeState\":\"Disabled\",\"optionBDisabledOnResources\":[\"hzn\"],\"provisioningState\":\"Canceled\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"False\",\"aggregateRouteConfiguration\":{\"ipv4Routes\":[],\"ipv6Routes\":[]},\"description\":\"jncqtjzmi\",\"connectedSubnetRoutePolicy\":{\"exportRoutePolicyId\":\"bgatzu\",\"administrativeState\":\"Enabled\"},\"annotation\":\"ngrebwg\"},\"location\":\"httzlswvajqfutlx\",\"tags\":{\"aohcmbuocn\":\"zasunwqrjzfrgq\",\"hmbpyryxamebly\":\"r\",\"kmrocxne\":\"yvk\",\"mtodl\":\"v\"},\"id\":\"pyapucygvoav\",\"name\":\"unssxlghieegjl\",\"type\":\"vvpa\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.l3IsolationDomains().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("httzlswvajqfutlx", response.iterator().next().location()); - Assertions.assertEquals("zasunwqrjzfrgq", response.iterator().next().tags().get("aohcmbuocn")); - Assertions.assertEquals("ucqpqojxcxzrz", response.iterator().next().networkFabricId()); - Assertions - .assertEquals(RedistributeConnectedSubnets.TRUE, response.iterator().next().redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.FALSE, response.iterator().next().redistributeStaticRoutes()); - Assertions.assertEquals("jncqtjzmi", response.iterator().next().description()); - Assertions - .assertEquals("bgatzu", response.iterator().next().connectedSubnetRoutePolicy().exportRoutePolicyId()); - Assertions.assertEquals("ngrebwg", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListResultTests.java deleted file mode 100644 index c469622adb4f9..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/L3IsolationDomainsListResultTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.L3IsolationDomainInner; -import com.azure.resourcemanager.managednetworkfabric.models.L3IsolationDomainsListResult; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeConnectedSubnets; -import com.azure.resourcemanager.managednetworkfabric.models.RedistributeStaticRoutes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class L3IsolationDomainsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - L3IsolationDomainsListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"networkFabricId\":\"hl\",\"disabledOnResources\":[],\"administrativeState\":\"Enabled\",\"optionBDisabledOnResources\":[],\"provisioningState\":\"Updating\",\"redistributeConnectedSubnets\":\"True\",\"redistributeStaticRoutes\":\"True\",\"description\":\"sbkyvpycanuzbp\",\"annotation\":\"fkuwbcrnwbmehhse\"},\"location\":\"jusrtslhspk\",\"tags\":{\"melmqkrha\":\"maofmxagkv\",\"aquhcdhm\":\"vljua\",\"rcrgvx\":\"ualaexqpvfadmw\"},\"id\":\"vgomz\",\"name\":\"fmisg\",\"type\":\"bnbbeldawkz\"},{\"properties\":{\"networkFabricId\":\"liourqhak\",\"disabledOnResources\":[],\"administrativeState\":\"Disabled\",\"optionBDisabledOnResources\":[],\"provisioningState\":\"Canceled\",\"redistributeConnectedSubnets\":\"False\",\"redistributeStaticRoutes\":\"True\",\"description\":\"w\",\"annotation\":\"ugicjooxdjebw\"},\"location\":\"cwwfvovbvme\",\"tags\":{\"iotwmcdytdxwit\":\"ivyhzceuojgjrwju\",\"hniskxfbkpyc\":\"nrjawgqwg\",\"l\":\"klwndnhjdauwhv\"},\"id\":\"zbtd\",\"name\":\"xujznbmpowu\",\"type\":\"przqlveu\"}],\"nextLink\":\"upjm\"}") - .toObject(L3IsolationDomainsListResult.class); - Assertions.assertEquals("jusrtslhspk", model.value().get(0).location()); - Assertions.assertEquals("maofmxagkv", model.value().get(0).tags().get("melmqkrha")); - Assertions.assertEquals("hl", model.value().get(0).networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.value().get(0).redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.value().get(0).redistributeStaticRoutes()); - Assertions.assertEquals("sbkyvpycanuzbp", model.value().get(0).description()); - Assertions.assertEquals("fkuwbcrnwbmehhse", model.value().get(0).annotation()); - Assertions.assertEquals("upjm", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - L3IsolationDomainsListResult model = - new L3IsolationDomainsListResult() - .withValue( - Arrays - .asList( - new L3IsolationDomainInner() - .withLocation("jusrtslhspk") - .withTags( - mapOf("melmqkrha", "maofmxagkv", "aquhcdhm", "vljua", "rcrgvx", "ualaexqpvfadmw")) - .withNetworkFabricId("hl") - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.TRUE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) - .withDescription("sbkyvpycanuzbp") - .withAnnotation("fkuwbcrnwbmehhse"), - new L3IsolationDomainInner() - .withLocation("cwwfvovbvme") - .withTags( - mapOf( - "iotwmcdytdxwit", - "ivyhzceuojgjrwju", - "hniskxfbkpyc", - "nrjawgqwg", - "l", - "klwndnhjdauwhv")) - .withNetworkFabricId("liourqhak") - .withRedistributeConnectedSubnets(RedistributeConnectedSubnets.FALSE) - .withRedistributeStaticRoutes(RedistributeStaticRoutes.TRUE) - .withDescription("w") - .withAnnotation("ugicjooxdjebw"))) - .withNextLink("upjm"); - model = BinaryData.fromObject(model).toObject(L3IsolationDomainsListResult.class); - Assertions.assertEquals("jusrtslhspk", model.value().get(0).location()); - Assertions.assertEquals("maofmxagkv", model.value().get(0).tags().get("melmqkrha")); - Assertions.assertEquals("hl", model.value().get(0).networkFabricId()); - Assertions.assertEquals(RedistributeConnectedSubnets.TRUE, model.value().get(0).redistributeConnectedSubnets()); - Assertions.assertEquals(RedistributeStaticRoutes.TRUE, model.value().get(0).redistributeStaticRoutes()); - Assertions.assertEquals("sbkyvpycanuzbp", model.value().get(0).description()); - Assertions.assertEquals("fkuwbcrnwbmehhse", model.value().get(0).annotation()); - Assertions.assertEquals("upjm", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer2ConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer2ConfigurationTests.java deleted file mode 100644 index d7177696aa2c9..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer2ConfigurationTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import org.junit.jupiter.api.Assertions; - -public final class Layer2ConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Layer2Configuration model = - BinaryData - .fromString("{\"portCount\":32473122,\"mtu\":1835039462,\"interfaces\":[\"hrphkmcrjdqn\"]}") - .toObject(Layer2Configuration.class); - Assertions.assertEquals(32473122, model.portCount()); - Assertions.assertEquals(1835039462, model.mtu()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Layer2Configuration model = new Layer2Configuration().withPortCount(32473122).withMtu(1835039462); - model = BinaryData.fromObject(model).toObject(Layer2Configuration.class); - Assertions.assertEquals(32473122, model.portCount()); - Assertions.assertEquals(1835039462, model.mtu()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3ConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3ConfigurationTests.java deleted file mode 100644 index 1dad4e5b1c98a..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3ConfigurationTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3Configuration; -import org.junit.jupiter.api.Assertions; - -public final class Layer3ConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Layer3Configuration model = - BinaryData - .fromString( - "{\"importRoutePolicyId\":\"fzpbgtgkyl\",\"exportRoutePolicyId\":\"ghrjeuutl\",\"peerASN\":409326471,\"vlanId\":234998658,\"fabricASN\":2023455303,\"primaryIpv4Prefix\":\"kvbwnhhtqlgeh\",\"primaryIpv6Prefix\":\"pipifh\",\"secondaryIpv4Prefix\":\"e\",\"secondaryIpv6Prefix\":\"jvgcxtx\"}") - .toObject(Layer3Configuration.class); - Assertions.assertEquals("kvbwnhhtqlgeh", model.primaryIpv4Prefix()); - Assertions.assertEquals("pipifh", model.primaryIpv6Prefix()); - Assertions.assertEquals("e", model.secondaryIpv4Prefix()); - Assertions.assertEquals("jvgcxtx", model.secondaryIpv6Prefix()); - Assertions.assertEquals("fzpbgtgkyl", model.importRoutePolicyId()); - Assertions.assertEquals("ghrjeuutl", model.exportRoutePolicyId()); - Assertions.assertEquals(409326471, model.peerAsn()); - Assertions.assertEquals(234998658, model.vlanId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Layer3Configuration model = - new Layer3Configuration() - .withPrimaryIpv4Prefix("kvbwnhhtqlgeh") - .withPrimaryIpv6Prefix("pipifh") - .withSecondaryIpv4Prefix("e") - .withSecondaryIpv6Prefix("jvgcxtx") - .withImportRoutePolicyId("fzpbgtgkyl") - .withExportRoutePolicyId("ghrjeuutl") - .withPeerAsn(409326471) - .withVlanId(234998658); - model = BinaryData.fromObject(model).toObject(Layer3Configuration.class); - Assertions.assertEquals("kvbwnhhtqlgeh", model.primaryIpv4Prefix()); - Assertions.assertEquals("pipifh", model.primaryIpv6Prefix()); - Assertions.assertEquals("e", model.secondaryIpv4Prefix()); - Assertions.assertEquals("jvgcxtx", model.secondaryIpv6Prefix()); - Assertions.assertEquals("fzpbgtgkyl", model.importRoutePolicyId()); - Assertions.assertEquals("ghrjeuutl", model.exportRoutePolicyId()); - Assertions.assertEquals(409326471, model.peerAsn()); - Assertions.assertEquals(234998658, model.vlanId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3IpPrefixPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3IpPrefixPropertiesTests.java deleted file mode 100644 index e4af2873c34b1..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3IpPrefixPropertiesTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3IpPrefixProperties; -import org.junit.jupiter.api.Assertions; - -public final class Layer3IpPrefixPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Layer3IpPrefixProperties model = - BinaryData - .fromString( - "{\"primaryIpv4Prefix\":\"ebizikayuh\",\"primaryIpv6Prefix\":\"bjbsybb\",\"secondaryIpv4Prefix\":\"r\",\"secondaryIpv6Prefix\":\"ldgmfpgvmpip\"}") - .toObject(Layer3IpPrefixProperties.class); - Assertions.assertEquals("ebizikayuh", model.primaryIpv4Prefix()); - Assertions.assertEquals("bjbsybb", model.primaryIpv6Prefix()); - Assertions.assertEquals("r", model.secondaryIpv4Prefix()); - Assertions.assertEquals("ldgmfpgvmpip", model.secondaryIpv6Prefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Layer3IpPrefixProperties model = - new Layer3IpPrefixProperties() - .withPrimaryIpv4Prefix("ebizikayuh") - .withPrimaryIpv6Prefix("bjbsybb") - .withSecondaryIpv4Prefix("r") - .withSecondaryIpv6Prefix("ldgmfpgvmpip"); - model = BinaryData.fromObject(model).toObject(Layer3IpPrefixProperties.class); - Assertions.assertEquals("ebizikayuh", model.primaryIpv4Prefix()); - Assertions.assertEquals("bjbsybb", model.primaryIpv6Prefix()); - Assertions.assertEquals("r", model.secondaryIpv4Prefix()); - Assertions.assertEquals("ldgmfpgvmpip", model.secondaryIpv6Prefix()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3OptionAPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3OptionAPropertiesTests.java deleted file mode 100644 index a7b380fb06453..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/Layer3OptionAPropertiesTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3OptionAProperties; -import org.junit.jupiter.api.Assertions; - -public final class Layer3OptionAPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Layer3OptionAProperties model = - BinaryData - .fromString( - "{\"mtu\":911357247,\"vlanId\":1795251983,\"fabricASN\":1597087074,\"peerASN\":396051915,\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"interval\":1155079568,\"multiplier\":576283685},\"primaryIpv4Prefix\":\"durgkakmokz\",\"primaryIpv6Prefix\":\"jk\",\"secondaryIpv4Prefix\":\"fhmouwq\",\"secondaryIpv6Prefix\":\"zrfze\"}") - .toObject(Layer3OptionAProperties.class); - Assertions.assertEquals("durgkakmokz", model.primaryIpv4Prefix()); - Assertions.assertEquals("jk", model.primaryIpv6Prefix()); - Assertions.assertEquals("fhmouwq", model.secondaryIpv4Prefix()); - Assertions.assertEquals("zrfze", model.secondaryIpv6Prefix()); - Assertions.assertEquals(911357247, model.mtu()); - Assertions.assertEquals(1795251983, model.vlanId()); - Assertions.assertEquals(396051915, model.peerAsn()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Layer3OptionAProperties model = - new Layer3OptionAProperties() - .withPrimaryIpv4Prefix("durgkakmokz") - .withPrimaryIpv6Prefix("jk") - .withSecondaryIpv4Prefix("fhmouwq") - .withSecondaryIpv6Prefix("zrfze") - .withMtu(911357247) - .withVlanId(1795251983) - .withPeerAsn(396051915) - .withBfdConfiguration(new BfdConfiguration()); - model = BinaryData.fromObject(model).toObject(Layer3OptionAProperties.class); - Assertions.assertEquals("durgkakmokz", model.primaryIpv4Prefix()); - Assertions.assertEquals("jk", model.primaryIpv6Prefix()); - Assertions.assertEquals("fhmouwq", model.secondaryIpv4Prefix()); - Assertions.assertEquals("zrfze", model.secondaryIpv6Prefix()); - Assertions.assertEquals(911357247, model.mtu()); - Assertions.assertEquals(1795251983, model.vlanId()); - Assertions.assertEquals(396051915, model.peerAsn()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedResourceGroupConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedResourceGroupConfigurationTests.java deleted file mode 100644 index 16df6e7b22962..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagedResourceGroupConfigurationTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class ManagedResourceGroupConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedResourceGroupConfiguration model = - BinaryData - .fromString("{\"name\":\"ril\",\"location\":\"apeewchpxlkt\"}") - .toObject(ManagedResourceGroupConfiguration.class); - Assertions.assertEquals("ril", model.name()); - Assertions.assertEquals("apeewchpxlkt", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedResourceGroupConfiguration model = - new ManagedResourceGroupConfiguration().withName("ril").withLocation("apeewchpxlkt"); - model = BinaryData.fromObject(model).toObject(ManagedResourceGroupConfiguration.class); - Assertions.assertEquals("ril", model.name()); - Assertions.assertEquals("apeewchpxlkt", model.location()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationTests.java deleted file mode 100644 index 6e3ed325092a9..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/ManagementNetworkConfigurationTests.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.ManagementNetworkConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBPropertiesAutoGenerated; -import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ManagementNetworkConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagementNetworkConfiguration model = - BinaryData - .fromString( - "{\"infrastructureVpnConfiguration\":{\"administrativeState\":\"Disabled\",\"networkToNetworkInterconnectId\":\"vekqvgqo\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"zmpjwyiv\",\"ikf\",\"cvhrfsp\"],\"exportRouteTargets\":[\"agr\",\"tikteusqczkvykl\",\"ubyjaffmmf\",\"lcqcuubgqibrt\"]},\"optionAProperties\":{\"mtu\":1749229509,\"vlanId\":1690066547,\"peerASN\":1172631030,\"primaryIpv4Prefix\":\"slqxi\",\"primaryIpv6Prefix\":\"rmooizqse\",\"secondaryIpv4Prefix\":\"xiutcx\",\"secondaryIpv6Prefix\":\"zhyrpeto\"}},\"workloadVpnConfiguration\":{\"administrativeState\":\"Enabled\",\"networkToNetworkInterconnectId\":\"oxslh\",\"peeringOption\":\"OptionA\",\"optionBProperties\":{\"importRouteTargets\":[\"abrqnkkzj\",\"jb\",\"rgaehvvibrxjj\",\"toqbeitpkxztmoob\"],\"exportRouteTargets\":[\"ft\",\"dgfcwqmp\",\"maqxzhemjyh\",\"hujswtwkozzwcul\"]},\"optionAProperties\":{\"mtu\":1258117952,\"vlanId\":2128381794,\"peerASN\":23704541,\"primaryIpv4Prefix\":\"wltlwtjjguktalh\",\"primaryIpv6Prefix\":\"vkcdmxzr\",\"secondaryIpv4Prefix\":\"aimlnwiaaom\",\"secondaryIpv6Prefix\":\"weazul\"}}}") - .toObject(ManagementNetworkConfiguration.class); - Assertions.assertEquals(PeeringOption.OPTIONA, model.infrastructureVpnConfiguration().peeringOption()); - Assertions - .assertEquals( - "zmpjwyiv", model.infrastructureVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions - .assertEquals( - "agr", model.infrastructureVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions - .assertEquals("slqxi", model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions - .assertEquals("rmooizqse", model.infrastructureVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions - .assertEquals("xiutcx", model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions - .assertEquals("zhyrpeto", model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1749229509, model.infrastructureVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(1690066547, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(1172631030, model.infrastructureVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.workloadVpnConfiguration().peeringOption()); - Assertions - .assertEquals( - "abrqnkkzj", model.workloadVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("ft", model.workloadVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions - .assertEquals("wltlwtjjguktalh", model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("vkcdmxzr", model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions - .assertEquals("aimlnwiaaom", model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("weazul", model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1258117952, model.workloadVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(2128381794, model.workloadVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(23704541, model.workloadVpnConfiguration().optionAProperties().peerAsn()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagementNetworkConfiguration model = - new ManagementNetworkConfiguration() - .withInfrastructureVpnConfiguration( - new VpnConfigurationProperties() - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties( - new OptionBPropertiesAutoGenerated() - .withImportRouteTargets(Arrays.asList("zmpjwyiv", "ikf", "cvhrfsp")) - .withExportRouteTargets( - Arrays.asList("agr", "tikteusqczkvykl", "ubyjaffmmf", "lcqcuubgqibrt"))) - .withOptionAProperties( - new OptionAProperties() - .withPrimaryIpv4Prefix("slqxi") - .withPrimaryIpv6Prefix("rmooizqse") - .withSecondaryIpv4Prefix("xiutcx") - .withSecondaryIpv6Prefix("zhyrpeto") - .withMtu(1749229509) - .withVlanId(1690066547) - .withPeerAsn(1172631030))) - .withWorkloadVpnConfiguration( - new VpnConfigurationProperties() - .withPeeringOption(PeeringOption.OPTIONA) - .withOptionBProperties( - new OptionBPropertiesAutoGenerated() - .withImportRouteTargets( - Arrays.asList("abrqnkkzj", "jb", "rgaehvvibrxjj", "toqbeitpkxztmoob")) - .withExportRouteTargets( - Arrays.asList("ft", "dgfcwqmp", "maqxzhemjyh", "hujswtwkozzwcul"))) - .withOptionAProperties( - new OptionAProperties() - .withPrimaryIpv4Prefix("wltlwtjjguktalh") - .withPrimaryIpv6Prefix("vkcdmxzr") - .withSecondaryIpv4Prefix("aimlnwiaaom") - .withSecondaryIpv6Prefix("weazul") - .withMtu(1258117952) - .withVlanId(2128381794) - .withPeerAsn(23704541))); - model = BinaryData.fromObject(model).toObject(ManagementNetworkConfiguration.class); - Assertions.assertEquals(PeeringOption.OPTIONA, model.infrastructureVpnConfiguration().peeringOption()); - Assertions - .assertEquals( - "zmpjwyiv", model.infrastructureVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions - .assertEquals( - "agr", model.infrastructureVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions - .assertEquals("slqxi", model.infrastructureVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions - .assertEquals("rmooizqse", model.infrastructureVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions - .assertEquals("xiutcx", model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions - .assertEquals("zhyrpeto", model.infrastructureVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1749229509, model.infrastructureVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(1690066547, model.infrastructureVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(1172631030, model.infrastructureVpnConfiguration().optionAProperties().peerAsn()); - Assertions.assertEquals(PeeringOption.OPTIONA, model.workloadVpnConfiguration().peeringOption()); - Assertions - .assertEquals( - "abrqnkkzj", model.workloadVpnConfiguration().optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("ft", model.workloadVpnConfiguration().optionBProperties().exportRouteTargets().get(0)); - Assertions - .assertEquals("wltlwtjjguktalh", model.workloadVpnConfiguration().optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("vkcdmxzr", model.workloadVpnConfiguration().optionAProperties().primaryIpv6Prefix()); - Assertions - .assertEquals("aimlnwiaaom", model.workloadVpnConfiguration().optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("weazul", model.workloadVpnConfiguration().optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1258117952, model.workloadVpnConfiguration().optionAProperties().mtu()); - Assertions.assertEquals(2128381794, model.workloadVpnConfiguration().optionAProperties().vlanId()); - Assertions.assertEquals(23704541, model.workloadVpnConfiguration().optionAProperties().peerAsn()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressTests.java deleted file mode 100644 index a4a0c3d4aaade..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NeighborAddressTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.NeighborAddress; -import org.junit.jupiter.api.Assertions; - -public final class NeighborAddressTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NeighborAddress model = - BinaryData - .fromString("{\"address\":\"queziky\",\"operationalState\":\"gxk\"}") - .toObject(NeighborAddress.class); - Assertions.assertEquals("queziky", model.address()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NeighborAddress model = new NeighborAddress().withAddress("queziky"); - model = BinaryData.fromObject(model).toObject(NeighborAddress.class); - Assertions.assertEquals("queziky", model.address()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceInnerTests.java deleted file mode 100644 index 94181040fdebe..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceInnerTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleTypes; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NetworkDeviceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkDeviceInner model = - BinaryData - .fromString( - "{\"properties\":{\"version\":\"onasxifto\",\"networkDeviceSku\":\"qyzhf\",\"networkDeviceRole\":\"ToR\",\"provisioningState\":\"Updating\",\"networkRackId\":\"ogczhonnxkrlg\",\"hostName\":\"hmossxkkgth\",\"serialNumber\":\"gh\",\"annotation\":\"bdhqxvcxgf\"},\"location\":\"dsofbshrns\",\"tags\":{\"jsrtk\":\"swdvzyybycnun\",\"uxzejntpsew\":\"awnopqgikyzirtxd\"},\"id\":\"ioilqukrydxtq\",\"name\":\"ieoxorggufhyaomt\",\"type\":\"ghhavgrvkffo\"}") - .toObject(NetworkDeviceInner.class); - Assertions.assertEquals("dsofbshrns", model.location()); - Assertions.assertEquals("swdvzyybycnun", model.tags().get("jsrtk")); - Assertions.assertEquals("qyzhf", model.networkDeviceSku()); - Assertions.assertEquals(NetworkDeviceRoleTypes.TOR, model.networkDeviceRole()); - Assertions.assertEquals("hmossxkkgth", model.hostname()); - Assertions.assertEquals("gh", model.serialNumber()); - Assertions.assertEquals("bdhqxvcxgf", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDeviceInner model = - new NetworkDeviceInner() - .withLocation("dsofbshrns") - .withTags(mapOf("jsrtk", "swdvzyybycnun", "uxzejntpsew", "awnopqgikyzirtxd")) - .withNetworkDeviceSku("qyzhf") - .withNetworkDeviceRole(NetworkDeviceRoleTypes.TOR) - .withHostname("hmossxkkgth") - .withSerialNumber("gh") - .withAnnotation("bdhqxvcxgf"); - model = BinaryData.fromObject(model).toObject(NetworkDeviceInner.class); - Assertions.assertEquals("dsofbshrns", model.location()); - Assertions.assertEquals("swdvzyybycnun", model.tags().get("jsrtk")); - Assertions.assertEquals("qyzhf", model.networkDeviceSku()); - Assertions.assertEquals(NetworkDeviceRoleTypes.TOR, model.networkDeviceRole()); - Assertions.assertEquals("hmossxkkgth", model.hostname()); - Assertions.assertEquals("gh", model.serialNumber()); - Assertions.assertEquals("bdhqxvcxgf", model.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchParametersPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchParametersPropertiesTests.java deleted file mode 100644 index 6a7c0c3aa697c..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchParametersPropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDevicePatchParametersProperties; -import org.junit.jupiter.api.Assertions; - -public final class NetworkDevicePatchParametersPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkDevicePatchParametersProperties model = - BinaryData - .fromString( - "{\"hostName\":\"qjlihhyuspska\",\"serialNumber\":\"vlmfwdgzxulucv\",\"annotation\":\"mrsreuzvxurisjnh\"}") - .toObject(NetworkDevicePatchParametersProperties.class); - Assertions.assertEquals("mrsreuzvxurisjnh", model.annotation()); - Assertions.assertEquals("qjlihhyuspska", model.hostname()); - Assertions.assertEquals("vlmfwdgzxulucv", model.serialNumber()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDevicePatchParametersProperties model = - new NetworkDevicePatchParametersProperties() - .withAnnotation("mrsreuzvxurisjnh") - .withHostname("qjlihhyuspska") - .withSerialNumber("vlmfwdgzxulucv"); - model = BinaryData.fromObject(model).toObject(NetworkDevicePatchParametersProperties.class); - Assertions.assertEquals("mrsreuzvxurisjnh", model.annotation()); - Assertions.assertEquals("qjlihhyuspska", model.hostname()); - Assertions.assertEquals("vlmfwdgzxulucv", model.serialNumber()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchParametersTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchParametersTests.java deleted file mode 100644 index 364f23810a1af..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchParametersTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchParameters; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NetworkDevicePatchParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkDevicePatchParameters model = - BinaryData - .fromString( - "{\"properties\":{\"hostName\":\"aojfm\",\"serialNumber\":\"cotmr\",\"annotation\":\"irctymoxoftpipiw\"},\"tags\":{\"a\":\"uh\"}}") - .toObject(NetworkDevicePatchParameters.class); - Assertions.assertEquals("uh", model.tags().get("a")); - Assertions.assertEquals("aojfm", model.hostname()); - Assertions.assertEquals("cotmr", model.serialNumber()); - Assertions.assertEquals("irctymoxoftpipiw", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDevicePatchParameters model = - new NetworkDevicePatchParameters() - .withTags(mapOf("a", "uh")) - .withHostname("aojfm") - .withSerialNumber("cotmr") - .withAnnotation("irctymoxoftpipiw"); - model = BinaryData.fromObject(model).toObject(NetworkDevicePatchParameters.class); - Assertions.assertEquals("uh", model.tags().get("a")); - Assertions.assertEquals("aojfm", model.hostname()); - Assertions.assertEquals("cotmr", model.serialNumber()); - Assertions.assertEquals("irctymoxoftpipiw", model.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchablePropertiesTests.java deleted file mode 100644 index 7ddae7b8d1c08..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePatchablePropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicePatchableProperties; -import org.junit.jupiter.api.Assertions; - -public final class NetworkDevicePatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkDevicePatchableProperties model = - BinaryData - .fromString("{\"hostName\":\"iyujviylwdshfs\",\"serialNumber\":\"rbgyefry\"}") - .toObject(NetworkDevicePatchableProperties.class); - Assertions.assertEquals("iyujviylwdshfs", model.hostname()); - Assertions.assertEquals("rbgyefry", model.serialNumber()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDevicePatchableProperties model = - new NetworkDevicePatchableProperties().withHostname("iyujviylwdshfs").withSerialNumber("rbgyefry"); - model = BinaryData.fromObject(model).toObject(NetworkDevicePatchableProperties.class); - Assertions.assertEquals("iyujviylwdshfs", model.hostname()); - Assertions.assertEquals("rbgyefry", model.serialNumber()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePropertiesTests.java deleted file mode 100644 index b604e9bc45961..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicePropertiesTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleTypes; -import org.junit.jupiter.api.Assertions; - -public final class NetworkDevicePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkDeviceProperties model = - BinaryData - .fromString( - "{\"version\":\"zh\",\"networkDeviceSku\":\"jbibg\",\"networkDeviceRole\":\"Management\",\"provisioningState\":\"Canceled\",\"networkRackId\":\"mv\",\"hostName\":\"luyovwxnbkfezzx\",\"serialNumber\":\"yhwzdgiruj\",\"annotation\":\"bomvzzbtdcqv\"}") - .toObject(NetworkDeviceProperties.class); - Assertions.assertEquals("bomvzzbtdcqv", model.annotation()); - Assertions.assertEquals("jbibg", model.networkDeviceSku()); - Assertions.assertEquals(NetworkDeviceRoleTypes.MANAGEMENT, model.networkDeviceRole()); - Assertions.assertEquals("luyovwxnbkfezzx", model.hostname()); - Assertions.assertEquals("yhwzdgiruj", model.serialNumber()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDeviceProperties model = - new NetworkDeviceProperties() - .withAnnotation("bomvzzbtdcqv") - .withNetworkDeviceSku("jbibg") - .withNetworkDeviceRole(NetworkDeviceRoleTypes.MANAGEMENT) - .withHostname("luyovwxnbkfezzx") - .withSerialNumber("yhwzdgiruj"); - model = BinaryData.fromObject(model).toObject(NetworkDeviceProperties.class); - Assertions.assertEquals("bomvzzbtdcqv", model.annotation()); - Assertions.assertEquals("jbibg", model.networkDeviceSku()); - Assertions.assertEquals(NetworkDeviceRoleTypes.MANAGEMENT, model.networkDeviceRole()); - Assertions.assertEquals("luyovwxnbkfezzx", model.hostname()); - Assertions.assertEquals("yhwzdgiruj", model.serialNumber()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceRolePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceRolePropertiesTests.java deleted file mode 100644 index f218f1eec0921..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceRolePropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRackRoleType; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleProperties; -import org.junit.jupiter.api.Assertions; - -public final class NetworkDeviceRolePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkDeviceRoleProperties model = - BinaryData - .fromString("{\"networkDeviceSkuName\":\"dzaapmudqme\",\"roleType\":\"NPB\",\"rackSlot\":1979942108}") - .toObject(NetworkDeviceRoleProperties.class); - Assertions.assertEquals("dzaapmudqme", model.networkDeviceSkuName()); - Assertions.assertEquals(NetworkDeviceRackRoleType.NPB, model.roleType()); - Assertions.assertEquals(1979942108, model.rackSlot()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDeviceRoleProperties model = - new NetworkDeviceRoleProperties() - .withNetworkDeviceSkuName("dzaapmudqme") - .withRoleType(NetworkDeviceRackRoleType.NPB) - .withRackSlot(1979942108); - model = BinaryData.fromObject(model).toObject(NetworkDeviceRoleProperties.class); - Assertions.assertEquals("dzaapmudqme", model.networkDeviceSkuName()); - Assertions.assertEquals(NetworkDeviceRackRoleType.NPB, model.roleType()); - Assertions.assertEquals(1979942108, model.rackSlot()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuInnerTests.java deleted file mode 100644 index 3c107c4c19ceb..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuInnerTests.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuInner; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceLimits; -import com.azure.resourcemanager.managednetworkfabric.models.IsCurrentVersion; -import com.azure.resourcemanager.managednetworkfabric.models.IsTestVersion; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedVersionProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkDeviceSkuInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkDeviceSkuInner model = - BinaryData - .fromString( - "{\"properties\":{\"model\":\"vvyhg\",\"manufacturer\":\"pbyrqufegxu\",\"supportedVersions\":[{\"version\":\"bnhlmc\",\"vendorOsVersion\":\"p\",\"vendorFirmwareVersion\":\"gitvg\",\"isCurrent\":\"true\",\"isTest\":\"false\"}],\"limits\":{\"physicalInterfaceCount\":479082652,\"maxSubInterfaces\":1918183021,\"maxTunnelInterfaces\":1594893264,\"maxVirtualRouterFunctions\":2074654020,\"maxBorderGatewayProtocolPeers\":1102514107,\"maxBidirectionalForwardingDetectionPeers\":520387101},\"supportedRoleTypes\":[\"ToR\",\"TS\",\"NPB\",\"TS\"],\"interfaces\":[{\"identifier\":\"ccbdre\",\"interfaceType\":\"hcexdrrvqa\",\"supportedConnectorTypes\":[]},{\"identifier\":\"ghtpw\",\"interfaceType\":\"nhyjsv\",\"supportedConnectorTypes\":[]},{\"identifier\":\"xzb\",\"interfaceType\":\"oowvrv\",\"supportedConnectorTypes\":[]},{\"identifier\":\"jqppyostronzmy\",\"interfaceType\":\"fipns\",\"supportedConnectorTypes\":[]}],\"provisioningState\":\"Succeeded\"},\"id\":\"a\",\"name\":\"krrjrea\",\"type\":\"xt\"}") - .toObject(NetworkDeviceSkuInner.class); - Assertions.assertEquals("vvyhg", model.model()); - Assertions.assertEquals("pbyrqufegxu", model.manufacturer()); - Assertions.assertEquals("bnhlmc", model.supportedVersions().get(0).version()); - Assertions.assertEquals("p", model.supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("gitvg", model.supportedVersions().get(0).vendorFirmwareVersion()); - Assertions.assertEquals(IsCurrentVersion.TRUE, model.supportedVersions().get(0).isCurrent()); - Assertions.assertEquals(IsTestVersion.FALSE, model.supportedVersions().get(0).isTest()); - Assertions.assertEquals(479082652, model.limits().physicalInterfaceCount()); - Assertions.assertEquals(1918183021, model.limits().maxSubInterfaces()); - Assertions.assertEquals(1594893264, model.limits().maxTunnelInterfaces()); - Assertions.assertEquals(2074654020, model.limits().maxVirtualRouterFunctions()); - Assertions.assertEquals(1102514107, model.limits().maxBorderGatewayProtocolPeers()); - Assertions.assertEquals(520387101, model.limits().maxBidirectionalForwardingDetectionPeers()); - Assertions.assertEquals(NetworkDeviceRoleName.TOR, model.supportedRoleTypes().get(0)); - Assertions.assertEquals("ccbdre", model.interfaces().get(0).identifier()); - Assertions.assertEquals("hcexdrrvqa", model.interfaces().get(0).interfaceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDeviceSkuInner model = - new NetworkDeviceSkuInner() - .withModel("vvyhg") - .withManufacturer("pbyrqufegxu") - .withSupportedVersions( - Arrays - .asList( - new SupportedVersionProperties() - .withVersion("bnhlmc") - .withVendorOsVersion("p") - .withVendorFirmwareVersion("gitvg") - .withIsCurrent(IsCurrentVersion.TRUE) - .withIsTest(IsTestVersion.FALSE))) - .withLimits( - new DeviceLimits() - .withPhysicalInterfaceCount(479082652) - .withMaxSubInterfaces(1918183021) - .withMaxTunnelInterfaces(1594893264) - .withMaxVirtualRouterFunctions(2074654020) - .withMaxBorderGatewayProtocolPeers(1102514107) - .withMaxBidirectionalForwardingDetectionPeers(520387101)) - .withSupportedRoleTypes( - Arrays - .asList( - NetworkDeviceRoleName.TOR, - NetworkDeviceRoleName.TS, - NetworkDeviceRoleName.NPB, - NetworkDeviceRoleName.TS)) - .withInterfaces( - Arrays - .asList( - new DeviceInterfaceProperties() - .withIdentifier("ccbdre") - .withInterfaceType("hcexdrrvqa") - .withSupportedConnectorTypes(Arrays.asList()), - new DeviceInterfaceProperties() - .withIdentifier("ghtpw") - .withInterfaceType("nhyjsv") - .withSupportedConnectorTypes(Arrays.asList()), - new DeviceInterfaceProperties() - .withIdentifier("xzb") - .withInterfaceType("oowvrv") - .withSupportedConnectorTypes(Arrays.asList()), - new DeviceInterfaceProperties() - .withIdentifier("jqppyostronzmy") - .withInterfaceType("fipns") - .withSupportedConnectorTypes(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(NetworkDeviceSkuInner.class); - Assertions.assertEquals("vvyhg", model.model()); - Assertions.assertEquals("pbyrqufegxu", model.manufacturer()); - Assertions.assertEquals("bnhlmc", model.supportedVersions().get(0).version()); - Assertions.assertEquals("p", model.supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("gitvg", model.supportedVersions().get(0).vendorFirmwareVersion()); - Assertions.assertEquals(IsCurrentVersion.TRUE, model.supportedVersions().get(0).isCurrent()); - Assertions.assertEquals(IsTestVersion.FALSE, model.supportedVersions().get(0).isTest()); - Assertions.assertEquals(479082652, model.limits().physicalInterfaceCount()); - Assertions.assertEquals(1918183021, model.limits().maxSubInterfaces()); - Assertions.assertEquals(1594893264, model.limits().maxTunnelInterfaces()); - Assertions.assertEquals(2074654020, model.limits().maxVirtualRouterFunctions()); - Assertions.assertEquals(1102514107, model.limits().maxBorderGatewayProtocolPeers()); - Assertions.assertEquals(520387101, model.limits().maxBidirectionalForwardingDetectionPeers()); - Assertions.assertEquals(NetworkDeviceRoleName.TOR, model.supportedRoleTypes().get(0)); - Assertions.assertEquals("ccbdre", model.interfaces().get(0).identifier()); - Assertions.assertEquals("hcexdrrvqa", model.interfaces().get(0).interfaceType()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuPropertiesTests.java deleted file mode 100644 index 252e10e3a64e4..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkuPropertiesTests.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuProperties; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceInterfaceProperties; -import com.azure.resourcemanager.managednetworkfabric.models.DeviceLimits; -import com.azure.resourcemanager.managednetworkfabric.models.IsCurrentVersion; -import com.azure.resourcemanager.managednetworkfabric.models.IsTestVersion; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedVersionProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkDeviceSkuPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkDeviceSkuProperties model = - BinaryData - .fromString( - "{\"model\":\"gumhjglikkxws\",\"manufacturer\":\"lbqpvuzlmvfelf\",\"supportedVersions\":[{\"version\":\"lcrpw\",\"vendorOsVersion\":\"eznoig\",\"vendorFirmwareVersion\":\"njwmwkpnbsazejj\",\"isCurrent\":\"false\",\"isTest\":\"false\"},{\"version\":\"hsxttaugzxnf\",\"vendorOsVersion\":\"zpxdt\",\"vendorFirmwareVersion\":\"dm\",\"isCurrent\":\"true\",\"isTest\":\"false\"},{\"version\":\"uenvrkp\",\"vendorOsVersion\":\"uaibrebqaaysj\",\"vendorFirmwareVersion\":\"xqtnq\",\"isCurrent\":\"true\",\"isTest\":\"true\"},{\"version\":\"fffiak\",\"vendorOsVersion\":\"pqqmted\",\"vendorFirmwareVersion\":\"mmji\",\"isCurrent\":\"true\",\"isTest\":\"true\"}],\"limits\":{\"physicalInterfaceCount\":951782119,\"maxSubInterfaces\":1018976472,\"maxTunnelInterfaces\":52872288,\"maxVirtualRouterFunctions\":1025592132,\"maxBorderGatewayProtocolPeers\":1587371608,\"maxBidirectionalForwardingDetectionPeers\":367245568},\"supportedRoleTypes\":[\"Management\"],\"interfaces\":[{\"identifier\":\"dscwxqupevzhf\",\"interfaceType\":\"otxhojujby\",\"supportedConnectorTypes\":[]}],\"provisioningState\":\"Failed\"}") - .toObject(NetworkDeviceSkuProperties.class); - Assertions.assertEquals("gumhjglikkxws", model.model()); - Assertions.assertEquals("lbqpvuzlmvfelf", model.manufacturer()); - Assertions.assertEquals("lcrpw", model.supportedVersions().get(0).version()); - Assertions.assertEquals("eznoig", model.supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("njwmwkpnbsazejj", model.supportedVersions().get(0).vendorFirmwareVersion()); - Assertions.assertEquals(IsCurrentVersion.FALSE, model.supportedVersions().get(0).isCurrent()); - Assertions.assertEquals(IsTestVersion.FALSE, model.supportedVersions().get(0).isTest()); - Assertions.assertEquals(951782119, model.limits().physicalInterfaceCount()); - Assertions.assertEquals(1018976472, model.limits().maxSubInterfaces()); - Assertions.assertEquals(52872288, model.limits().maxTunnelInterfaces()); - Assertions.assertEquals(1025592132, model.limits().maxVirtualRouterFunctions()); - Assertions.assertEquals(1587371608, model.limits().maxBorderGatewayProtocolPeers()); - Assertions.assertEquals(367245568, model.limits().maxBidirectionalForwardingDetectionPeers()); - Assertions.assertEquals(NetworkDeviceRoleName.MANAGEMENT, model.supportedRoleTypes().get(0)); - Assertions.assertEquals("dscwxqupevzhf", model.interfaces().get(0).identifier()); - Assertions.assertEquals("otxhojujby", model.interfaces().get(0).interfaceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDeviceSkuProperties model = - new NetworkDeviceSkuProperties() - .withModel("gumhjglikkxws") - .withManufacturer("lbqpvuzlmvfelf") - .withSupportedVersions( - Arrays - .asList( - new SupportedVersionProperties() - .withVersion("lcrpw") - .withVendorOsVersion("eznoig") - .withVendorFirmwareVersion("njwmwkpnbsazejj") - .withIsCurrent(IsCurrentVersion.FALSE) - .withIsTest(IsTestVersion.FALSE), - new SupportedVersionProperties() - .withVersion("hsxttaugzxnf") - .withVendorOsVersion("zpxdt") - .withVendorFirmwareVersion("dm") - .withIsCurrent(IsCurrentVersion.TRUE) - .withIsTest(IsTestVersion.FALSE), - new SupportedVersionProperties() - .withVersion("uenvrkp") - .withVendorOsVersion("uaibrebqaaysj") - .withVendorFirmwareVersion("xqtnq") - .withIsCurrent(IsCurrentVersion.TRUE) - .withIsTest(IsTestVersion.TRUE), - new SupportedVersionProperties() - .withVersion("fffiak") - .withVendorOsVersion("pqqmted") - .withVendorFirmwareVersion("mmji") - .withIsCurrent(IsCurrentVersion.TRUE) - .withIsTest(IsTestVersion.TRUE))) - .withLimits( - new DeviceLimits() - .withPhysicalInterfaceCount(951782119) - .withMaxSubInterfaces(1018976472) - .withMaxTunnelInterfaces(52872288) - .withMaxVirtualRouterFunctions(1025592132) - .withMaxBorderGatewayProtocolPeers(1587371608) - .withMaxBidirectionalForwardingDetectionPeers(367245568)) - .withSupportedRoleTypes(Arrays.asList(NetworkDeviceRoleName.MANAGEMENT)) - .withInterfaces( - Arrays - .asList( - new DeviceInterfaceProperties() - .withIdentifier("dscwxqupevzhf") - .withInterfaceType("otxhojujby") - .withSupportedConnectorTypes(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(NetworkDeviceSkuProperties.class); - Assertions.assertEquals("gumhjglikkxws", model.model()); - Assertions.assertEquals("lbqpvuzlmvfelf", model.manufacturer()); - Assertions.assertEquals("lcrpw", model.supportedVersions().get(0).version()); - Assertions.assertEquals("eznoig", model.supportedVersions().get(0).vendorOsVersion()); - Assertions.assertEquals("njwmwkpnbsazejj", model.supportedVersions().get(0).vendorFirmwareVersion()); - Assertions.assertEquals(IsCurrentVersion.FALSE, model.supportedVersions().get(0).isCurrent()); - Assertions.assertEquals(IsTestVersion.FALSE, model.supportedVersions().get(0).isTest()); - Assertions.assertEquals(951782119, model.limits().physicalInterfaceCount()); - Assertions.assertEquals(1018976472, model.limits().maxSubInterfaces()); - Assertions.assertEquals(52872288, model.limits().maxTunnelInterfaces()); - Assertions.assertEquals(1025592132, model.limits().maxVirtualRouterFunctions()); - Assertions.assertEquals(1587371608, model.limits().maxBorderGatewayProtocolPeers()); - Assertions.assertEquals(367245568, model.limits().maxBidirectionalForwardingDetectionPeers()); - Assertions.assertEquals(NetworkDeviceRoleName.MANAGEMENT, model.supportedRoleTypes().get(0)); - Assertions.assertEquals("dscwxqupevzhf", model.interfaces().get(0).identifier()); - Assertions.assertEquals("otxhojujby", model.interfaces().get(0).interfaceType()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusGetWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusGetWithResponseMockTests.java deleted file mode 100644 index 04f6633e3d6cf..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusGetWithResponseMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSku; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkDeviceSkusGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"model\":\"hgf\",\"manufacturer\":\"tzlexbs\",\"supportedVersions\":[],\"limits\":{\"physicalInterfaceCount\":269107120,\"maxSubInterfaces\":1279554044,\"maxTunnelInterfaces\":553630822,\"maxVirtualRouterFunctions\":1537365328,\"maxBorderGatewayProtocolPeers\":1263064497,\"maxBidirectionalForwardingDetectionPeers\":231052255},\"supportedRoleTypes\":[\"ToR\",\"NPB\",\"NPB\"],\"interfaces\":[],\"provisioningState\":\"Failed\"},\"id\":\"ljselp\",\"name\":\"pbafvafhlbylc\",\"type\":\"bevxrhyzd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkDeviceSku response = - manager.networkDeviceSkus().getWithResponse("yqiq", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("hgf", response.model()); - Assertions.assertEquals("tzlexbs", response.manufacturer()); - Assertions.assertEquals(269107120, response.limits().physicalInterfaceCount()); - Assertions.assertEquals(1279554044, response.limits().maxSubInterfaces()); - Assertions.assertEquals(553630822, response.limits().maxTunnelInterfaces()); - Assertions.assertEquals(1537365328, response.limits().maxVirtualRouterFunctions()); - Assertions.assertEquals(1263064497, response.limits().maxBorderGatewayProtocolPeers()); - Assertions.assertEquals(231052255, response.limits().maxBidirectionalForwardingDetectionPeers()); - Assertions.assertEquals(NetworkDeviceRoleName.TOR, response.supportedRoleTypes().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListMockTests.java deleted file mode 100644 index 8ef646331f662..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSku; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkDeviceSkusListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"model\":\"wrso\",\"manufacturer\":\"ltdb\",\"supportedVersions\":[],\"limits\":{\"physicalInterfaceCount\":230207599,\"maxSubInterfaces\":1425884711,\"maxTunnelInterfaces\":1212551870,\"maxVirtualRouterFunctions\":956599834,\"maxBorderGatewayProtocolPeers\":1669403612,\"maxBidirectionalForwardingDetectionPeers\":1226325830},\"supportedRoleTypes\":[\"NPB\",\"TS\"],\"interfaces\":[],\"provisioningState\":\"Updating\"},\"id\":\"uhd\",\"name\":\"wsigrbjbxsj\",\"type\":\"bvitvqkjya\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.networkDeviceSkus().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wrso", response.iterator().next().model()); - Assertions.assertEquals("ltdb", response.iterator().next().manufacturer()); - Assertions.assertEquals(230207599, response.iterator().next().limits().physicalInterfaceCount()); - Assertions.assertEquals(1425884711, response.iterator().next().limits().maxSubInterfaces()); - Assertions.assertEquals(1212551870, response.iterator().next().limits().maxTunnelInterfaces()); - Assertions.assertEquals(956599834, response.iterator().next().limits().maxVirtualRouterFunctions()); - Assertions.assertEquals(1669403612, response.iterator().next().limits().maxBorderGatewayProtocolPeers()); - Assertions - .assertEquals(1226325830, response.iterator().next().limits().maxBidirectionalForwardingDetectionPeers()); - Assertions.assertEquals(NetworkDeviceRoleName.NPB, response.iterator().next().supportedRoleTypes().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListResultTests.java deleted file mode 100644 index 5bf3fee22ce05..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDeviceSkusListResultTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceSkuInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSkusListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkDeviceSkusListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkDeviceSkusListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"model\":\"vtgsei\",\"manufacturer\":\"fiufx\",\"supportedVersions\":[],\"supportedRoleTypes\":[],\"interfaces\":[],\"provisioningState\":\"Canceled\"},\"id\":\"epttwqmsniff\",\"name\":\"dmqnrojlpij\",\"type\":\"k\"}],\"nextLink\":\"frddhcrati\"}") - .toObject(NetworkDeviceSkusListResult.class); - Assertions.assertEquals("vtgsei", model.value().get(0).model()); - Assertions.assertEquals("fiufx", model.value().get(0).manufacturer()); - Assertions.assertEquals("frddhcrati", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDeviceSkusListResult model = - new NetworkDeviceSkusListResult() - .withValue( - Arrays - .asList( - new NetworkDeviceSkuInner() - .withModel("vtgsei") - .withManufacturer("fiufx") - .withSupportedVersions(Arrays.asList()) - .withSupportedRoleTypes(Arrays.asList()) - .withInterfaces(Arrays.asList()))) - .withNextLink("frddhcrati"); - model = BinaryData.fromObject(model).toObject(NetworkDeviceSkusListResult.class); - Assertions.assertEquals("vtgsei", model.value().get(0).model()); - Assertions.assertEquals("fiufx", model.value().get(0).manufacturer()); - Assertions.assertEquals("frddhcrati", model.nextLink()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesCreateMockTests.java deleted file mode 100644 index 3c355a95ef35b..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesCreateMockTests.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleTypes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkDevicesCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"version\":\"agttm\",\"networkDeviceSku\":\"mmagoaqylkjzt\",\"networkDeviceRole\":\"CE\",\"provisioningState\":\"Succeeded\",\"networkRackId\":\"jcg\",\"hostName\":\"itpfinzcpdl\",\"serialNumber\":\"rlgjm\",\"annotation\":\"drvcqguef\"},\"location\":\"ompheqdur\",\"tags\":{\"clcdigptajbrzmq\":\"ujlfyoumpcky\",\"lxiutgjcyzyzjdnr\":\"ucycijo\",\"xjeaoqaqbzgyh\":\"jb\",\"v\":\"w\"},\"id\":\"atbwbqam\",\"name\":\"e\",\"type\":\"liys\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkDevice response = - manager - .networkDevices() - .define("erppt") - .withRegion("bui") - .withExistingResourceGroup("rtudawlpjfel") - .withTags(mapOf("b", "vatvcrkd", "ov", "bqxvhcsyhzlwxae")) - .withNetworkDeviceSku("alwcjgckbb") - .withNetworkDeviceRole(NetworkDeviceRoleTypes.CE) - .withHostname("ffatsgftipw") - .withSerialNumber("byubhiqdxyurnpn") - .withAnnotation("zafccnuhiigb") - .create(); - - Assertions.assertEquals("ompheqdur", response.location()); - Assertions.assertEquals("ujlfyoumpcky", response.tags().get("clcdigptajbrzmq")); - Assertions.assertEquals("mmagoaqylkjzt", response.networkDeviceSku()); - Assertions.assertEquals(NetworkDeviceRoleTypes.CE, response.networkDeviceRole()); - Assertions.assertEquals("itpfinzcpdl", response.hostname()); - Assertions.assertEquals("rlgjm", response.serialNumber()); - Assertions.assertEquals("drvcqguef", response.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesDeleteMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesDeleteMockTests.java deleted file mode 100644 index 9061deb10c8c3..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkDevicesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.networkDevices().delete("kk", "nmgzvyfijdkzuqnw", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 818309eb72c21..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleTypes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkDevicesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"version\":\"xn\",\"networkDeviceSku\":\"akizvoaikna\",\"networkDeviceRole\":\"NPB\",\"provisioningState\":\"Updating\",\"networkRackId\":\"iguyxlykwphv\",\"hostName\":\"cwxhmpej\",\"serialNumber\":\"ke\",\"annotation\":\"onwivkcqhrxhxkn\"},\"location\":\"crmmkyupijuby\",\"tags\":{\"em\":\"kakfqfr\"},\"id\":\"il\",\"name\":\"udxjascowv\",\"type\":\"djkpdxph\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkDevice response = - manager - .networkDevices() - .getByResourceGroupWithResponse("nu", "tggmuwdchozfnkfe", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("crmmkyupijuby", response.location()); - Assertions.assertEquals("kakfqfr", response.tags().get("em")); - Assertions.assertEquals("akizvoaikna", response.networkDeviceSku()); - Assertions.assertEquals(NetworkDeviceRoleTypes.NPB, response.networkDeviceRole()); - Assertions.assertEquals("cwxhmpej", response.hostname()); - Assertions.assertEquals("ke", response.serialNumber()); - Assertions.assertEquals("onwivkcqhrxhxkn", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListByResourceGroupMockTests.java deleted file mode 100644 index 3ce0fc54ede1d..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListByResourceGroupMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleTypes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkDevicesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"version\":\"olyahluqwqulsut\",\"networkDeviceSku\":\"jb\",\"networkDeviceRole\":\"NPB\",\"provisioningState\":\"Failed\",\"networkRackId\":\"hyqezvqq\",\"hostName\":\"drftbcvexreuquo\",\"serialNumber\":\"ljvfwhreagk\",\"annotation\":\"xv\"},\"location\":\"tvbczsulm\",\"tags\":{\"eykgsangpszngaf\":\"lmepjpf\",\"lkvec\":\"g\"},\"id\":\"ujcngo\",\"name\":\"dyedmzrgjfo\",\"type\":\"nub\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.networkDevices().listByResourceGroup("it", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("tvbczsulm", response.iterator().next().location()); - Assertions.assertEquals("lmepjpf", response.iterator().next().tags().get("eykgsangpszngaf")); - Assertions.assertEquals("jb", response.iterator().next().networkDeviceSku()); - Assertions.assertEquals(NetworkDeviceRoleTypes.NPB, response.iterator().next().networkDeviceRole()); - Assertions.assertEquals("drftbcvexreuquo", response.iterator().next().hostname()); - Assertions.assertEquals("ljvfwhreagk", response.iterator().next().serialNumber()); - Assertions.assertEquals("xv", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListMockTests.java deleted file mode 100644 index a9c2e35613710..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevice; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleTypes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkDevicesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"version\":\"tp\",\"networkDeviceSku\":\"pz\",\"networkDeviceRole\":\"TS\",\"provisioningState\":\"Canceled\",\"networkRackId\":\"x\",\"hostName\":\"oqraswugyxpqi\",\"serialNumber\":\"eialwvskb\",\"annotation\":\"z\"},\"location\":\"aq\",\"tags\":{\"cujp\":\"tco\",\"bizt\":\"sxzakuejkm\"},\"id\":\"ofqcvovjufycsjm\",\"name\":\"bemyeji\",\"type\":\"iuxegth\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.networkDevices().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("aq", response.iterator().next().location()); - Assertions.assertEquals("tco", response.iterator().next().tags().get("cujp")); - Assertions.assertEquals("pz", response.iterator().next().networkDeviceSku()); - Assertions.assertEquals(NetworkDeviceRoleTypes.TS, response.iterator().next().networkDeviceRole()); - Assertions.assertEquals("oqraswugyxpqi", response.iterator().next().hostname()); - Assertions.assertEquals("eialwvskb", response.iterator().next().serialNumber()); - Assertions.assertEquals("z", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListResultTests.java deleted file mode 100644 index e1bb7d67e1ac1..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkDevicesListResultTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDeviceInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleTypes; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDevicesListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NetworkDevicesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkDevicesListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"version\":\"fq\",\"networkDeviceSku\":\"zgxmr\",\"networkDeviceRole\":\"ToR\",\"provisioningState\":\"Canceled\",\"networkRackId\":\"pcesutrg\",\"hostName\":\"pauutpw\",\"serialNumber\":\"hihejqgwzpnfqn\",\"annotation\":\"ypsxjvfoim\"},\"location\":\"slirciz\",\"tags\":{\"cvlhv\":\"ydfce\",\"jslb\":\"gdyftumrtwna\",\"aeqphchqnr\":\"wkojgcyztsfmzn\",\"wrykqgai\":\"rpxeh\"},\"id\":\"mvikl\",\"name\":\"ydv\",\"type\":\"hbejdznxcvdsrhnj\"},{\"properties\":{\"version\":\"lvtno\",\"networkDeviceSku\":\"qfzgemjdftul\",\"networkDeviceRole\":\"TS\",\"provisioningState\":\"Failed\",\"networkRackId\":\"ceamtm\",\"hostName\":\"u\",\"serialNumber\":\"ejwcwwqiok\",\"annotation\":\"sx\"},\"location\":\"jmsvpkjp\",\"tags\":{\"zheydbsdshmk\":\"wcfzqljyxgt\"},\"id\":\"maehvbbxurip\",\"name\":\"tfnhtbaxkgxywr\",\"type\":\"kpyklyhp\"}],\"nextLink\":\"odpvruudlgzib\"}") - .toObject(NetworkDevicesListResult.class); - Assertions.assertEquals("slirciz", model.value().get(0).location()); - Assertions.assertEquals("ydfce", model.value().get(0).tags().get("cvlhv")); - Assertions.assertEquals("zgxmr", model.value().get(0).networkDeviceSku()); - Assertions.assertEquals(NetworkDeviceRoleTypes.TOR, model.value().get(0).networkDeviceRole()); - Assertions.assertEquals("pauutpw", model.value().get(0).hostname()); - Assertions.assertEquals("hihejqgwzpnfqn", model.value().get(0).serialNumber()); - Assertions.assertEquals("ypsxjvfoim", model.value().get(0).annotation()); - Assertions.assertEquals("odpvruudlgzib", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkDevicesListResult model = - new NetworkDevicesListResult() - .withValue( - Arrays - .asList( - new NetworkDeviceInner() - .withLocation("slirciz") - .withTags( - mapOf( - "cvlhv", - "ydfce", - "jslb", - "gdyftumrtwna", - "aeqphchqnr", - "wkojgcyztsfmzn", - "wrykqgai", - "rpxeh")) - .withNetworkDeviceSku("zgxmr") - .withNetworkDeviceRole(NetworkDeviceRoleTypes.TOR) - .withHostname("pauutpw") - .withSerialNumber("hihejqgwzpnfqn") - .withAnnotation("ypsxjvfoim"), - new NetworkDeviceInner() - .withLocation("jmsvpkjp") - .withTags(mapOf("zheydbsdshmk", "wcfzqljyxgt")) - .withNetworkDeviceSku("qfzgemjdftul") - .withNetworkDeviceRole(NetworkDeviceRoleTypes.TS) - .withHostname("u") - .withSerialNumber("ejwcwwqiok") - .withAnnotation("sx"))) - .withNextLink("odpvruudlgzib"); - model = BinaryData.fromObject(model).toObject(NetworkDevicesListResult.class); - Assertions.assertEquals("slirciz", model.value().get(0).location()); - Assertions.assertEquals("ydfce", model.value().get(0).tags().get("cvlhv")); - Assertions.assertEquals("zgxmr", model.value().get(0).networkDeviceSku()); - Assertions.assertEquals(NetworkDeviceRoleTypes.TOR, model.value().get(0).networkDeviceRole()); - Assertions.assertEquals("pauutpw", model.value().get(0).hostname()); - Assertions.assertEquals("hihejqgwzpnfqn", model.value().get(0).serialNumber()); - Assertions.assertEquals("ypsxjvfoim", model.value().get(0).annotation()); - Assertions.assertEquals("odpvruudlgzib", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersCreateMockTests.java deleted file mode 100644 index b6d38ec7fb430..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersCreateMockTests.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.ManagedResourceGroupConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricController; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkFabricControllersCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"infrastructureServices\":{\"ipv4AddressSpaces\":[],\"ipv6AddressSpaces\":[]},\"workloadServices\":{\"ipv4AddressSpaces\":[],\"ipv6AddressSpaces\":[]},\"managedResourceGroupConfiguration\":{\"name\":\"ygdjboqgrmtqjk\",\"location\":\"vadrmm\"},\"networkFabricIds\":[\"awvcmjzkxiid\",\"scz\",\"koswoqiqazugamxz\"],\"workloadManagementNetwork\":false,\"ipv4AddressSpace\":\"oiisbamnppcce\",\"ipv6AddressSpace\":\"ztdsbeza\",\"operationalState\":\"Failed\",\"provisioningState\":\"Succeeded\",\"infrastructureExpressRouteConnections\":[],\"workloadExpressRouteConnections\":[],\"annotation\":\"hyhnep\"},\"location\":\"etiarxqiubxdukec\",\"tags\":{\"dblnsntrp\":\"azvdhctmmkosz\",\"fmhklbnld\":\"aqkiofkb\",\"hez\":\"vcb\"},\"id\":\"quwusq\",\"name\":\"utrpbr\",\"type\":\"uyu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkFabricController response = - manager - .networkFabricControllers() - .define("oqodkadpp") - .withRegion("wyojbfqzdkfnjyi") - .withExistingResourceGroup("mehllizhceu") - .withTags(mapOf("valqjrhuzgfxo", "fratqxmbjroumzz")) - .withManagedResourceGroupConfiguration( - new ManagedResourceGroupConfiguration().withName("wrxwhydtl").withLocation("vadswzs")) - .withIpv4AddressSpace("trfowtdvr") - .withIpv6AddressSpace("vlihcvjd") - .withInfrastructureExpressRouteConnections(Arrays.asList()) - .withWorkloadExpressRouteConnections(Arrays.asList()) - .withAnnotation("ukvhd") - .create(); - - Assertions.assertEquals("etiarxqiubxdukec", response.location()); - Assertions.assertEquals("azvdhctmmkosz", response.tags().get("dblnsntrp")); - Assertions.assertEquals("ygdjboqgrmtqjk", response.managedResourceGroupConfiguration().name()); - Assertions.assertEquals("vadrmm", response.managedResourceGroupConfiguration().location()); - Assertions.assertEquals("oiisbamnppcce", response.ipv4AddressSpace()); - Assertions.assertEquals("ztdsbeza", response.ipv6AddressSpace()); - Assertions.assertEquals("hyhnep", response.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDeleteMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDeleteMockTests.java deleted file mode 100644 index 7a9e8a71d9729..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkFabricControllersDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.networkFabricControllers().delete("rcssbzhddubbnq", "b", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 2f6deb09e024f..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricController; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkFabricControllersGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"infrastructureServices\":{\"ipv4AddressSpaces\":[],\"ipv6AddressSpaces\":[]},\"workloadServices\":{\"ipv4AddressSpaces\":[],\"ipv6AddressSpaces\":[]},\"managedResourceGroupConfiguration\":{\"name\":\"tkdbmwnrdjyib\",\"location\":\"naomhjrm\"},\"networkFabricIds\":[\"maxljalfihcj\",\"obcancdexxqcw\",\"a\"],\"workloadManagementNetwork\":true,\"ipv4AddressSpace\":\"aknokzwjjzrl\",\"ipv6AddressSpace\":\"xldzyyfytpqsix\",\"operationalState\":\"Failed\",\"provisioningState\":\"Deleting\",\"infrastructureExpressRouteConnections\":[],\"workloadExpressRouteConnections\":[],\"annotation\":\"lkjuvsmbmslzoyov\"},\"location\":\"dbpqvybefgvm\",\"tags\":{\"bse\":\"kcvtl\",\"iryky\":\"kvcuartrhunl\",\"bmnwa\":\"ndzfqivjreuyk\"},\"id\":\"ltbxoeeonqlnfw\",\"name\":\"y\",\"type\":\"mvqdbpbhfckdvez\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkFabricController response = - manager - .networkFabricControllers() - .getByResourceGroupWithResponse("mtuowogtgitsqhzv", "rzcdbanf", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("dbpqvybefgvm", response.location()); - Assertions.assertEquals("kcvtl", response.tags().get("bse")); - Assertions.assertEquals("tkdbmwnrdjyib", response.managedResourceGroupConfiguration().name()); - Assertions.assertEquals("naomhjrm", response.managedResourceGroupConfiguration().location()); - Assertions.assertEquals("aknokzwjjzrl", response.ipv4AddressSpace()); - Assertions.assertEquals("xldzyyfytpqsix", response.ipv6AddressSpace()); - Assertions.assertEquals("lkjuvsmbmslzoyov", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListByResourceGroupMockTests.java deleted file mode 100644 index 4ec01e2667765..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListByResourceGroupMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricController; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkFabricControllersListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"infrastructureServices\":{\"ipv4AddressSpaces\":[],\"ipv6AddressSpaces\":[]},\"workloadServices\":{\"ipv4AddressSpaces\":[],\"ipv6AddressSpaces\":[]},\"managedResourceGroupConfiguration\":{\"name\":\"ugiqjtiogqg\",\"location\":\"inic\"},\"networkFabricIds\":[\"aj\",\"hi\"],\"workloadManagementNetwork\":true,\"ipv4AddressSpace\":\"n\",\"ipv6AddressSpace\":\"n\",\"operationalState\":\"Failed\",\"provisioningState\":\"Canceled\",\"infrastructureExpressRouteConnections\":[],\"workloadExpressRouteConnections\":[],\"annotation\":\"vw\"},\"location\":\"csehchkhufm\",\"tags\":{\"zulo\":\"mqyjgy\"},\"id\":\"saeuzanhsfnhsenw\",\"name\":\"hpzfngqj\",\"type\":\"lidftujwjj\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.networkFabricControllers().listByResourceGroup("h", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("csehchkhufm", response.iterator().next().location()); - Assertions.assertEquals("mqyjgy", response.iterator().next().tags().get("zulo")); - Assertions.assertEquals("ugiqjtiogqg", response.iterator().next().managedResourceGroupConfiguration().name()); - Assertions.assertEquals("inic", response.iterator().next().managedResourceGroupConfiguration().location()); - Assertions.assertEquals("n", response.iterator().next().ipv4AddressSpace()); - Assertions.assertEquals("n", response.iterator().next().ipv6AddressSpace()); - Assertions.assertEquals("vw", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListMockTests.java deleted file mode 100644 index 9416fdf018a4b..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricController; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkFabricControllersListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"infrastructureServices\":{\"ipv4AddressSpaces\":[],\"ipv6AddressSpaces\":[]},\"workloadServices\":{\"ipv4AddressSpaces\":[],\"ipv6AddressSpaces\":[]},\"managedResourceGroupConfiguration\":{\"name\":\"rhtssr\",\"location\":\"nmdvha\"},\"networkFabricIds\":[\"jy\",\"iqswbqer\",\"w\"],\"workloadManagementNetwork\":false,\"ipv4AddressSpace\":\"x\",\"ipv6AddressSpace\":\"gukvlbpkt\",\"operationalState\":\"Failed\",\"provisioningState\":\"Updating\",\"infrastructureExpressRouteConnections\":[],\"workloadExpressRouteConnections\":[],\"annotation\":\"ewres\"},\"location\":\"owegmmutey\",\"tags\":{\"xlzdesygrijwa\":\"guqigijiitns\",\"fueqfrojs\":\"ufanray\",\"iecafygzmxi\":\"dgrhydkygywezs\",\"smaklixqcahy\":\"qv\"},\"id\":\"xalybxawoijpo\",\"name\":\"tblxpkkwjdjodqhy\",\"type\":\"incnr\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.networkFabricControllers().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("owegmmutey", response.iterator().next().location()); - Assertions.assertEquals("guqigijiitns", response.iterator().next().tags().get("xlzdesygrijwa")); - Assertions.assertEquals("rhtssr", response.iterator().next().managedResourceGroupConfiguration().name()); - Assertions.assertEquals("nmdvha", response.iterator().next().managedResourceGroupConfiguration().location()); - Assertions.assertEquals("x", response.iterator().next().ipv4AddressSpace()); - Assertions.assertEquals("gukvlbpkt", response.iterator().next().ipv6AddressSpace()); - Assertions.assertEquals("ewres", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListResultTests.java deleted file mode 100644 index af4d081999b90..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricControllersListResultTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricControllerInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricControllersListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NetworkFabricControllersListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkFabricControllersListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"networkFabricIds\":[],\"workloadManagementNetwork\":true,\"ipv4AddressSpace\":\"wzqa\",\"ipv6AddressSpace\":\"lgzurig\",\"operationalState\":\"Configuring\",\"provisioningState\":\"Deleting\",\"infrastructureExpressRouteConnections\":[],\"workloadExpressRouteConnections\":[],\"annotation\":\"icokpv\"},\"location\":\"lqtmldgxob\",\"tags\":{\"yzriykhy\":\"clnpkci\",\"jlb\":\"wf\"},\"id\":\"xqvkjlmxhomdyn\",\"name\":\"dwdigumb\",\"type\":\"raauzzpt\"}],\"nextLink\":\"zysdzh\"}") - .toObject(NetworkFabricControllersListResult.class); - Assertions.assertEquals("lqtmldgxob", model.value().get(0).location()); - Assertions.assertEquals("clnpkci", model.value().get(0).tags().get("yzriykhy")); - Assertions.assertEquals("wzqa", model.value().get(0).ipv4AddressSpace()); - Assertions.assertEquals("lgzurig", model.value().get(0).ipv6AddressSpace()); - Assertions.assertEquals("icokpv", model.value().get(0).annotation()); - Assertions.assertEquals("zysdzh", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkFabricControllersListResult model = - new NetworkFabricControllersListResult() - .withValue( - Arrays - .asList( - new NetworkFabricControllerInner() - .withLocation("lqtmldgxob") - .withTags(mapOf("yzriykhy", "clnpkci", "jlb", "wf")) - .withIpv4AddressSpace("wzqa") - .withIpv6AddressSpace("lgzurig") - .withInfrastructureExpressRouteConnections(Arrays.asList()) - .withWorkloadExpressRouteConnections(Arrays.asList()) - .withAnnotation("icokpv"))) - .withNextLink("zysdzh"); - model = BinaryData.fromObject(model).toObject(NetworkFabricControllersListResult.class); - Assertions.assertEquals("lqtmldgxob", model.value().get(0).location()); - Assertions.assertEquals("clnpkci", model.value().get(0).tags().get("yzriykhy")); - Assertions.assertEquals("wzqa", model.value().get(0).ipv4AddressSpace()); - Assertions.assertEquals("lgzurig", model.value().get(0).ipv6AddressSpace()); - Assertions.assertEquals("icokpv", model.value().get(0).annotation()); - Assertions.assertEquals("zysdzh", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricPatchablePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricPatchablePropertiesTests.java deleted file mode 100644 index 59d933205be33..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricPatchablePropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricPatchableProperties; - -public final class NetworkFabricPatchablePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkFabricPatchableProperties model = - BinaryData - .fromString( - "{\"racks\":[\"rdve\",\"nwsdtutnwlduyc\"],\"l2IsolationDomains\":[\"hyrmewipmvekdx\",\"kuqgsjjxundxgket\",\"zhhzjhfjmhvvmu\"],\"l3IsolationDomains\":[\"mun\",\"qsxvmhf\"]}") - .toObject(NetworkFabricPatchableProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkFabricPatchableProperties model = new NetworkFabricPatchableProperties(); - model = BinaryData.fromObject(model).toObject(NetworkFabricPatchableProperties.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuInnerTests.java deleted file mode 100644 index e91314f422d9b..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuInner; -import org.junit.jupiter.api.Assertions; - -public final class NetworkFabricSkuInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkFabricSkuInner model = - BinaryData - .fromString( - "{\"properties\":{\"type\":\"wwvaiqyuvvfonk\",\"maxComputeRacks\":1742382319,\"minSupportedVer\":\"yik\",\"maxSupportedVer\":\"lauyav\",\"detailsUri\":\"wmn\",\"provisioningState\":\"Failed\"},\"id\":\"ijf\",\"name\":\"bvpoekrsgsgbdhu\",\"type\":\"qgnjdgkynscli\"}") - .toObject(NetworkFabricSkuInner.class); - Assertions.assertEquals(1742382319, model.maxComputeRacks()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkFabricSkuInner model = new NetworkFabricSkuInner().withMaxComputeRacks(1742382319); - model = BinaryData.fromObject(model).toObject(NetworkFabricSkuInner.class); - Assertions.assertEquals(1742382319, model.maxComputeRacks()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuPropertiesTests.java deleted file mode 100644 index a2c46a310a147..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkuPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuProperties; -import org.junit.jupiter.api.Assertions; - -public final class NetworkFabricSkuPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkFabricSkuProperties model = - BinaryData - .fromString( - "{\"type\":\"zvhxnk\",\"maxComputeRacks\":144563900,\"minSupportedVer\":\"u\",\"maxSupportedVer\":\"tppn\",\"detailsUri\":\"xz\",\"provisioningState\":\"Canceled\"}") - .toObject(NetworkFabricSkuProperties.class); - Assertions.assertEquals(144563900, model.maxComputeRacks()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkFabricSkuProperties model = new NetworkFabricSkuProperties().withMaxComputeRacks(144563900); - model = BinaryData.fromObject(model).toObject(NetworkFabricSkuProperties.class); - Assertions.assertEquals(144563900, model.maxComputeRacks()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetWithResponseMockTests.java deleted file mode 100644 index 6375a49dd9be3..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSku; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkFabricSkusGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"type\":\"b\",\"maxComputeRacks\":757455184,\"minSupportedVer\":\"cpahprzrvxhm\",\"maxSupportedVer\":\"hocn\",\"detailsUri\":\"cmj\",\"provisioningState\":\"Failed\"},\"id\":\"noq\",\"name\":\"xtdisnjevhd\",\"type\":\"mydidwhepfw\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkFabricSku response = - manager.networkFabricSkus().getWithResponse("atvlmbjwcolbm", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals(757455184, response.maxComputeRacks()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListMockTests.java deleted file mode 100644 index 6e2bd5505167e..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSku; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkFabricSkusListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"type\":\"jfdoesxxhm\",\"maxComputeRacks\":1553192945,\"minSupportedVer\":\"ck\",\"maxSupportedVer\":\"ikxkxhneg\",\"detailsUri\":\"jzrbhtmeplv\",\"provisioningState\":\"Deleting\"},\"id\":\"brlbpgs\",\"name\":\"bagn\",\"type\":\"hjhgem\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.networkFabricSkus().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals(1553192945, response.iterator().next().maxComputeRacks()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListResultTests.java deleted file mode 100644 index 36f5699a13eac..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricSkusListResultTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSkusListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkFabricSkusListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkFabricSkusListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"type\":\"bbc\",\"maxComputeRacks\":990480911,\"minSupportedVer\":\"gtltdhlf\",\"maxSupportedVer\":\"ojpykvgtrdc\",\"detailsUri\":\"fmzzsdymbrny\",\"provisioningState\":\"Canceled\"},\"id\":\"prafwgckhoc\",\"name\":\"vdff\",\"type\":\"wafqroud\"},{\"properties\":{\"type\":\"pavehhr\",\"maxComputeRacks\":221531853,\"minSupportedVer\":\"n\",\"maxSupportedVer\":\"zudhcxg\",\"detailsUri\":\"oyxcdyuib\",\"provisioningState\":\"Deleting\"},\"id\":\"nbzydvfvfcj\",\"name\":\"aeoisrvh\",\"type\":\"gorf\"}],\"nextLink\":\"kiscvwmzhwpl\"}") - .toObject(NetworkFabricSkusListResult.class); - Assertions.assertEquals(990480911, model.value().get(0).maxComputeRacks()); - Assertions.assertEquals("kiscvwmzhwpl", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkFabricSkusListResult model = - new NetworkFabricSkusListResult() - .withValue( - Arrays - .asList( - new NetworkFabricSkuInner().withMaxComputeRacks(990480911), - new NetworkFabricSkuInner().withMaxComputeRacks(221531853))) - .withNextLink("kiscvwmzhwpl"); - model = BinaryData.fromObject(model).toObject(NetworkFabricSkusListResult.class); - Assertions.assertEquals(990480911, model.value().get(0).maxComputeRacks()); - Assertions.assertEquals("kiscvwmzhwpl", model.nextLink()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeleteMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeleteMockTests.java deleted file mode 100644 index 1a9f526e7acf4..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkFabricsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.networkFabrics().delete("qba", "qicqchygt", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListResultTests.java deleted file mode 100644 index 4713ac1ed399f..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkFabricsListResultTests.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricsListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NetworkFabricsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkFabricsListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"networkFabricSku\":\"iv\",\"rackCount\":178963664,\"serverCountPerRack\":412719759,\"ipv4Prefix\":\"zunbixx\",\"ipv6Prefix\":\"ikvcpwp\",\"routerId\":\"lrcivtsoxfrke\",\"fabricASN\":1452448195,\"networkFabricControllerId\":\"pmyyefrpmpdnqq\",\"operationalState\":\"Provisioned\",\"provisioningState\":\"Canceled\",\"racks\":[],\"l2IsolationDomains\":[],\"l3IsolationDomains\":[],\"annotation\":\"mbnpqf\"},\"location\":\"qlkzme\",\"tags\":{\"fegcea\":\"tgvkxlzyqd\",\"gdivbkbxg\":\"zxwhcansymoyqhlw\"},\"id\":\"mf\",\"name\":\"juwasqvdaeyyguxa\",\"type\":\"jsqzhzbezk\"},{\"properties\":{\"networkFabricSku\":\"msidxasicddyvv\",\"rackCount\":1032831795,\"serverCountPerRack\":537435769,\"ipv4Prefix\":\"fmocwahpq\",\"ipv6Prefix\":\"tjeaahhvjhh\",\"routerId\":\"kzyb\",\"fabricASN\":1424152759,\"networkFabricControllerId\":\"jid\",\"operationalState\":\"ErrorDeprovisioning\",\"provisioningState\":\"Updating\",\"racks\":[],\"l2IsolationDomains\":[],\"l3IsolationDomains\":[],\"annotation\":\"xevbl\"},\"location\":\"ednljl\",\"tags\":{\"bn\":\"uaulxunsm\",\"xeizzg\":\"ppxynenls\"},\"id\":\"klnsrmffey\",\"name\":\"xcktpiymerteeamm\",\"type\":\"qiekkkzddrt\"}],\"nextLink\":\"doj\"}") - .toObject(NetworkFabricsListResult.class); - Assertions.assertEquals("qlkzme", model.value().get(0).location()); - Assertions.assertEquals("tgvkxlzyqd", model.value().get(0).tags().get("fegcea")); - Assertions.assertEquals("iv", model.value().get(0).networkFabricSku()); - Assertions.assertEquals(178963664, model.value().get(0).rackCount()); - Assertions.assertEquals(412719759, model.value().get(0).serverCountPerRack()); - Assertions.assertEquals("zunbixx", model.value().get(0).ipv4Prefix()); - Assertions.assertEquals("ikvcpwp", model.value().get(0).ipv6Prefix()); - Assertions.assertEquals(1452448195, model.value().get(0).fabricAsn()); - Assertions.assertEquals("pmyyefrpmpdnqq", model.value().get(0).networkFabricControllerId()); - Assertions.assertEquals("mbnpqf", model.value().get(0).annotation()); - Assertions.assertEquals("doj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkFabricsListResult model = - new NetworkFabricsListResult() - .withValue( - Arrays - .asList( - new NetworkFabricInner() - .withLocation("qlkzme") - .withTags(mapOf("fegcea", "tgvkxlzyqd", "gdivbkbxg", "zxwhcansymoyqhlw")) - .withNetworkFabricSku("iv") - .withRackCount(178963664) - .withServerCountPerRack(412719759) - .withIpv4Prefix("zunbixx") - .withIpv6Prefix("ikvcpwp") - .withFabricAsn(1452448195) - .withNetworkFabricControllerId("pmyyefrpmpdnqq") - .withAnnotation("mbnpqf"), - new NetworkFabricInner() - .withLocation("ednljl") - .withTags(mapOf("bn", "uaulxunsm", "xeizzg", "ppxynenls")) - .withNetworkFabricSku("msidxasicddyvv") - .withRackCount(1032831795) - .withServerCountPerRack(537435769) - .withIpv4Prefix("fmocwahpq") - .withIpv6Prefix("tjeaahhvjhh") - .withFabricAsn(1424152759) - .withNetworkFabricControllerId("jid") - .withAnnotation("xevbl"))) - .withNextLink("doj"); - model = BinaryData.fromObject(model).toObject(NetworkFabricsListResult.class); - Assertions.assertEquals("qlkzme", model.value().get(0).location()); - Assertions.assertEquals("tgvkxlzyqd", model.value().get(0).tags().get("fegcea")); - Assertions.assertEquals("iv", model.value().get(0).networkFabricSku()); - Assertions.assertEquals(178963664, model.value().get(0).rackCount()); - Assertions.assertEquals(412719759, model.value().get(0).serverCountPerRack()); - Assertions.assertEquals("zunbixx", model.value().get(0).ipv4Prefix()); - Assertions.assertEquals("ikvcpwp", model.value().get(0).ipv6Prefix()); - Assertions.assertEquals(1452448195, model.value().get(0).fabricAsn()); - Assertions.assertEquals("pmyyefrpmpdnqq", model.value().get(0).networkFabricControllerId()); - Assertions.assertEquals("mbnpqf", model.value().get(0).annotation()); - Assertions.assertEquals("doj", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfaceInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfaceInnerTests.java deleted file mode 100644 index 72a6c8702c700..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfaceInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner; -import org.junit.jupiter.api.Assertions; - -public final class NetworkInterfaceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkInterfaceInner model = - BinaryData - .fromString( - "{\"properties\":{\"physicalIdentifier\":\"ostgkts\",\"administrativeState\":\"Disabled\",\"provisioningState\":\"Updating\",\"connectedTo\":\"lzedqbcvhzlhplo\",\"interfaceType\":\"Management\",\"ipv4Address\":\"lwwqfbumlkxtrqj\",\"ipv6Address\":\"mlmbtxhwgfwsrta\",\"annotation\":\"oezbrhubsk\"},\"id\":\"dyg\",\"name\":\"ookk\",\"type\":\"fqjbvleo\"}") - .toObject(NetworkInterfaceInner.class); - Assertions.assertEquals("oezbrhubsk", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkInterfaceInner model = new NetworkInterfaceInner().withAnnotation("oezbrhubsk"); - model = BinaryData.fromObject(model).toObject(NetworkInterfaceInner.class); - Assertions.assertEquals("oezbrhubsk", model.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePatchPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePatchPropertiesTests.java deleted file mode 100644 index f034ef9a87f1d..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePatchPropertiesTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfacePatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class NetworkInterfacePatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkInterfacePatchProperties model = - BinaryData - .fromString("{\"annotation\":\"hwagohbuffkmrqe\"}") - .toObject(NetworkInterfacePatchProperties.class); - Assertions.assertEquals("hwagohbuffkmrqe", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkInterfacePatchProperties model = new NetworkInterfacePatchProperties().withAnnotation("hwagohbuffkmrqe"); - model = BinaryData.fromObject(model).toObject(NetworkInterfacePatchProperties.class); - Assertions.assertEquals("hwagohbuffkmrqe", model.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePatchTests.java deleted file mode 100644 index 0dce1fb85c1b9..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePatchTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacePatch; -import org.junit.jupiter.api.Assertions; - -public final class NetworkInterfacePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkInterfacePatch model = - BinaryData.fromString("{\"properties\":{\"annotation\":\"wr\"}}").toObject(NetworkInterfacePatch.class); - Assertions.assertEquals("wr", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkInterfacePatch model = new NetworkInterfacePatch().withAnnotation("wr"); - model = BinaryData.fromObject(model).toObject(NetworkInterfacePatch.class); - Assertions.assertEquals("wr", model.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePropertiesTests.java deleted file mode 100644 index 3e547188ad49a..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacePropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceProperties; -import org.junit.jupiter.api.Assertions; - -public final class NetworkInterfacePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkInterfaceProperties model = - BinaryData - .fromString( - "{\"physicalIdentifier\":\"ml\",\"administrativeState\":\"Disabled\",\"provisioningState\":\"Canceled\",\"connectedTo\":\"fa\",\"interfaceType\":\"Data\",\"ipv4Address\":\"qqybarye\",\"ipv6Address\":\"yjkqabqgzslesjcb\",\"annotation\":\"rnntiewdjcv\"}") - .toObject(NetworkInterfaceProperties.class); - Assertions.assertEquals("rnntiewdjcv", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkInterfaceProperties model = new NetworkInterfaceProperties().withAnnotation("rnntiewdjcv"); - model = BinaryData.fromObject(model).toObject(NetworkInterfaceProperties.class); - Assertions.assertEquals("rnntiewdjcv", model.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateMockTests.java deleted file mode 100644 index 36c48642b077d..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesCreateMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkInterfacesCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"physicalIdentifier\":\"krxwet\",\"administrativeState\":\"Disabled\",\"provisioningState\":\"Succeeded\",\"connectedTo\":\"rucpcunnuz\",\"interfaceType\":\"Data\",\"ipv4Address\":\"oenodnaienh\",\"ipv6Address\":\"skndnelqkaadlknw\",\"annotation\":\"anniyopetxivcnr\"},\"id\":\"xnucaephblkwqp\",\"name\":\"tv\",\"type\":\"qsdtcjbctvivuzq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkInterface response = - manager - .networkInterfaces() - .define("jogeslabnsmjkwyn") - .withExistingNetworkDevice("wltxeqipxgzdyims", "ayorprav") - .withAnnotation("pxvpifdfaif") - .create(); - - Assertions.assertEquals("anniyopetxivcnr", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesDeleteMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesDeleteMockTests.java deleted file mode 100644 index 01ca6f0774aeb..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkInterfacesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.networkInterfaces().delete("zgyufutrwp", "eryekzkdhmeottaw", "yos", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetWithResponseMockTests.java deleted file mode 100644 index 03c2c9bd1cb2f..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesGetWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkInterfacesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"physicalIdentifier\":\"ciijqpkzfbojxj\",\"administrativeState\":\"Disabled\",\"provisioningState\":\"Succeeded\",\"connectedTo\":\"wixvcpwnkwywzw\",\"interfaceType\":\"Data\",\"ipv4Address\":\"ickduoiqta\",\"ipv6Address\":\"yvsk\",\"annotation\":\"rwzawnvs\"},\"id\":\"fhzag\",\"name\":\"nvhycvdimwrz\",\"type\":\"e\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkInterface response = - manager - .networkInterfaces() - .getWithResponse("pkcvmwf", "uxx", "pmywbormcq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rwzawnvs", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListMockTests.java deleted file mode 100644 index dc68e2024dee1..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterface; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkInterfacesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"physicalIdentifier\":\"nwynudq\",\"administrativeState\":\"Enabled\",\"provisioningState\":\"Succeeded\",\"connectedTo\":\"zp\",\"interfaceType\":\"Management\",\"ipv4Address\":\"ehuxiqhzlraym\",\"ipv6Address\":\"xls\",\"annotation\":\"hmx\"},\"id\":\"dsajrednwyysh\",\"name\":\"uwg\",\"type\":\"evuafpwzyifrk\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.networkInterfaces().list("wwhnhjtfvpn", "pmil", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hmx", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListTests.java deleted file mode 100644 index d0488914fa8f5..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkInterfacesListTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfaceInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkInterfacesList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkInterfacesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkInterfacesList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"physicalIdentifier\":\"mxtd\",\"administrativeState\":\"Disabled\",\"provisioningState\":\"Updating\",\"connectedTo\":\"coebjvewzcj\",\"interfaceType\":\"Management\",\"ipv4Address\":\"cpmguaadraufact\",\"ipv6Address\":\"hzovaj\",\"annotation\":\"iuxxpshneekulfg\"},\"id\":\"qubkw\",\"name\":\"lenrd\",\"type\":\"utujba\"},{\"properties\":{\"physicalIdentifier\":\"juohminyflnorw\",\"administrativeState\":\"Disabled\",\"provisioningState\":\"Deleting\",\"connectedTo\":\"klvxwmyg\",\"interfaceType\":\"Data\",\"ipv4Address\":\"pqchiszep\",\"ipv6Address\":\"bjcrxgibbdaxco\",\"annotation\":\"ozauorsukokwb\"},\"id\":\"lhlv\",\"name\":\"uuepzlrphwzsoldw\",\"type\":\"yuqdu\"},{\"properties\":{\"physicalIdentifier\":\"mnnrwr\",\"administrativeState\":\"Enabled\",\"provisioningState\":\"Canceled\",\"connectedTo\":\"alywjhhgdn\",\"interfaceType\":\"Management\",\"ipv4Address\":\"ivfomiloxgg\",\"ipv6Address\":\"fi\",\"annotation\":\"dieuzaofj\"},\"id\":\"vcyy\",\"name\":\"s\",\"type\":\"gdotcubiipuipwo\"}],\"nextLink\":\"nmacj\"}") - .toObject(NetworkInterfacesList.class); - Assertions.assertEquals("iuxxpshneekulfg", model.value().get(0).annotation()); - Assertions.assertEquals("nmacj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkInterfacesList model = - new NetworkInterfacesList() - .withValue( - Arrays - .asList( - new NetworkInterfaceInner().withAnnotation("iuxxpshneekulfg"), - new NetworkInterfaceInner().withAnnotation("ozauorsukokwb"), - new NetworkInterfaceInner().withAnnotation("dieuzaofj"))) - .withNextLink("nmacj"); - model = BinaryData.fromObject(model).toObject(NetworkInterfacesList.class); - Assertions.assertEquals("iuxxpshneekulfg", model.value().get(0).annotation()); - Assertions.assertEquals("nmacj", model.nextLink()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackInnerTests.java deleted file mode 100644 index b7c151b1c33a5..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackInnerTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NetworkRackInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkRackInner model = - BinaryData - .fromString( - "{\"properties\":{\"networkRackSku\":\"mjqfrddgamquhio\",\"networkFabricId\":\"rsjuivfcdisyir\",\"networkDevices\":[\"hcz\",\"xrxzbujrtr\",\"qvwre\",\"khgn\"],\"provisioningState\":\"Updating\",\"annotation\":\"nzlrpiqywncvjt\"},\"location\":\"cof\",\"tags\":{\"gbjkvreljeamur\":\"htd\"},\"id\":\"zmlovuanash\",\"name\":\"xlpm\",\"type\":\"erbdk\"}") - .toObject(NetworkRackInner.class); - Assertions.assertEquals("cof", model.location()); - Assertions.assertEquals("htd", model.tags().get("gbjkvreljeamur")); - Assertions.assertEquals("mjqfrddgamquhio", model.networkRackSku()); - Assertions.assertEquals("rsjuivfcdisyir", model.networkFabricId()); - Assertions.assertEquals("nzlrpiqywncvjt", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkRackInner model = - new NetworkRackInner() - .withLocation("cof") - .withTags(mapOf("gbjkvreljeamur", "htd")) - .withNetworkRackSku("mjqfrddgamquhio") - .withNetworkFabricId("rsjuivfcdisyir") - .withAnnotation("nzlrpiqywncvjt"); - model = BinaryData.fromObject(model).toObject(NetworkRackInner.class); - Assertions.assertEquals("cof", model.location()); - Assertions.assertEquals("htd", model.tags().get("gbjkvreljeamur")); - Assertions.assertEquals("mjqfrddgamquhio", model.networkRackSku()); - Assertions.assertEquals("rsjuivfcdisyir", model.networkFabricId()); - Assertions.assertEquals("nzlrpiqywncvjt", model.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPatchTests.java deleted file mode 100644 index 711afd9dd356a..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPatchTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NetworkRackPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkRackPatch model = - BinaryData - .fromString( - "{\"properties\":\"dataoldforobw\",\"tags\":{\"btuodxeszabbel\":\"izbfhfovvacq\",\"rrwoycqucwyhahn\":\"wumuaslzk\"}}") - .toObject(NetworkRackPatch.class); - Assertions.assertEquals("izbfhfovvacq", model.tags().get("btuodxeszabbel")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkRackPatch model = - new NetworkRackPatch() - .withProperties("dataoldforobw") - .withTags(mapOf("btuodxeszabbel", "izbfhfovvacq", "rrwoycqucwyhahn", "wumuaslzk")); - model = BinaryData.fromObject(model).toObject(NetworkRackPatch.class); - Assertions.assertEquals("izbfhfovvacq", model.tags().get("btuodxeszabbel")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPropertiesTests.java deleted file mode 100644 index 98234ee788075..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackPropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackProperties; -import org.junit.jupiter.api.Assertions; - -public final class NetworkRackPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkRackProperties model = - BinaryData - .fromString( - "{\"networkRackSku\":\"lvidizozs\",\"networkFabricId\":\"bccxjmonfdgn\",\"networkDevices\":[\"ypuuwwltvuqjctze\",\"keifzzhmkdasv\",\"lyhb\"],\"provisioningState\":\"Canceled\",\"annotation\":\"chxgs\"}") - .toObject(NetworkRackProperties.class); - Assertions.assertEquals("chxgs", model.annotation()); - Assertions.assertEquals("lvidizozs", model.networkRackSku()); - Assertions.assertEquals("bccxjmonfdgn", model.networkFabricId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkRackProperties model = - new NetworkRackProperties() - .withAnnotation("chxgs") - .withNetworkRackSku("lvidizozs") - .withNetworkFabricId("bccxjmonfdgn"); - model = BinaryData.fromObject(model).toObject(NetworkRackProperties.class); - Assertions.assertEquals("chxgs", model.annotation()); - Assertions.assertEquals("lvidizozs", model.networkRackSku()); - Assertions.assertEquals("bccxjmonfdgn", model.networkFabricId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkuInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkuInnerTests.java deleted file mode 100644 index 8e7e7f4d3d642..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkuInnerTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackSkuInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRackRoleType; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackRoleName; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkRackSkuInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkRackSkuInner model = - BinaryData - .fromString( - "{\"properties\":{\"roleName\":\"ComputeRack\",\"maximumServerCount\":1129885411,\"maximumStorageCount\":1728557454,\"maximumUplinks\":423729747,\"networkDevices\":[{\"networkDeviceSkuName\":\"ylhjlm\",\"roleType\":\"ToR\",\"rackSlot\":1274087303},{\"networkDeviceSkuName\":\"imrsopteecjmei\",\"roleType\":\"CE\",\"rackSlot\":749085962}],\"provisioningState\":\"Failed\"},\"id\":\"lwxdzaum\",\"name\":\"eoohguufuzboyj\",\"type\":\"thwtzol\"}") - .toObject(NetworkRackSkuInner.class); - Assertions.assertEquals(NetworkRackRoleName.COMPUTE_RACK, model.roleName()); - Assertions.assertEquals(1129885411, model.maximumServerCount()); - Assertions.assertEquals(1728557454, model.maximumStorageCount()); - Assertions.assertEquals(423729747, model.maximumUplinks()); - Assertions.assertEquals("ylhjlm", model.networkDevices().get(0).networkDeviceSkuName()); - Assertions.assertEquals(NetworkDeviceRackRoleType.TOR, model.networkDevices().get(0).roleType()); - Assertions.assertEquals(1274087303, model.networkDevices().get(0).rackSlot()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkRackSkuInner model = - new NetworkRackSkuInner() - .withRoleName(NetworkRackRoleName.COMPUTE_RACK) - .withMaximumServerCount(1129885411) - .withMaximumStorageCount(1728557454) - .withMaximumUplinks(423729747) - .withNetworkDevices( - Arrays - .asList( - new NetworkDeviceRoleProperties() - .withNetworkDeviceSkuName("ylhjlm") - .withRoleType(NetworkDeviceRackRoleType.TOR) - .withRackSlot(1274087303), - new NetworkDeviceRoleProperties() - .withNetworkDeviceSkuName("imrsopteecjmei") - .withRoleType(NetworkDeviceRackRoleType.CE) - .withRackSlot(749085962))); - model = BinaryData.fromObject(model).toObject(NetworkRackSkuInner.class); - Assertions.assertEquals(NetworkRackRoleName.COMPUTE_RACK, model.roleName()); - Assertions.assertEquals(1129885411, model.maximumServerCount()); - Assertions.assertEquals(1728557454, model.maximumStorageCount()); - Assertions.assertEquals(423729747, model.maximumUplinks()); - Assertions.assertEquals("ylhjlm", model.networkDevices().get(0).networkDeviceSkuName()); - Assertions.assertEquals(NetworkDeviceRackRoleType.TOR, model.networkDevices().get(0).roleType()); - Assertions.assertEquals(1274087303, model.networkDevices().get(0).rackSlot()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkuPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkuPropertiesTests.java deleted file mode 100644 index 6b1020491ff53..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkuPropertiesTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackSkuProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRackRoleType; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleProperties; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackRoleName; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkRackSkuPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkRackSkuProperties model = - BinaryData - .fromString( - "{\"roleName\":\"ComputeRack\",\"maximumServerCount\":1713502373,\"maximumStorageCount\":60989181,\"maximumUplinks\":989403174,\"networkDevices\":[{\"networkDeviceSkuName\":\"wjscjpah\",\"roleType\":\"CE\",\"rackSlot\":125446577},{\"networkDeviceSkuName\":\"f\",\"roleType\":\"ToR\",\"rackSlot\":1695920381},{\"networkDeviceSkuName\":\"qtibxyijddtv\",\"roleType\":\"Management\",\"rackSlot\":1118270051},{\"networkDeviceSkuName\":\"ijaeukm\",\"roleType\":\"NPB\",\"rackSlot\":1240784829}],\"provisioningState\":\"Failed\"}") - .toObject(NetworkRackSkuProperties.class); - Assertions.assertEquals(NetworkRackRoleName.COMPUTE_RACK, model.roleName()); - Assertions.assertEquals(1713502373, model.maximumServerCount()); - Assertions.assertEquals(60989181, model.maximumStorageCount()); - Assertions.assertEquals(989403174, model.maximumUplinks()); - Assertions.assertEquals("wjscjpah", model.networkDevices().get(0).networkDeviceSkuName()); - Assertions.assertEquals(NetworkDeviceRackRoleType.CE, model.networkDevices().get(0).roleType()); - Assertions.assertEquals(125446577, model.networkDevices().get(0).rackSlot()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkRackSkuProperties model = - new NetworkRackSkuProperties() - .withRoleName(NetworkRackRoleName.COMPUTE_RACK) - .withMaximumServerCount(1713502373) - .withMaximumStorageCount(60989181) - .withMaximumUplinks(989403174) - .withNetworkDevices( - Arrays - .asList( - new NetworkDeviceRoleProperties() - .withNetworkDeviceSkuName("wjscjpah") - .withRoleType(NetworkDeviceRackRoleType.CE) - .withRackSlot(125446577), - new NetworkDeviceRoleProperties() - .withNetworkDeviceSkuName("f") - .withRoleType(NetworkDeviceRackRoleType.TOR) - .withRackSlot(1695920381), - new NetworkDeviceRoleProperties() - .withNetworkDeviceSkuName("qtibxyijddtv") - .withRoleType(NetworkDeviceRackRoleType.MANAGEMENT) - .withRackSlot(1118270051), - new NetworkDeviceRoleProperties() - .withNetworkDeviceSkuName("ijaeukm") - .withRoleType(NetworkDeviceRackRoleType.NPB) - .withRackSlot(1240784829))); - model = BinaryData.fromObject(model).toObject(NetworkRackSkuProperties.class); - Assertions.assertEquals(NetworkRackRoleName.COMPUTE_RACK, model.roleName()); - Assertions.assertEquals(1713502373, model.maximumServerCount()); - Assertions.assertEquals(60989181, model.maximumStorageCount()); - Assertions.assertEquals(989403174, model.maximumUplinks()); - Assertions.assertEquals("wjscjpah", model.networkDevices().get(0).networkDeviceSkuName()); - Assertions.assertEquals(NetworkDeviceRackRoleType.CE, model.networkDevices().get(0).roleType()); - Assertions.assertEquals(125446577, model.networkDevices().get(0).rackSlot()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusGetWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusGetWithResponseMockTests.java deleted file mode 100644 index 134ac56f7d33d..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusGetWithResponseMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackSku; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkRackSkusGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"roleName\":\"AggregateRack\",\"maximumServerCount\":1326893336,\"maximumStorageCount\":893588353,\"maximumUplinks\":2141261906,\"networkDevices\":[],\"provisioningState\":\"Updating\"},\"id\":\"hjriyb\",\"name\":\"rz\",\"type\":\"epnxwd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkRackSku response = - manager.networkRackSkus().getWithResponse("zq", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals(NetworkRackRoleName.AGGREGATE_RACK, response.roleName()); - Assertions.assertEquals(1326893336, response.maximumServerCount()); - Assertions.assertEquals(893588353, response.maximumStorageCount()); - Assertions.assertEquals(2141261906, response.maximumUplinks()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusListMockTests.java deleted file mode 100644 index 0b6dbf3854a37..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusListMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackSku; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkRackSkusListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"roleName\":\"ComputeRack\",\"maximumServerCount\":1032969367,\"maximumStorageCount\":339200128,\"maximumUplinks\":1115141290,\"networkDevices\":[],\"provisioningState\":\"Failed\"},\"id\":\"rsqftib\",\"name\":\"yibuyvpirfqjpnqn\",\"type\":\"owsbedenrexkxbh\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.networkRackSkus().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals(NetworkRackRoleName.COMPUTE_RACK, response.iterator().next().roleName()); - Assertions.assertEquals(1032969367, response.iterator().next().maximumServerCount()); - Assertions.assertEquals(339200128, response.iterator().next().maximumStorageCount()); - Assertions.assertEquals(1115141290, response.iterator().next().maximumUplinks()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusListResultTests.java deleted file mode 100644 index b6ecf980128b3..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRackSkusListResultTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackSkuInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackRoleName; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRackSkusListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkRackSkusListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkRackSkusListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"roleName\":\"AggregateRack\",\"maximumServerCount\":674250391,\"maximumStorageCount\":968271036,\"maximumUplinks\":517735759,\"networkDevices\":[],\"provisioningState\":\"Deleting\"},\"id\":\"pmzznrtffya\",\"name\":\"itmhhei\",\"type\":\"qaqhvseufu\"}],\"nextLink\":\"rxpdlcgqlsi\"}") - .toObject(NetworkRackSkusListResult.class); - Assertions.assertEquals(NetworkRackRoleName.AGGREGATE_RACK, model.value().get(0).roleName()); - Assertions.assertEquals(674250391, model.value().get(0).maximumServerCount()); - Assertions.assertEquals(968271036, model.value().get(0).maximumStorageCount()); - Assertions.assertEquals(517735759, model.value().get(0).maximumUplinks()); - Assertions.assertEquals("rxpdlcgqlsi", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkRackSkusListResult model = - new NetworkRackSkusListResult() - .withValue( - Arrays - .asList( - new NetworkRackSkuInner() - .withRoleName(NetworkRackRoleName.AGGREGATE_RACK) - .withMaximumServerCount(674250391) - .withMaximumStorageCount(968271036) - .withMaximumUplinks(517735759) - .withNetworkDevices(Arrays.asList()))) - .withNextLink("rxpdlcgqlsi"); - model = BinaryData.fromObject(model).toObject(NetworkRackSkusListResult.class); - Assertions.assertEquals(NetworkRackRoleName.AGGREGATE_RACK, model.value().get(0).roleName()); - Assertions.assertEquals(674250391, model.value().get(0).maximumServerCount()); - Assertions.assertEquals(968271036, model.value().get(0).maximumStorageCount()); - Assertions.assertEquals(517735759, model.value().get(0).maximumUplinks()); - Assertions.assertEquals("rxpdlcgqlsi", model.nextLink()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksCreateMockTests.java deleted file mode 100644 index 6c1be86253836..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksCreateMockTests.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkRacksCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"networkRackSku\":\"rngl\",\"networkFabricId\":\"mbiipsnawwlqk\",\"networkDevices\":[\"hhl\",\"xricctkwmuqq\",\"ajxeiygle\"],\"provisioningState\":\"Succeeded\",\"annotation\":\"aexhdctrceqnk\"},\"location\":\"upobehdmljz\",\"tags\":{\"pphepifexl\":\"umepjpbibn\"},\"id\":\"qirccj\",\"name\":\"ly\",\"type\":\"cgxvrpj\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkRack response = - manager - .networkRacks() - .define("sidqpxlbtpakft") - .withRegion("duyeuyl") - .withExistingResourceGroup("mbpjptnvwjh") - .withNetworkRackSku("gatwmykyu") - .withNetworkFabricId("rymdwmf") - .withTags( - mapOf("h", "mtybkcgsu", "fxexlfciatxtjrr", "llnmwyn", "ajfoxc", "kmdskjhhxd", "lxlhuavkrm", "scv")) - .withAnnotation("outnpdctuhspfefy") - .create(); - - Assertions.assertEquals("upobehdmljz", response.location()); - Assertions.assertEquals("umepjpbibn", response.tags().get("pphepifexl")); - Assertions.assertEquals("rngl", response.networkRackSku()); - Assertions.assertEquals("mbiipsnawwlqk", response.networkFabricId()); - Assertions.assertEquals("aexhdctrceqnk", response.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 480f76ace27a4..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkRacksGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"networkRackSku\":\"fajs\",\"networkFabricId\":\"kskmqozzkivyhjrl\",\"networkDevices\":[\"jixlqfhefkwabs\"],\"provisioningState\":\"Updating\",\"annotation\":\"nqqlmgnl\"},\"location\":\"sjxtel\",\"tags\":{\"zqocarku\":\"vuqbozoo\",\"nx\":\"lbcnndt\"},\"id\":\"wqy\",\"name\":\"llhdyzm\",\"type\":\"ckze\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkRack response = - manager - .networkRacks() - .getByResourceGroupWithResponse("vucnulgmnh", "evdyz", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("sjxtel", response.location()); - Assertions.assertEquals("vuqbozoo", response.tags().get("zqocarku")); - Assertions.assertEquals("fajs", response.networkRackSku()); - Assertions.assertEquals("kskmqozzkivyhjrl", response.networkFabricId()); - Assertions.assertEquals("nqqlmgnl", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListByResourceGroupMockTests.java deleted file mode 100644 index d32c648a91dde..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListByResourceGroupMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkRacksListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"networkRackSku\":\"mxgaabjkdtfohfao\",\"networkFabricId\":\"zvkiwrsiwdy\",\"networkDevices\":[\"rykcrraueekcsue\",\"ogd\",\"acbcb\",\"ydl\"],\"provisioningState\":\"Updating\",\"annotation\":\"wmhmptyrilkfbnr\"},\"location\":\"xvztpbnfnqtxj\",\"tags\":{\"epl\":\"alswbnfd\"},\"id\":\"wqjnsfzygleexa\",\"name\":\"vmywhsbrcarycsjj\",\"type\":\"yvoaqajuvehzp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.networkRacks().listByResourceGroup("nxakckyw", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xvztpbnfnqtxj", response.iterator().next().location()); - Assertions.assertEquals("alswbnfd", response.iterator().next().tags().get("epl")); - Assertions.assertEquals("mxgaabjkdtfohfao", response.iterator().next().networkRackSku()); - Assertions.assertEquals("zvkiwrsiwdy", response.iterator().next().networkFabricId()); - Assertions.assertEquals("wmhmptyrilkfbnr", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListMockTests.java deleted file mode 100644 index c27a59beec79b..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRack; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkRacksListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"networkRackSku\":\"dmkrrb\",\"networkFabricId\":\"mpfu\",\"networkDevices\":[\"efgybpmfbfununmp\"],\"provisioningState\":\"Succeeded\",\"annotation\":\"fyif\"},\"location\":\"schlzvfictnkj\",\"tags\":{\"mjpjscdfpdqwty\":\"cwnphbkgfyrtogm\"},\"id\":\"ev\",\"name\":\"wmseharxifvqn\",\"type\":\"x\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.networkRacks().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("schlzvfictnkj", response.iterator().next().location()); - Assertions.assertEquals("cwnphbkgfyrtogm", response.iterator().next().tags().get("mjpjscdfpdqwty")); - Assertions.assertEquals("dmkrrb", response.iterator().next().networkRackSku()); - Assertions.assertEquals("mpfu", response.iterator().next().networkFabricId()); - Assertions.assertEquals("fyif", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListResultTests.java deleted file mode 100644 index 6a5a3f295670c..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkRacksListResultTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkRackInner; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkRacksListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NetworkRacksListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkRacksListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"networkRackSku\":\"rkywuhpsvfuu\",\"networkFabricId\":\"utlwexxwla\",\"networkDevices\":[],\"provisioningState\":\"Deleting\",\"annotation\":\"zsrzpgepq\"},\"location\":\"bb\",\"tags\":{\"vl\":\"gdakchz\",\"ibn\":\"xqnrkcxk\",\"swqrntvlwijp\":\"mysu\"},\"id\":\"ttexoqqpwcyyufmh\",\"name\":\"uncuw\",\"type\":\"qspkcdqzhlctd\"},{\"properties\":{\"networkRackSku\":\"unqndyfpchrqb\",\"networkFabricId\":\"jjrcgegydc\",\"networkDevices\":[],\"provisioningState\":\"Failed\",\"annotation\":\"umvq\"},\"location\":\"lihrraiouaubr\",\"tags\":{\"fuojrngif\":\"oq\",\"dfqwmkyoq\":\"rzpasccbiuimzdly\",\"lzo\":\"fdvruz\",\"fnmdxotn\":\"hpc\"},\"id\":\"fdgugeyzi\",\"name\":\"grkyuizabsnmfpph\",\"type\":\"jee\"},{\"properties\":{\"networkRackSku\":\"yhyhsgzfczb\",\"networkFabricId\":\"omfgbeglqgleohib\",\"networkDevices\":[],\"provisioningState\":\"Deleting\",\"annotation\":\"ankrrfxee\"},\"location\":\"tijv\",\"tags\":{\"cevehjkuyxoafg\":\"bmqzbqqxlajrnwx\",\"linmfgv\":\"oqltfae\"},\"id\":\"irpghriypoqeyh\",\"name\":\"qhykprlpyzn\",\"type\":\"ciqdsme\"}],\"nextLink\":\"itdfuxtyasiib\"}") - .toObject(NetworkRacksListResult.class); - Assertions.assertEquals("bb", model.value().get(0).location()); - Assertions.assertEquals("gdakchz", model.value().get(0).tags().get("vl")); - Assertions.assertEquals("rkywuhpsvfuu", model.value().get(0).networkRackSku()); - Assertions.assertEquals("utlwexxwla", model.value().get(0).networkFabricId()); - Assertions.assertEquals("zsrzpgepq", model.value().get(0).annotation()); - Assertions.assertEquals("itdfuxtyasiib", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkRacksListResult model = - new NetworkRacksListResult() - .withValue( - Arrays - .asList( - new NetworkRackInner() - .withLocation("bb") - .withTags(mapOf("vl", "gdakchz", "ibn", "xqnrkcxk", "swqrntvlwijp", "mysu")) - .withNetworkRackSku("rkywuhpsvfuu") - .withNetworkFabricId("utlwexxwla") - .withAnnotation("zsrzpgepq"), - new NetworkRackInner() - .withLocation("lihrraiouaubr") - .withTags( - mapOf( - "fuojrngif", - "oq", - "dfqwmkyoq", - "rzpasccbiuimzdly", - "lzo", - "fdvruz", - "fnmdxotn", - "hpc")) - .withNetworkRackSku("unqndyfpchrqb") - .withNetworkFabricId("jjrcgegydc") - .withAnnotation("umvq"), - new NetworkRackInner() - .withLocation("tijv") - .withTags(mapOf("cevehjkuyxoafg", "bmqzbqqxlajrnwx", "linmfgv", "oqltfae")) - .withNetworkRackSku("yhyhsgzfczb") - .withNetworkFabricId("omfgbeglqgleohib") - .withAnnotation("ankrrfxee"))) - .withNextLink("itdfuxtyasiib"); - model = BinaryData.fromObject(model).toObject(NetworkRacksListResult.class); - Assertions.assertEquals("bb", model.value().get(0).location()); - Assertions.assertEquals("gdakchz", model.value().get(0).tags().get("vl")); - Assertions.assertEquals("rkywuhpsvfuu", model.value().get(0).networkRackSku()); - Assertions.assertEquals("utlwexxwla", model.value().get(0).networkFabricId()); - Assertions.assertEquals("zsrzpgepq", model.value().get(0).annotation()); - Assertions.assertEquals("itdfuxtyasiib", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectInnerTests.java deleted file mode 100644 index 706dcd55b77a0..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectInnerTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.NniType; -import org.junit.jupiter.api.Assertions; - -public final class NetworkToNetworkInterconnectInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkToNetworkInterconnectInner model = - BinaryData - .fromString( - "{\"properties\":{\"nniType\":\"NPB\",\"administrativeState\":\"Disabled\",\"isManagementType\":\"True\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"portCount\":1844509739,\"mtu\":497478941,\"interfaces\":[\"ecuijpxtxs\",\"wprtu\"]},\"layer3Configuration\":{\"importRoutePolicyId\":\"awddjibab\",\"exportRoutePolicyId\":\"ititvtzeexavoxt\",\"peerASN\":165499088,\"vlanId\":420576736,\"fabricASN\":36693026,\"primaryIpv4Prefix\":\"qbw\",\"primaryIpv6Prefix\":\"pqtgsfjac\",\"secondaryIpv4Prefix\":\"lhhxudbxvodhtnsi\",\"secondaryIpv6Prefix\":\"dhzmmesckdlp\"},\"provisioningState\":\"Failed\"},\"id\":\"cxfailcfxwmdboxd\",\"name\":\"gsftufqobrjlnacg\",\"type\":\"ckknhxkizvy\"}") - .toObject(NetworkToNetworkInterconnectInner.class); - Assertions.assertEquals(NniType.NPB, model.nniType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.useOptionB()); - Assertions.assertEquals(1844509739, model.layer2Configuration().portCount()); - Assertions.assertEquals(497478941, model.layer2Configuration().mtu()); - Assertions.assertEquals("qbw", model.layer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("pqtgsfjac", model.layer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("lhhxudbxvodhtnsi", model.layer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("dhzmmesckdlp", model.layer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals("awddjibab", model.layer3Configuration().importRoutePolicyId()); - Assertions.assertEquals("ititvtzeexavoxt", model.layer3Configuration().exportRoutePolicyId()); - Assertions.assertEquals(165499088, model.layer3Configuration().peerAsn()); - Assertions.assertEquals(420576736, model.layer3Configuration().vlanId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkToNetworkInterconnectInner model = - new NetworkToNetworkInterconnectInner() - .withNniType(NniType.NPB) - .withIsManagementType(BooleanEnumProperty.TRUE) - .withUseOptionB(BooleanEnumProperty.TRUE) - .withLayer2Configuration(new Layer2Configuration().withPortCount(1844509739).withMtu(497478941)) - .withLayer3Configuration( - new Layer3Configuration() - .withPrimaryIpv4Prefix("qbw") - .withPrimaryIpv6Prefix("pqtgsfjac") - .withSecondaryIpv4Prefix("lhhxudbxvodhtnsi") - .withSecondaryIpv6Prefix("dhzmmesckdlp") - .withImportRoutePolicyId("awddjibab") - .withExportRoutePolicyId("ititvtzeexavoxt") - .withPeerAsn(165499088) - .withVlanId(420576736)); - model = BinaryData.fromObject(model).toObject(NetworkToNetworkInterconnectInner.class); - Assertions.assertEquals(NniType.NPB, model.nniType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.useOptionB()); - Assertions.assertEquals(1844509739, model.layer2Configuration().portCount()); - Assertions.assertEquals(497478941, model.layer2Configuration().mtu()); - Assertions.assertEquals("qbw", model.layer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("pqtgsfjac", model.layer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("lhhxudbxvodhtnsi", model.layer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("dhzmmesckdlp", model.layer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals("awddjibab", model.layer3Configuration().importRoutePolicyId()); - Assertions.assertEquals("ititvtzeexavoxt", model.layer3Configuration().exportRoutePolicyId()); - Assertions.assertEquals(165499088, model.layer3Configuration().peerAsn()); - Assertions.assertEquals(420576736, model.layer3Configuration().vlanId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPropertiesTests.java deleted file mode 100644 index eb3c05f59765c..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectPropertiesTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectProperties; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.NniType; -import org.junit.jupiter.api.Assertions; - -public final class NetworkToNetworkInterconnectPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkToNetworkInterconnectProperties model = - BinaryData - .fromString( - "{\"nniType\":\"CE\",\"administrativeState\":\"Disabled\",\"isManagementType\":\"True\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"portCount\":1308211330,\"mtu\":2075017284,\"interfaces\":[\"anokqgu\"]},\"layer3Configuration\":{\"importRoutePolicyId\":\"qnvb\",\"exportRoutePolicyId\":\"ylaxxulcdi\",\"peerASN\":2065681131,\"vlanId\":499643337,\"fabricASN\":81380434,\"primaryIpv4Prefix\":\"svgjrwhryvy\",\"primaryIpv6Prefix\":\"t\",\"secondaryIpv4Prefix\":\"lxgccknfnwmbtm\",\"secondaryIpv6Prefix\":\"dvjdhttza\"},\"provisioningState\":\"Updating\"}") - .toObject(NetworkToNetworkInterconnectProperties.class); - Assertions.assertEquals(NniType.CE, model.nniType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.useOptionB()); - Assertions.assertEquals(1308211330, model.layer2Configuration().portCount()); - Assertions.assertEquals(2075017284, model.layer2Configuration().mtu()); - Assertions.assertEquals("svgjrwhryvy", model.layer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("t", model.layer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("lxgccknfnwmbtm", model.layer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("dvjdhttza", model.layer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals("qnvb", model.layer3Configuration().importRoutePolicyId()); - Assertions.assertEquals("ylaxxulcdi", model.layer3Configuration().exportRoutePolicyId()); - Assertions.assertEquals(2065681131, model.layer3Configuration().peerAsn()); - Assertions.assertEquals(499643337, model.layer3Configuration().vlanId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkToNetworkInterconnectProperties model = - new NetworkToNetworkInterconnectProperties() - .withNniType(NniType.CE) - .withIsManagementType(BooleanEnumProperty.TRUE) - .withUseOptionB(BooleanEnumProperty.TRUE) - .withLayer2Configuration(new Layer2Configuration().withPortCount(1308211330).withMtu(2075017284)) - .withLayer3Configuration( - new Layer3Configuration() - .withPrimaryIpv4Prefix("svgjrwhryvy") - .withPrimaryIpv6Prefix("t") - .withSecondaryIpv4Prefix("lxgccknfnwmbtm") - .withSecondaryIpv6Prefix("dvjdhttza") - .withImportRoutePolicyId("qnvb") - .withExportRoutePolicyId("ylaxxulcdi") - .withPeerAsn(2065681131) - .withVlanId(499643337)); - model = BinaryData.fromObject(model).toObject(NetworkToNetworkInterconnectProperties.class); - Assertions.assertEquals(NniType.CE, model.nniType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.useOptionB()); - Assertions.assertEquals(1308211330, model.layer2Configuration().portCount()); - Assertions.assertEquals(2075017284, model.layer2Configuration().mtu()); - Assertions.assertEquals("svgjrwhryvy", model.layer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("t", model.layer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("lxgccknfnwmbtm", model.layer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("dvjdhttza", model.layer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals("qnvb", model.layer3Configuration().importRoutePolicyId()); - Assertions.assertEquals("ylaxxulcdi", model.layer3Configuration().exportRoutePolicyId()); - Assertions.assertEquals(2065681131, model.layer3Configuration().peerAsn()); - Assertions.assertEquals(499643337, model.layer3Configuration().vlanId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsCreateMockTests.java deleted file mode 100644 index dd6fec826031e..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsCreateMockTests.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.Layer3Configuration; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; -import com.azure.resourcemanager.managednetworkfabric.models.NniType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkToNetworkInterconnectsCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"nniType\":\"NPB\",\"administrativeState\":\"Disabled\",\"isManagementType\":\"True\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"portCount\":579053482,\"mtu\":1201500013,\"interfaces\":[]},\"layer3Configuration\":{\"importRoutePolicyId\":\"yparybjufptbjc\",\"exportRoutePolicyId\":\"nciuiyqvldaswvpp\",\"peerASN\":376114868,\"vlanId\":1027588492,\"fabricASN\":1049923210,\"primaryIpv4Prefix\":\"ndhzx\",\"primaryIpv6Prefix\":\"fcfsrhkhgsnx\",\"secondaryIpv4Prefix\":\"wkpphefsb\",\"secondaryIpv6Prefix\":\"lbzxomeikjc\"},\"provisioningState\":\"Succeeded\"},\"id\":\"cnmwpfsuqtaa\",\"name\":\"yqbxyxoyf\",\"type\":\"uqqiqezxlhd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkToNetworkInterconnect response = - manager - .networkToNetworkInterconnects() - .define("zwjiqullq") - .withExistingNetworkFabric("baevwjcnkottl", "uhvajmailfemjjza") - .withNniType(NniType.NPB) - .withIsManagementType(BooleanEnumProperty.TRUE) - .withUseOptionB(BooleanEnumProperty.TRUE) - .withLayer2Configuration(new Layer2Configuration().withPortCount(1898735756).withMtu(977245576)) - .withLayer3Configuration( - new Layer3Configuration() - .withPrimaryIpv4Prefix("bbcbrwji") - .withPrimaryIpv6Prefix("gn") - .withSecondaryIpv4Prefix("zbeewoiymrvzbju") - .withSecondaryIpv6Prefix("srziuct") - .withImportRoutePolicyId("rnyeofltfnnxrk") - .withExportRoutePolicyId("jfynnfmuiiirip") - .withPeerAsn(1895935525) - .withVlanId(1531073984)) - .create(); - - Assertions.assertEquals(NniType.NPB, response.nniType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, response.isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, response.useOptionB()); - Assertions.assertEquals(579053482, response.layer2Configuration().portCount()); - Assertions.assertEquals(1201500013, response.layer2Configuration().mtu()); - Assertions.assertEquals("ndhzx", response.layer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("fcfsrhkhgsnx", response.layer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("wkpphefsb", response.layer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("lbzxomeikjc", response.layer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals("yparybjufptbjc", response.layer3Configuration().importRoutePolicyId()); - Assertions.assertEquals("nciuiyqvldaswvpp", response.layer3Configuration().exportRoutePolicyId()); - Assertions.assertEquals(376114868, response.layer3Configuration().peerAsn()); - Assertions.assertEquals(1027588492, response.layer3Configuration().vlanId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsDeleteMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsDeleteMockTests.java deleted file mode 100644 index c2c4d366f827d..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkToNetworkInterconnectsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .networkToNetworkInterconnects() - .delete("djsllfr", "vdmvxadqa", "frgnawbabgfbktyj", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsGetWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsGetWithResponseMockTests.java deleted file mode 100644 index b57f42b273acc..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsGetWithResponseMockTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; -import com.azure.resourcemanager.managednetworkfabric.models.NniType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkToNetworkInterconnectsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"nniType\":\"NPB\",\"administrativeState\":\"Enabled\",\"isManagementType\":\"True\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"portCount\":463475114,\"mtu\":86909569,\"interfaces\":[]},\"layer3Configuration\":{\"importRoutePolicyId\":\"jjceatlijjjr\",\"exportRoutePolicyId\":\"am\",\"peerASN\":664726585,\"vlanId\":1936073751,\"fabricASN\":498774199,\"primaryIpv4Prefix\":\"vccxetyvku\",\"primaryIpv6Prefix\":\"ignohi\",\"secondaryIpv4Prefix\":\"gqogjwpindedva\",\"secondaryIpv6Prefix\":\"xbhmed\"},\"provisioningState\":\"Updating\"},\"id\":\"jywfcfxzirzzih\",\"name\":\"wypusuvjsl\",\"type\":\"zwci\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkToNetworkInterconnect response = - manager - .networkToNetworkInterconnects() - .getWithResponse("vlmfej", "oqeykglt", "gxhqfgqkayejs", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(NniType.NPB, response.nniType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, response.isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, response.useOptionB()); - Assertions.assertEquals(463475114, response.layer2Configuration().portCount()); - Assertions.assertEquals(86909569, response.layer2Configuration().mtu()); - Assertions.assertEquals("vccxetyvku", response.layer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("ignohi", response.layer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("gqogjwpindedva", response.layer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("xbhmed", response.layer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals("jjceatlijjjr", response.layer3Configuration().importRoutePolicyId()); - Assertions.assertEquals("am", response.layer3Configuration().exportRoutePolicyId()); - Assertions.assertEquals(664726585, response.layer3Configuration().peerAsn()); - Assertions.assertEquals(1936073751, response.layer3Configuration().vlanId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListMockTests.java deleted file mode 100644 index fbc092e39e11a..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListMockTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnect; -import com.azure.resourcemanager.managednetworkfabric.models.NniType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetworkToNetworkInterconnectsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"nniType\":\"NPB\",\"administrativeState\":\"Enabled\",\"isManagementType\":\"True\",\"useOptionB\":\"True\",\"layer2Configuration\":{\"portCount\":1023506502,\"mtu\":219417114,\"interfaces\":[]},\"layer3Configuration\":{\"importRoutePolicyId\":\"jceagb\",\"exportRoutePolicyId\":\"vl\",\"peerASN\":1205168137,\"vlanId\":1027959968,\"fabricASN\":1094803086,\"primaryIpv4Prefix\":\"hxgonoyjf\",\"primaryIpv6Prefix\":\"puby\",\"secondaryIpv4Prefix\":\"clkfkee\",\"secondaryIpv6Prefix\":\"vop\"},\"provisioningState\":\"Updating\"},\"id\":\"oqujlyegqavn\",\"name\":\"gflqqbtnyjp\",\"type\":\"lxdbfvabmvms\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .networkToNetworkInterconnects() - .list("fczlfsyqkfrbzgow", "xqmjeajcxn", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(NniType.NPB, response.iterator().next().nniType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, response.iterator().next().isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, response.iterator().next().useOptionB()); - Assertions.assertEquals(1023506502, response.iterator().next().layer2Configuration().portCount()); - Assertions.assertEquals(219417114, response.iterator().next().layer2Configuration().mtu()); - Assertions.assertEquals("hxgonoyjf", response.iterator().next().layer3Configuration().primaryIpv4Prefix()); - Assertions.assertEquals("puby", response.iterator().next().layer3Configuration().primaryIpv6Prefix()); - Assertions.assertEquals("clkfkee", response.iterator().next().layer3Configuration().secondaryIpv4Prefix()); - Assertions.assertEquals("vop", response.iterator().next().layer3Configuration().secondaryIpv6Prefix()); - Assertions.assertEquals("jceagb", response.iterator().next().layer3Configuration().importRoutePolicyId()); - Assertions.assertEquals("vl", response.iterator().next().layer3Configuration().exportRoutePolicyId()); - Assertions.assertEquals(1205168137, response.iterator().next().layer3Configuration().peerAsn()); - Assertions.assertEquals(1027959968, response.iterator().next().layer3Configuration().vlanId()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListTests.java deleted file mode 100644 index cc787dc51d6b2..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/NetworkToNetworkInterconnectsListTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkToNetworkInterconnectInner; -import com.azure.resourcemanager.managednetworkfabric.models.BooleanEnumProperty; -import com.azure.resourcemanager.managednetworkfabric.models.NetworkToNetworkInterconnectsList; -import com.azure.resourcemanager.managednetworkfabric.models.NniType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkToNetworkInterconnectsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkToNetworkInterconnectsList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"nniType\":\"NPB\",\"administrativeState\":\"Disabled\",\"isManagementType\":\"True\",\"useOptionB\":\"False\",\"provisioningState\":\"Canceled\"},\"id\":\"esmkssjhoiftxfkf\",\"name\":\"egprhptil\",\"type\":\"ucb\"},{\"properties\":{\"nniType\":\"CE\",\"administrativeState\":\"Enabled\",\"isManagementType\":\"True\",\"useOptionB\":\"True\",\"provisioningState\":\"Updating\"},\"id\":\"drizetpwbr\",\"name\":\"lllibph\",\"type\":\"qzmiza\"}],\"nextLink\":\"kan\"}") - .toObject(NetworkToNetworkInterconnectsList.class); - Assertions.assertEquals(NniType.NPB, model.value().get(0).nniType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.value().get(0).isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.value().get(0).useOptionB()); - Assertions.assertEquals("kan", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkToNetworkInterconnectsList model = - new NetworkToNetworkInterconnectsList() - .withValue( - Arrays - .asList( - new NetworkToNetworkInterconnectInner() - .withNniType(NniType.NPB) - .withIsManagementType(BooleanEnumProperty.TRUE) - .withUseOptionB(BooleanEnumProperty.FALSE), - new NetworkToNetworkInterconnectInner() - .withNniType(NniType.CE) - .withIsManagementType(BooleanEnumProperty.TRUE) - .withUseOptionB(BooleanEnumProperty.TRUE))) - .withNextLink("kan"); - model = BinaryData.fromObject(model).toObject(NetworkToNetworkInterconnectsList.class); - Assertions.assertEquals(NniType.NPB, model.value().get(0).nniType()); - Assertions.assertEquals(BooleanEnumProperty.TRUE, model.value().get(0).isManagementType()); - Assertions.assertEquals(BooleanEnumProperty.FALSE, model.value().get(0).useOptionB()); - Assertions.assertEquals("kan", model.nextLink()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationDisplayTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationDisplayTests.java deleted file mode 100644 index 1795ebdbade0d..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationDisplayTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"leipqx\",\"resource\":\"wvz\",\"operation\":\"zvd\",\"description\":\"zdix\"}") - .toObject(OperationDisplay.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationInnerTests.java deleted file mode 100644 index 51d098fe5a7d0..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationInnerTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.OperationInner; -import com.azure.resourcemanager.managednetworkfabric.models.OperationDisplay; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"cmuapcvhd\",\"isDataAction\":false,\"display\":{\"provider\":\"qxeysko\",\"resource\":\"zinkfkbgbzbowxeq\",\"operation\":\"ljmygvkzqkjjeokb\",\"description\":\"fezrx\"},\"origin\":\"user\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationListResultTests.java deleted file mode 100644 index 1c337b02e3892..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"nnust\",\"isDataAction\":true,\"display\":{\"provider\":\"nmgixh\",\"resource\":\"avmqfoudor\",\"operation\":\"gyyprotwy\",\"description\":\"ndm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"mjkavlgorbmft\",\"isDataAction\":true,\"display\":{\"provider\":\"fjltfvnzcyjtotp\",\"resource\":\"pvpbdbzqgqqiheds\",\"operation\":\"wthmkyib\",\"description\":\"sihsgqcwdhohsd\"},\"origin\":\"user\",\"actionType\":\"Internal\"}],\"nextLink\":\"ufcohdxbz\"}") - .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationsListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationsListMockTests.java deleted file mode 100644 index dfaa2ab311d4e..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OperationsListMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.Operation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"czuod\",\"isDataAction\":true,\"display\":{\"provider\":\"ettepdjxqe\",\"resource\":\"oy\",\"operation\":\"iylpck\",\"description\":\"wsedvesk\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionAPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionAPropertiesTests.java deleted file mode 100644 index 21466a6afd59a..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionAPropertiesTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.FabricBfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionAProperties; -import org.junit.jupiter.api.Assertions; - -public final class OptionAPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OptionAProperties model = - BinaryData - .fromString( - "{\"mtu\":672281417,\"vlanId\":772220460,\"peerASN\":811259907,\"bfdConfiguration\":{\"interval\":1114052241,\"multiplier\":873117739},\"primaryIpv4Prefix\":\"gsh\",\"primaryIpv6Prefix\":\"gsgbpfgzdjt\",\"secondaryIpv4Prefix\":\"zflbqvg\",\"secondaryIpv6Prefix\":\"vl\"}") - .toObject(OptionAProperties.class); - Assertions.assertEquals("gsh", model.primaryIpv4Prefix()); - Assertions.assertEquals("gsgbpfgzdjt", model.primaryIpv6Prefix()); - Assertions.assertEquals("zflbqvg", model.secondaryIpv4Prefix()); - Assertions.assertEquals("vl", model.secondaryIpv6Prefix()); - Assertions.assertEquals(672281417, model.mtu()); - Assertions.assertEquals(772220460, model.vlanId()); - Assertions.assertEquals(811259907, model.peerAsn()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OptionAProperties model = - new OptionAProperties() - .withPrimaryIpv4Prefix("gsh") - .withPrimaryIpv6Prefix("gsgbpfgzdjt") - .withSecondaryIpv4Prefix("zflbqvg") - .withSecondaryIpv6Prefix("vl") - .withMtu(672281417) - .withVlanId(772220460) - .withPeerAsn(811259907) - .withBfdConfiguration(new FabricBfdConfiguration()); - model = BinaryData.fromObject(model).toObject(OptionAProperties.class); - Assertions.assertEquals("gsh", model.primaryIpv4Prefix()); - Assertions.assertEquals("gsgbpfgzdjt", model.primaryIpv6Prefix()); - Assertions.assertEquals("zflbqvg", model.secondaryIpv4Prefix()); - Assertions.assertEquals("vl", model.secondaryIpv6Prefix()); - Assertions.assertEquals(672281417, model.mtu()); - Assertions.assertEquals(772220460, model.vlanId()); - Assertions.assertEquals(811259907, model.peerAsn()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBPropertiesAutoGeneratedTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBPropertiesAutoGeneratedTests.java deleted file mode 100644 index aece4b33c054e..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBPropertiesAutoGeneratedTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBPropertiesAutoGenerated; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OptionBPropertiesAutoGeneratedTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OptionBPropertiesAutoGenerated model = - BinaryData - .fromString( - "{\"importRouteTargets\":[\"xtgqscjavftjuh\",\"qaz\",\"mtggu\"],\"exportRouteTargets\":[\"ijr\",\"jcivmmg\",\"f\",\"fiwrxgkn\"]}") - .toObject(OptionBPropertiesAutoGenerated.class); - Assertions.assertEquals("xtgqscjavftjuh", model.importRouteTargets().get(0)); - Assertions.assertEquals("ijr", model.exportRouteTargets().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OptionBPropertiesAutoGenerated model = - new OptionBPropertiesAutoGenerated() - .withImportRouteTargets(Arrays.asList("xtgqscjavftjuh", "qaz", "mtggu")) - .withExportRouteTargets(Arrays.asList("ijr", "jcivmmg", "f", "fiwrxgkn")); - model = BinaryData.fromObject(model).toObject(OptionBPropertiesAutoGenerated.class); - Assertions.assertEquals("xtgqscjavftjuh", model.importRouteTargets().get(0)); - Assertions.assertEquals("ijr", model.exportRouteTargets().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBPropertiesTests.java deleted file mode 100644 index 801f225fd2d0b..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/OptionBPropertiesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OptionBPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OptionBProperties model = - BinaryData - .fromString( - "{\"importRouteTargets\":[\"wxqibyq\",\"nyowxwlmdjrkvfg\",\"vfvpdbodaciz\"],\"exportRouteTargets\":[\"lhkrribdeibqipqk\"]}") - .toObject(OptionBProperties.class); - Assertions.assertEquals("wxqibyq", model.importRouteTargets().get(0)); - Assertions.assertEquals("lhkrribdeibqipqk", model.exportRouteTargets().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OptionBProperties model = - new OptionBProperties() - .withImportRouteTargets(Arrays.asList("wxqibyq", "nyowxwlmdjrkvfg", "vfvpdbodaciz")) - .withExportRouteTargets(Arrays.asList("lhkrribdeibqipqk")); - model = BinaryData.fromObject(model).toObject(OptionBProperties.class); - Assertions.assertEquals("wxqibyq", model.importRouteTargets().get(0)); - Assertions.assertEquals("lhkrribdeibqipqk", model.exportRouteTargets().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCreateMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCreateMockTests.java deleted file mode 100644 index 41ad02d604416..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesCreateMockTests.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicy; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class RoutePoliciesCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"statements\":[],\"provisioningState\":\"Succeeded\",\"annotation\":\"kybtglwkzpgajsqj\"},\"location\":\"mqbmfuvqarwz\",\"tags\":{\"td\":\"rebluimmbwxsf\",\"xekr\":\"b\"},\"id\":\"okqkbudbtwao\",\"name\":\"bavly\",\"type\":\"taaknwfrkebsmhp\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RoutePolicy response = - manager - .routePolicies() - .define("kwwwnckn") - .withRegion("ucyrt") - .withExistingResourceGroup("vzilmhiv") - .withStatements(Arrays.asList()) - .withTags( - mapOf( - "am", - "lehmcgcjeinueho", - "tmbqdabzfivfok", - "fejvqn", - "jfwyyrlhgenuze", - "ysthhza", - "zlsmmdqgmihzpim", - "gvkvebaqszll")) - .withAnnotation("lskzptjxul") - .create(); - - Assertions.assertEquals("mqbmfuvqarwz", response.location()); - Assertions.assertEquals("rebluimmbwxsf", response.tags().get("td")); - Assertions.assertEquals("kybtglwkzpgajsqj", response.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesDeleteMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesDeleteMockTests.java deleted file mode 100644 index 67a7e0dd2b0af..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class RoutePoliciesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.routePolicies().delete("trdexyionofnin", "dbzsx", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesGetByResourceGroupWithResponseMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 763be5bdbd5f4..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicy; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class RoutePoliciesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"statements\":[],\"provisioningState\":\"Updating\",\"annotation\":\"eqacd\"},\"location\":\"tz\",\"tags\":{\"hnuqndaizu\":\"pefcpcz\",\"zx\":\"fkhuytu\",\"wtthaokgksk\":\"mtvtvegwqiukvzwy\",\"bs\":\"i\"},\"id\":\"hajqfuk\",\"name\":\"eexpgeumi\",\"type\":\"hwu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RoutePolicy response = - manager - .routePolicies() - .getByResourceGroupWithResponse("phrgfnzhctm", "tsghpbcbcp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("tz", response.location()); - Assertions.assertEquals("pefcpcz", response.tags().get("hnuqndaizu")); - Assertions.assertEquals("eqacd", response.annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListByResourceGroupMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListByResourceGroupMockTests.java deleted file mode 100644 index 408b3c930f8d8..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListByResourceGroupMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicy; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class RoutePoliciesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"statements\":[],\"provisioningState\":\"Failed\",\"annotation\":\"yksivmfogdrtbfc\"},\"location\":\"rftsjcwjjxs\",\"tags\":{\"if\":\"awvifdxke\",\"loozrvt\":\"ocjxw\"},\"id\":\"vcmuf\",\"name\":\"nlcpxxviry\",\"type\":\"yngjgvrquvpygglp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.routePolicies().listByResourceGroup("wqqrsmpcbbprtuga", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("rftsjcwjjxs", response.iterator().next().location()); - Assertions.assertEquals("awvifdxke", response.iterator().next().tags().get("if")); - Assertions.assertEquals("yksivmfogdrtbfc", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListMockTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListMockTests.java deleted file mode 100644 index 07c8e163423a1..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicy; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class RoutePoliciesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"statements\":[],\"provisioningState\":\"Deleting\",\"annotation\":\"ueljtiahxmfqryar\"},\"location\":\"x\",\"tags\":{\"btl\":\"glcjkayspthzod\",\"kfmkmfdjxyxgbk\":\"jtgblios\",\"l\":\"qvjcteoe\",\"xv\":\"slskkz\"},\"id\":\"nzdpvoco\",\"name\":\"hpcnabxzfsn\",\"type\":\"gyte\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ManagedNetworkFabricManager manager = - ManagedNetworkFabricManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.routePolicies().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("x", response.iterator().next().location()); - Assertions.assertEquals("glcjkayspthzod", response.iterator().next().tags().get("btl")); - Assertions.assertEquals("ueljtiahxmfqryar", response.iterator().next().annotation()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListResultTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListResultTests.java deleted file mode 100644 index b901cca870ceb..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePoliciesListResultTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePoliciesListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RoutePoliciesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RoutePoliciesListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"statements\":[],\"provisioningState\":\"Canceled\",\"annotation\":\"xqmul\"},\"location\":\"lxqzvn\",\"tags\":{\"brqbsmswzi\":\"bycucrwnamikz\",\"vhczznvfby\":\"gfuhokzrusw\",\"vumwmxqh\":\"jsxjwwix\",\"hflzokxco\":\"dvnoamldsehaohdj\"},\"id\":\"pelnjetag\",\"name\":\"tsxoatftgz\",\"type\":\"npbs\"},{\"properties\":{\"statements\":[],\"provisioningState\":\"Failed\",\"annotation\":\"loccsrmozihm\"},\"location\":\"g\",\"tags\":{\"xgrytfmp\":\"xxpkyjcxc\"},\"id\":\"ycilrmcaykggnox\",\"name\":\"ztrksxwpndf\",\"type\":\"pfnznthjtwkj\"},{\"properties\":{\"statements\":[],\"provisioningState\":\"Updating\",\"annotation\":\"xuzvoamktcqi\"},\"location\":\"mgbzahgxqdlyrtl\",\"tags\":{\"nbsoqeqalarv\":\"prltzkatbhjmz\"},\"id\":\"agunbtgfebw\",\"name\":\"nbmhyree\",\"type\":\"dzqavbpdqmjxlyyz\"},{\"properties\":{\"statements\":[],\"provisioningState\":\"Failed\",\"annotation\":\"uwt\"},\"location\":\"jjyuojqtobax\",\"tags\":{\"snkq\":\"ytunlbfjkwr\"},\"id\":\"hsyrqunj\",\"name\":\"hdenxaulk\",\"type\":\"akdkifmjnnawtqab\"}],\"nextLink\":\"uckpggqoweyir\"}") - .toObject(RoutePoliciesListResult.class); - Assertions.assertEquals("lxqzvn", model.value().get(0).location()); - Assertions.assertEquals("bycucrwnamikz", model.value().get(0).tags().get("brqbsmswzi")); - Assertions.assertEquals("xqmul", model.value().get(0).annotation()); - Assertions.assertEquals("uckpggqoweyir", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RoutePoliciesListResult model = - new RoutePoliciesListResult() - .withValue( - Arrays - .asList( - new RoutePolicyInner() - .withLocation("lxqzvn") - .withTags( - mapOf( - "brqbsmswzi", - "bycucrwnamikz", - "vhczznvfby", - "gfuhokzrusw", - "vumwmxqh", - "jsxjwwix", - "hflzokxco", - "dvnoamldsehaohdj")) - .withStatements(Arrays.asList()) - .withAnnotation("xqmul"), - new RoutePolicyInner() - .withLocation("g") - .withTags(mapOf("xgrytfmp", "xxpkyjcxc")) - .withStatements(Arrays.asList()) - .withAnnotation("loccsrmozihm"), - new RoutePolicyInner() - .withLocation("mgbzahgxqdlyrtl") - .withTags(mapOf("nbsoqeqalarv", "prltzkatbhjmz")) - .withStatements(Arrays.asList()) - .withAnnotation("xuzvoamktcqi"), - new RoutePolicyInner() - .withLocation("jjyuojqtobax") - .withTags(mapOf("snkq", "ytunlbfjkwr")) - .withStatements(Arrays.asList()) - .withAnnotation("uwt"))) - .withNextLink("uckpggqoweyir"); - model = BinaryData.fromObject(model).toObject(RoutePoliciesListResult.class); - Assertions.assertEquals("lxqzvn", model.value().get(0).location()); - Assertions.assertEquals("bycucrwnamikz", model.value().get(0).tags().get("brqbsmswzi")); - Assertions.assertEquals("xqmul", model.value().get(0).annotation()); - Assertions.assertEquals("uckpggqoweyir", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyInnerTests.java deleted file mode 100644 index 7194f895a4874..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyInnerTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyInner; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RoutePolicyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RoutePolicyInner model = - BinaryData - .fromString( - "{\"properties\":{\"statements\":[{\"sequenceNumber\":738730611020453628,\"annotation\":\"odawopqhewjptmcg\"},{\"sequenceNumber\":7587339093272860703,\"annotation\":\"t\"}],\"provisioningState\":\"Canceled\",\"annotation\":\"dlat\"},\"location\":\"mzlbiojlvfhrb\",\"tags\":{\"prprsnmokay\":\"eqvcwwyyurmoch\",\"pcpil\":\"ejnhlbkpb\",\"hol\":\"hahzvechndbnwi\",\"efqsfapaqtferrqw\":\"wjwiuub\"},\"id\":\"x\",\"name\":\"kmfx\",\"type\":\"pjwogqqno\"}") - .toObject(RoutePolicyInner.class); - Assertions.assertEquals("mzlbiojlvfhrb", model.location()); - Assertions.assertEquals("eqvcwwyyurmoch", model.tags().get("prprsnmokay")); - Assertions.assertEquals("odawopqhewjptmcg", model.statements().get(0).annotation()); - Assertions.assertEquals(738730611020453628L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("dlat", model.annotation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RoutePolicyInner model = - new RoutePolicyInner() - .withLocation("mzlbiojlvfhrb") - .withTags( - mapOf( - "prprsnmokay", - "eqvcwwyyurmoch", - "pcpil", - "ejnhlbkpb", - "hol", - "hahzvechndbnwi", - "efqsfapaqtferrqw", - "wjwiuub")) - .withStatements( - Arrays - .asList( - new RoutePolicyStatementProperties() - .withAnnotation("odawopqhewjptmcg") - .withSequenceNumber(738730611020453628L), - new RoutePolicyStatementProperties() - .withAnnotation("t") - .withSequenceNumber(7587339093272860703L))) - .withAnnotation("dlat"); - model = BinaryData.fromObject(model).toObject(RoutePolicyInner.class); - Assertions.assertEquals("mzlbiojlvfhrb", model.location()); - Assertions.assertEquals("eqvcwwyyurmoch", model.tags().get("prprsnmokay")); - Assertions.assertEquals("odawopqhewjptmcg", model.statements().get(0).annotation()); - Assertions.assertEquals(738730611020453628L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("dlat", model.annotation()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPatchTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPatchTests.java deleted file mode 100644 index 9e8099aa57a5c..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPatchTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RoutePolicyPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RoutePolicyPatch model = - BinaryData - .fromString( - "{\"tags\":{\"onsts\":\"qwhix\",\"xgvelfclduccbird\":\"i\",\"jizcilnghgs\":\"vuwcobiegstmnin\"}}") - .toObject(RoutePolicyPatch.class); - Assertions.assertEquals("qwhix", model.tags().get("onsts")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RoutePolicyPatch model = - new RoutePolicyPatch() - .withTags(mapOf("onsts", "qwhix", "xgvelfclduccbird", "i", "jizcilnghgs", "vuwcobiegstmnin")); - model = BinaryData.fromObject(model).toObject(RoutePolicyPatch.class); - Assertions.assertEquals("qwhix", model.tags().get("onsts")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPropertiesTests.java deleted file mode 100644 index 2b7fbc64e6d8f..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyPropertiesTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.RoutePolicyProperties; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; -import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RoutePolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RoutePolicyProperties model = - BinaryData - .fromString( - "{\"statements\":[{\"sequenceNumber\":6974301688992111876,\"condition\":{\"ipPrefixId\":\"dabtqwp\",\"ipExtendedCommunityIds\":[],\"ipCommunityIds\":[]},\"action\":{\"localPreference\":8313394416637011338,\"actionType\":\"Deny\"},\"annotation\":\"ucljgkyexaoguya\"}],\"provisioningState\":\"Succeeded\",\"annotation\":\"sdaultxij\"}") - .toObject(RoutePolicyProperties.class); - Assertions.assertEquals("sdaultxij", model.annotation()); - Assertions.assertEquals("ucljgkyexaoguya", model.statements().get(0).annotation()); - Assertions.assertEquals(6974301688992111876L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("dabtqwp", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals(8313394416637011338L, model.statements().get(0).action().localPreference()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.statements().get(0).action().actionType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RoutePolicyProperties model = - new RoutePolicyProperties() - .withAnnotation("sdaultxij") - .withStatements( - Arrays - .asList( - new RoutePolicyStatementProperties() - .withAnnotation("ucljgkyexaoguya") - .withSequenceNumber(6974301688992111876L) - .withCondition( - new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList()) - .withIpPrefixId("dabtqwp") - .withIpExtendedCommunityIds(Arrays.asList())) - .withAction( - new StatementActionProperties() - .withLocalPreference(8313394416637011338L) - .withActionType(CommunityActionTypes.DENY)))); - model = BinaryData.fromObject(model).toObject(RoutePolicyProperties.class); - Assertions.assertEquals("sdaultxij", model.annotation()); - Assertions.assertEquals("ucljgkyexaoguya", model.statements().get(0).annotation()); - Assertions.assertEquals(6974301688992111876L, model.statements().get(0).sequenceNumber()); - Assertions.assertEquals("dabtqwp", model.statements().get(0).condition().ipPrefixId()); - Assertions.assertEquals(8313394416637011338L, model.statements().get(0).action().localPreference()); - Assertions.assertEquals(CommunityActionTypes.DENY, model.statements().get(0).action().actionType()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyStatementPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyStatementPropertiesTests.java deleted file mode 100644 index 6f1a133286924..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/RoutePolicyStatementPropertiesTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.RoutePolicyStatementProperties; -import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; -import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RoutePolicyStatementPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RoutePolicyStatementProperties model = - BinaryData - .fromString( - "{\"sequenceNumber\":1316152777168081705,\"condition\":{\"ipPrefixId\":\"qwazlnqnmcjngzq\",\"ipExtendedCommunityIds\":[\"tb\",\"wgnyfusfzsvtui\",\"zh\",\"jqg\"],\"ipCommunityIds\":[\"hm\"]},\"action\":{\"localPreference\":6648099911954184896,\"actionType\":\"Permit\",\"ipCommunityProperties\":{},\"ipExtendedCommunityProperties\":{}},\"annotation\":\"sovwxznptgoeiyb\"}") - .toObject(RoutePolicyStatementProperties.class); - Assertions.assertEquals("sovwxznptgoeiyb", model.annotation()); - Assertions.assertEquals(1316152777168081705L, model.sequenceNumber()); - Assertions.assertEquals("hm", model.condition().ipCommunityIds().get(0)); - Assertions.assertEquals("qwazlnqnmcjngzq", model.condition().ipPrefixId()); - Assertions.assertEquals("tb", model.condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(6648099911954184896L, model.action().localPreference()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action().actionType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RoutePolicyStatementProperties model = - new RoutePolicyStatementProperties() - .withAnnotation("sovwxznptgoeiyb") - .withSequenceNumber(1316152777168081705L) - .withCondition( - new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("hm")) - .withIpPrefixId("qwazlnqnmcjngzq") - .withIpExtendedCommunityIds(Arrays.asList("tb", "wgnyfusfzsvtui", "zh", "jqg"))) - .withAction( - new StatementActionProperties() - .withLocalPreference(6648099911954184896L) - .withActionType(CommunityActionTypes.PERMIT) - .withIpCommunityProperties(new ActionIpCommunityProperties()) - .withIpExtendedCommunityProperties(new ActionIpExtendedCommunityProperties())); - model = BinaryData.fromObject(model).toObject(RoutePolicyStatementProperties.class); - Assertions.assertEquals("sovwxznptgoeiyb", model.annotation()); - Assertions.assertEquals(1316152777168081705L, model.sequenceNumber()); - Assertions.assertEquals("hm", model.condition().ipCommunityIds().get(0)); - Assertions.assertEquals("qwazlnqnmcjngzq", model.condition().ipPrefixId()); - Assertions.assertEquals("tb", model.condition().ipExtendedCommunityIds().get(0)); - Assertions.assertEquals(6648099911954184896L, model.action().localPreference()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.action().actionType()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementActionPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementActionPropertiesTests.java deleted file mode 100644 index ff31aa1230d0b..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementActionPropertiesTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.ActionIpCommunityProperties; -import com.azure.resourcemanager.managednetworkfabric.models.ActionIpExtendedCommunityProperties; -import com.azure.resourcemanager.managednetworkfabric.models.CommunityActionTypes; -import com.azure.resourcemanager.managednetworkfabric.models.IpCommunityIdList; -import com.azure.resourcemanager.managednetworkfabric.models.IpExtendedCommunityIdList; -import com.azure.resourcemanager.managednetworkfabric.models.StatementActionProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class StatementActionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StatementActionProperties model = - BinaryData - .fromString( - "{\"localPreference\":3509180150248793355,\"actionType\":\"Permit\",\"ipCommunityProperties\":{\"delete\":{\"ipCommunityIds\":[\"h\",\"aglkafhon\",\"juj\"]},\"set\":{\"ipCommunityIds\":[\"pzvcpopmxelnwc\",\"tyjedex\",\"mlfmkqs\",\"azuawx\"]},\"add\":{\"ipCommunityIds\":[\"uamwabzxrvxc\",\"s\",\"sphaivmxyasflvg\"]}},\"ipExtendedCommunityProperties\":{\"delete\":{\"ipExtendedCommunityIds\":[\"wakoihkn\",\"mjblmljhlny\"]},\"set\":{\"ipExtendedCommunityIds\":[\"qyryuzcbmqqvxm\",\"wfgtayxonsup\",\"ujlzqnhcvsqltn\",\"oibgsxg\"]},\"add\":{\"ipExtendedCommunityIds\":[\"qonmpqoxwdof\"]}}}") - .toObject(StatementActionProperties.class); - Assertions.assertEquals(3509180150248793355L, model.localPreference()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.actionType()); - Assertions.assertEquals("uamwabzxrvxc", model.ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("h", model.ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("pzvcpopmxelnwc", model.ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions - .assertEquals("qonmpqoxwdof", model.ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions - .assertEquals("wakoihkn", model.ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); - Assertions - .assertEquals( - "qyryuzcbmqqvxm", model.ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StatementActionProperties model = - new StatementActionProperties() - .withLocalPreference(3509180150248793355L) - .withActionType(CommunityActionTypes.PERMIT) - .withIpCommunityProperties( - new ActionIpCommunityProperties() - .withAdd( - new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("uamwabzxrvxc", "s", "sphaivmxyasflvg"))) - .withDelete(new IpCommunityIdList().withIpCommunityIds(Arrays.asList("h", "aglkafhon", "juj"))) - .withSet( - new IpCommunityIdList() - .withIpCommunityIds(Arrays.asList("pzvcpopmxelnwc", "tyjedex", "mlfmkqs", "azuawx")))) - .withIpExtendedCommunityProperties( - new ActionIpExtendedCommunityProperties() - .withAdd( - new IpExtendedCommunityIdList().withIpExtendedCommunityIds(Arrays.asList("qonmpqoxwdof"))) - .withDelete( - new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds(Arrays.asList("wakoihkn", "mjblmljhlny"))) - .withSet( - new IpExtendedCommunityIdList() - .withIpExtendedCommunityIds( - Arrays.asList("qyryuzcbmqqvxm", "wfgtayxonsup", "ujlzqnhcvsqltn", "oibgsxg")))); - model = BinaryData.fromObject(model).toObject(StatementActionProperties.class); - Assertions.assertEquals(3509180150248793355L, model.localPreference()); - Assertions.assertEquals(CommunityActionTypes.PERMIT, model.actionType()); - Assertions.assertEquals("uamwabzxrvxc", model.ipCommunityProperties().add().ipCommunityIds().get(0)); - Assertions.assertEquals("h", model.ipCommunityProperties().delete().ipCommunityIds().get(0)); - Assertions.assertEquals("pzvcpopmxelnwc", model.ipCommunityProperties().set().ipCommunityIds().get(0)); - Assertions - .assertEquals("qonmpqoxwdof", model.ipExtendedCommunityProperties().add().ipExtendedCommunityIds().get(0)); - Assertions - .assertEquals("wakoihkn", model.ipExtendedCommunityProperties().delete().ipExtendedCommunityIds().get(0)); - Assertions - .assertEquals( - "qyryuzcbmqqvxm", model.ipExtendedCommunityProperties().set().ipExtendedCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementConditionPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementConditionPropertiesTests.java deleted file mode 100644 index 5a586d6cf9ef7..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StatementConditionPropertiesTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.StatementConditionProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class StatementConditionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StatementConditionProperties model = - BinaryData - .fromString( - "{\"ipPrefixId\":\"bp\",\"ipExtendedCommunityIds\":[\"f\"],\"ipCommunityIds\":[\"vntjlrigjk\",\"kyrioovzid\",\"xwaabzmifrygznmm\",\"xrizkzobgop\"]}") - .toObject(StatementConditionProperties.class); - Assertions.assertEquals("vntjlrigjk", model.ipCommunityIds().get(0)); - Assertions.assertEquals("bp", model.ipPrefixId()); - Assertions.assertEquals("f", model.ipExtendedCommunityIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StatementConditionProperties model = - new StatementConditionProperties() - .withIpCommunityIds(Arrays.asList("vntjlrigjk", "kyrioovzid", "xwaabzmifrygznmm", "xrizkzobgop")) - .withIpPrefixId("bp") - .withIpExtendedCommunityIds(Arrays.asList("f")); - model = BinaryData.fromObject(model).toObject(StatementConditionProperties.class); - Assertions.assertEquals("vntjlrigjk", model.ipCommunityIds().get(0)); - Assertions.assertEquals("bp", model.ipPrefixId()); - Assertions.assertEquals("f", model.ipExtendedCommunityIds().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteConfigurationTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteConfigurationTests.java deleted file mode 100644 index 47b60e8e75341..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRouteConfigurationTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.BfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class StaticRouteConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StaticRouteConfiguration model = - BinaryData - .fromString( - "{\"bfdConfiguration\":{\"administrativeState\":\"Enabled\",\"interval\":829612504,\"multiplier\":1087078752},\"ipv4Routes\":[{\"prefix\":\"cxozapvhelxp\",\"nextHop\":[\"lya\",\"dd\",\"kcbcue\",\"rjxgciqib\"]},{\"prefix\":\"hos\",\"nextHop\":[\"dqrhzoymib\",\"rq\",\"ibahwflus\",\"dtmhrkwofyyvoqa\"]},{\"prefix\":\"piexpbtgiw\",\"nextHop\":[\"oenwashr\"]}],\"ipv6Routes\":[{\"prefix\":\"kcnqxwbpo\",\"nextHop\":[\"lpiujwaa\",\"ipqiiobyuqerpq\"]},{\"prefix\":\"pqwcciuqgbdbutau\",\"nextHop\":[\"btkuwhh\",\"hykojoxafnndlpic\",\"koymkcd\"]}]}") - .toObject(StaticRouteConfiguration.class); - Assertions.assertEquals("cxozapvhelxp", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("lya", model.ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("kcnqxwbpo", model.ipv6Routes().get(0).prefix()); - Assertions.assertEquals("lpiujwaa", model.ipv6Routes().get(0).nextHop().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StaticRouteConfiguration model = - new StaticRouteConfiguration() - .withBfdConfiguration(new BfdConfiguration()) - .withIpv4Routes( - Arrays - .asList( - new StaticRouteProperties() - .withPrefix("cxozapvhelxp") - .withNextHop(Arrays.asList("lya", "dd", "kcbcue", "rjxgciqib")), - new StaticRouteProperties() - .withPrefix("hos") - .withNextHop(Arrays.asList("dqrhzoymib", "rq", "ibahwflus", "dtmhrkwofyyvoqa")), - new StaticRouteProperties() - .withPrefix("piexpbtgiw") - .withNextHop(Arrays.asList("oenwashr")))) - .withIpv6Routes( - Arrays - .asList( - new StaticRouteProperties() - .withPrefix("kcnqxwbpo") - .withNextHop(Arrays.asList("lpiujwaa", "ipqiiobyuqerpq")), - new StaticRouteProperties() - .withPrefix("pqwcciuqgbdbutau") - .withNextHop(Arrays.asList("btkuwhh", "hykojoxafnndlpic", "koymkcd")))); - model = BinaryData.fromObject(model).toObject(StaticRouteConfiguration.class); - Assertions.assertEquals("cxozapvhelxp", model.ipv4Routes().get(0).prefix()); - Assertions.assertEquals("lya", model.ipv4Routes().get(0).nextHop().get(0)); - Assertions.assertEquals("kcnqxwbpo", model.ipv6Routes().get(0).prefix()); - Assertions.assertEquals("lpiujwaa", model.ipv6Routes().get(0).nextHop().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePropertiesTests.java deleted file mode 100644 index bd06abd572c56..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/StaticRoutePropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.StaticRouteProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class StaticRoutePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StaticRouteProperties model = - BinaryData - .fromString("{\"prefix\":\"wdreqnovvqfovl\",\"nextHop\":[\"ywsuwsy\",\"s\"]}") - .toObject(StaticRouteProperties.class); - Assertions.assertEquals("wdreqnovvqfovl", model.prefix()); - Assertions.assertEquals("ywsuwsy", model.nextHop().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StaticRouteProperties model = - new StaticRouteProperties().withPrefix("wdreqnovvqfovl").withNextHop(Arrays.asList("ywsuwsy", "s")); - model = BinaryData.fromObject(model).toObject(StaticRouteProperties.class); - Assertions.assertEquals("wdreqnovvqfovl", model.prefix()); - Assertions.assertEquals("ywsuwsy", model.nextHop().get(0)); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportPackagePropertiesInnerTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportPackagePropertiesInnerTests.java deleted file mode 100644 index 03a721ca5d906..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportPackagePropertiesInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.fluent.models.SupportPackagePropertiesInner; -import org.junit.jupiter.api.Assertions; - -public final class SupportPackagePropertiesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SupportPackagePropertiesInner model = - BinaryData.fromString("{\"supportPackageURL\":\"izsh\"}").toObject(SupportPackagePropertiesInner.class); - Assertions.assertEquals("izsh", model.supportPackageUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportPackagePropertiesInner model = new SupportPackagePropertiesInner().withSupportPackageUrl("izsh"); - model = BinaryData.fromObject(model).toObject(SupportPackagePropertiesInner.class); - Assertions.assertEquals("izsh", model.supportPackageUrl()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportedConnectorPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportedConnectorPropertiesTests.java deleted file mode 100644 index c0063cc006516..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportedConnectorPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedConnectorProperties; -import org.junit.jupiter.api.Assertions; - -public final class SupportedConnectorPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SupportedConnectorProperties model = - BinaryData - .fromString("{\"connectorType\":\"dfdlwggyts\",\"maxSpeedInMbps\":676587800}") - .toObject(SupportedConnectorProperties.class); - Assertions.assertEquals("dfdlwggyts", model.connectorType()); - Assertions.assertEquals(676587800, model.maxSpeedInMbps()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedConnectorProperties model = - new SupportedConnectorProperties().withConnectorType("dfdlwggyts").withMaxSpeedInMbps(676587800); - model = BinaryData.fromObject(model).toObject(SupportedConnectorProperties.class); - Assertions.assertEquals("dfdlwggyts", model.connectorType()); - Assertions.assertEquals(676587800, model.maxSpeedInMbps()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportedVersionPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportedVersionPropertiesTests.java deleted file mode 100644 index 8591c72fe5ed3..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/SupportedVersionPropertiesTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.IsCurrentVersion; -import com.azure.resourcemanager.managednetworkfabric.models.IsTestVersion; -import com.azure.resourcemanager.managednetworkfabric.models.SupportedVersionProperties; -import org.junit.jupiter.api.Assertions; - -public final class SupportedVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SupportedVersionProperties model = - BinaryData - .fromString( - "{\"version\":\"vhixbjxy\",\"vendorOsVersion\":\"n\",\"vendorFirmwareVersion\":\"r\",\"isCurrent\":\"true\",\"isTest\":\"true\"}") - .toObject(SupportedVersionProperties.class); - Assertions.assertEquals("vhixbjxy", model.version()); - Assertions.assertEquals("n", model.vendorOsVersion()); - Assertions.assertEquals("r", model.vendorFirmwareVersion()); - Assertions.assertEquals(IsCurrentVersion.TRUE, model.isCurrent()); - Assertions.assertEquals(IsTestVersion.TRUE, model.isTest()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedVersionProperties model = - new SupportedVersionProperties() - .withVersion("vhixbjxy") - .withVendorOsVersion("n") - .withVendorFirmwareVersion("r") - .withIsCurrent(IsCurrentVersion.TRUE) - .withIsTest(IsTestVersion.TRUE); - model = BinaryData.fromObject(model).toObject(SupportedVersionProperties.class); - Assertions.assertEquals("vhixbjxy", model.version()); - Assertions.assertEquals("n", model.vendorOsVersion()); - Assertions.assertEquals("r", model.vendorFirmwareVersion()); - Assertions.assertEquals(IsCurrentVersion.TRUE, model.isCurrent()); - Assertions.assertEquals(IsTestVersion.TRUE, model.isTest()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateAdministrativeStateTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateAdministrativeStateTests.java deleted file mode 100644 index 2bc9a3dde40f4..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateAdministrativeStateTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpdateAdministrativeStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateAdministrativeState model = - BinaryData - .fromString("{\"state\":\"Disable\",\"resourceIds\":[\"uconuqszfkbey\",\"ewrmjmwvvjektc\"]}") - .toObject(UpdateAdministrativeState.class); - Assertions.assertEquals("uconuqszfkbey", model.resourceIds().get(0)); - Assertions.assertEquals(AdministrativeState.DISABLE, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateAdministrativeState model = - new UpdateAdministrativeState() - .withResourceIds(Arrays.asList("uconuqszfkbey", "ewrmjmwvvjektc")) - .withState(AdministrativeState.DISABLE); - model = BinaryData.fromObject(model).toObject(UpdateAdministrativeState.class); - Assertions.assertEquals("uconuqszfkbey", model.resourceIds().get(0)); - Assertions.assertEquals(AdministrativeState.DISABLE, model.state()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdatePowerCyclePropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdatePowerCyclePropertiesTests.java deleted file mode 100644 index cd84dd2728e20..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdatePowerCyclePropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.PowerEnd; -import com.azure.resourcemanager.managednetworkfabric.models.State; -import com.azure.resourcemanager.managednetworkfabric.models.UpdatePowerCycleProperties; -import org.junit.jupiter.api.Assertions; - -public final class UpdatePowerCyclePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdatePowerCycleProperties model = - BinaryData - .fromString("{\"powerEnd\":\"Primary\",\"state\":\"On\"}") - .toObject(UpdatePowerCycleProperties.class); - Assertions.assertEquals(PowerEnd.PRIMARY, model.powerEnd()); - Assertions.assertEquals(State.ON, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdatePowerCycleProperties model = - new UpdatePowerCycleProperties().withPowerEnd(PowerEnd.PRIMARY).withState(State.ON); - model = BinaryData.fromObject(model).toObject(UpdatePowerCycleProperties.class); - Assertions.assertEquals(PowerEnd.PRIMARY, model.powerEnd()); - Assertions.assertEquals(State.ON, model.state()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateVersionPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateVersionPropertiesTests.java deleted file mode 100644 index b761df49d12bb..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/UpdateVersionPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.UpdateVersionProperties; -import org.junit.jupiter.api.Assertions; - -public final class UpdateVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateVersionProperties model = - BinaryData.fromString("{\"skuVersion\":\"k\"}").toObject(UpdateVersionProperties.class); - Assertions.assertEquals("k", model.skuVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateVersionProperties model = new UpdateVersionProperties().withSkuVersion("k"); - model = BinaryData.fromObject(model).toObject(UpdateVersionProperties.class); - Assertions.assertEquals("k", model.skuVersion()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPropertiesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPropertiesTests.java deleted file mode 100644 index 93a38b745f15f..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/VpnConfigurationPropertiesTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.FabricBfdConfiguration; -import com.azure.resourcemanager.managednetworkfabric.models.OptionAProperties; -import com.azure.resourcemanager.managednetworkfabric.models.OptionBPropertiesAutoGenerated; -import com.azure.resourcemanager.managednetworkfabric.models.PeeringOption; -import com.azure.resourcemanager.managednetworkfabric.models.VpnConfigurationProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VpnConfigurationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VpnConfigurationProperties model = - BinaryData - .fromString( - "{\"administrativeState\":\"Disabled\",\"networkToNetworkInterconnectId\":\"hwwn\",\"peeringOption\":\"OptionB\",\"optionBProperties\":{\"importRouteTargets\":[\"fz\"],\"exportRouteTargets\":[\"pchwa\",\"fb\"]},\"optionAProperties\":{\"mtu\":1497864768,\"vlanId\":1344438119,\"peerASN\":1338045494,\"bfdConfiguration\":{\"interval\":1716129101,\"multiplier\":982242464},\"primaryIpv4Prefix\":\"l\",\"primaryIpv6Prefix\":\"gncxykxhdj\",\"secondaryIpv4Prefix\":\"immbcx\",\"secondaryIpv6Prefix\":\"bcporxvxcjzhqizx\"}}") - .toObject(VpnConfigurationProperties.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("fz", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("pchwa", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("l", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("gncxykxhdj", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("immbcx", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("bcporxvxcjzhqizx", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1497864768, model.optionAProperties().mtu()); - Assertions.assertEquals(1344438119, model.optionAProperties().vlanId()); - Assertions.assertEquals(1338045494, model.optionAProperties().peerAsn()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VpnConfigurationProperties model = - new VpnConfigurationProperties() - .withPeeringOption(PeeringOption.OPTIONB) - .withOptionBProperties( - new OptionBPropertiesAutoGenerated() - .withImportRouteTargets(Arrays.asList("fz")) - .withExportRouteTargets(Arrays.asList("pchwa", "fb"))) - .withOptionAProperties( - new OptionAProperties() - .withPrimaryIpv4Prefix("l") - .withPrimaryIpv6Prefix("gncxykxhdj") - .withSecondaryIpv4Prefix("immbcx") - .withSecondaryIpv6Prefix("bcporxvxcjzhqizx") - .withMtu(1497864768) - .withVlanId(1344438119) - .withPeerAsn(1338045494) - .withBfdConfiguration(new FabricBfdConfiguration())); - model = BinaryData.fromObject(model).toObject(VpnConfigurationProperties.class); - Assertions.assertEquals(PeeringOption.OPTIONB, model.peeringOption()); - Assertions.assertEquals("fz", model.optionBProperties().importRouteTargets().get(0)); - Assertions.assertEquals("pchwa", model.optionBProperties().exportRouteTargets().get(0)); - Assertions.assertEquals("l", model.optionAProperties().primaryIpv4Prefix()); - Assertions.assertEquals("gncxykxhdj", model.optionAProperties().primaryIpv6Prefix()); - Assertions.assertEquals("immbcx", model.optionAProperties().secondaryIpv4Prefix()); - Assertions.assertEquals("bcporxvxcjzhqizx", model.optionAProperties().secondaryIpv6Prefix()); - Assertions.assertEquals(1497864768, model.optionAProperties().mtu()); - Assertions.assertEquals(1344438119, model.optionAProperties().vlanId()); - Assertions.assertEquals(1338045494, model.optionAProperties().peerAsn()); - } -} diff --git a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/WorkloadServicesTests.java b/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/WorkloadServicesTests.java deleted file mode 100644 index 6cb616d2727bd..0000000000000 --- a/sdk/managednetworkfabric/azure-resourcemanager-managednetworkfabric/src/test/java/com/azure/resourcemanager/managednetworkfabric/generated/WorkloadServicesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.managednetworkfabric.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.managednetworkfabric.models.WorkloadServices; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadServicesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadServices model = - BinaryData - .fromString( - "{\"ipv4AddressSpaces\":[\"zwiivwzjbhyzs\",\"jrkambtrnegvmnv\",\"q\",\"qvldspastjbkkd\"],\"ipv6AddressSpaces\":[\"vestmjl\"]}") - .toObject(WorkloadServices.class); - Assertions.assertEquals("zwiivwzjbhyzs", model.ipv4AddressSpaces().get(0)); - Assertions.assertEquals("vestmjl", model.ipv6AddressSpaces().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadServices model = - new WorkloadServices() - .withIpv4AddressSpaces(Arrays.asList("zwiivwzjbhyzs", "jrkambtrnegvmnv", "q", "qvldspastjbkkd")) - .withIpv6AddressSpaces(Arrays.asList("vestmjl")); - model = BinaryData.fromObject(model).toObject(WorkloadServices.class); - Assertions.assertEquals("zwiivwzjbhyzs", model.ipv4AddressSpaces().get(0)); - Assertions.assertEquals("vestmjl", model.ipv6AddressSpaces().get(0)); - } -}